예제 #1
0
파일: ttb_gnome.c 프로젝트: Feechka/UOBP
static int
processUcsCharOperands (DataFile *file, void *data) {
  TextTableData *ttd = data;
  DataOperand string;

  if (getDataOperand(file, &string, "character string")) {
    if (string.length == 1) {
      DataOperand representation;

      if (getDataOperand(file, &representation, "braille representation")) {
        if (representation.length == 1) {
          unsigned char dots;

          if (testBrailleRepresentation(file, representation.characters[0], &dots)) {
            if (!setTextTableCharacter(ttd, string.characters[0], dots)) return 0;
          }
        } else {
          reportDataError(file, "multi-cell braille representation not supported");
        }
      }
    } else {
      reportDataError(file, "multi-character string not supported");
    }
  }

  return 1;
}
예제 #2
0
int
setTextTableByte (TextTableData *ttd, unsigned char byte, unsigned char dots) {
  wint_t character = convertCharToWchar(byte);

  if (character != WEOF)
    if (!setTextTableCharacter(ttd, character, dots))
      return 0;

  return 1;
}
예제 #3
0
static DATA_OPERANDS_PROCESSOR(processCharOperands) {
  TextTableData *ttd = data;
  wchar_t character;

  if (getCharacterOperand(file, &character)) {
    unsigned char dots;

    if (getDotsOperand(file, &dots)) {
      if (!setTextTableCharacter(ttd, character, dots)) return 0;
    }
  }

  return 1;
}
예제 #4
0
파일: ttb_native.c 프로젝트: BaJIeK/brltty
static int
processCharOperands (DataFile *file, void *data) {
  TextTableData *ttd = data;
  wchar_t character;

  if (getCharacterOperand(file, &character)) {
    unsigned char dots;

    if (getDotsOperand(file, &dots)) {
      if (!setTextTableCharacter(ttd, character, dots)) return 0;
    }
  }

  return 1;
}
예제 #5
0
static DATA_OPERANDS_PROCESSOR(processUnicodeCharOperands) {
  TextTableData *ttd = data;
  wchar_t character;

  if (getUnicodeCharacter(file, &character, "character")) {
    wchar_t representation;

    if (getUnicodeCharacter(file, &representation, "braille representation")) {
      unsigned char dots;

      if (testBrailleRepresentation(file, representation, &dots)) {
        if (!setTextTableCharacter(ttd, character, dots)) return 0;
      }
    }
  }

  return 1;
}
예제 #6
0
파일: ttb_gnome.c 프로젝트: Feechka/UOBP
static int
processUnicodeCharOperands (DataFile *file, void *data) {
  TextTableData *ttd = data;
  wchar_t character;

  if (getUnicodeCharacter(file, &character, "character")) {
    wchar_t representation;

    if (getUnicodeCharacter(file, &representation, "braille representation")) {
      unsigned char dots;

      if (testBrailleRepresentation(file, representation, &dots)) {
        if (!setTextTableCharacter(ttd, character, dots)) return 0;
      }
    }
  }

  return 1;
}