getShiftValue static method

int getShiftValue(
  1. int c,
  2. bool c40,
  3. int fnc1
)

Implementation

static int getShiftValue(int c, bool c40, int fnc1) {
  return (c40 && MinimalEncoder.isInC40Shift1Set(c) ||
          !c40 && MinimalEncoder.isInTextShift1Set(c))
      ? 0
      : (c40 && MinimalEncoder.isInC40Shift2Set(c, fnc1) ||
              !c40 && MinimalEncoder.isInTextShift2Set(c, fnc1))
          ? 1
          : 2;
}