Ejemplo n.º 1
0
TextTableData *
processTextTableLines (FILE *stream, const char *name, DataOperandsProcessor *processor) {
  if (setGlobalTableVariables(TEXT_TABLE_EXTENSION, TEXT_SUBTABLE_EXTENSION)) {
    TextTableData *ttd;

    if ((ttd = newTextTableData())) {
      if (processDataStream(NULL, stream, name, processor, ttd)) return ttd;
      destroyTextTableData(ttd);
    }
  }

  return NULL;
}
Ejemplo n.º 2
0
TextTableData *
processTextTableLines (FILE *stream, const char *name, DataOperandsProcessor *processOperands) {
  if (setTableDataVariables(TEXT_TABLE_EXTENSION, TEXT_SUBTABLE_EXTENSION)) {
    TextTableData *ttd;

    if ((ttd = newTextTableData())) {
      const DataFileParameters parameters = {
        .processOperands = processOperands,
        .data = ttd
      };

      if (processDataStream(NULL, stream, name, &parameters)) {
        if (finishTextTableData(ttd)) {
          return ttd;
        }
      }

      destroyTextTableData(ttd);
    }
  }

  return NULL;
}