00001 #ifndef _TABLE_ELEMENT_H_ 00002 #define _TABLE_ELEMENT_H_ 00003 00004 typedef struct 00005 { 00006 unsigned used: 1; 00007 char** stringarray; 00008 int nlines; 00009 int width; 00010 } TableElement; 00011 00012 00013 enum {TABLE_STYLE_SPACES, TABLE_STYLE_LINES, TABLE_STYLE_LINES_NO_BOTTOM}; 00014 00015 struct CellTable 00016 { 00017 TableElement** cells; 00018 int nRows; 00019 int nCols; 00020 }; 00021 00022 00023 typedef struct CellTable CellTable; 00024 typedef TableElement** Table3; 00025 00026 #ifdef TABLE 00027 #define ULCORNER 218 00028 #define URCORNER 191 00029 #define UPTEE 194 00030 00031 #define LLCORNER 192 00032 #define LRCORNER 217 00033 #define LLTEE 193 00034 00035 #define CROSS 197 00036 #define VLINE 179 00037 #define HLINE 196 00038 #else 00039 #define ULCORNER '+' 00040 #define URCORNER '+' 00041 #define UPTEE '+' 00042 00043 #define LLCORNER '+' 00044 #define LRCORNER '+' 00045 #define LLTEE '+' 00046 00047 #define CROSS '+' 00048 #define VLINE '|' 00049 #define HLINE '-' 00050 #endif 00051 00052 int teprintf(TableElement* TE, const char* format, ...); 00053 void destroyTable(TableElement*** TE, int nrows, int ncols); 00054 void fprintTable3(FILE* fp, TableElement** te, int nrows, int ncols, int style); 00055 TableElement** createTable3(int nrows, int ncols); 00056 void teprintfIntArray(TableElement* TE, int* array, int nsize); 00057 void IntArray_teprintf(TableElement* TE, int* array, int nsize, int no_per_line, int no_width); 00058 void FPeak2iPointerArray_teprintf(TableElement* TE, FPeak2iPointer* pfpeaks, int npeaks); 00059 void IsotopicClusterArray_tbprint(CellTable* TABLE, Map2D* map, IsotopicCluster* pIC, int nicp, int format); 00060 void MS2MatchResult_teprintf(TableElement* TE, MS2MatchResult mmr); 00061 void MassFilterResult_teprintf(TableElement* TE, MassFilterResult mfr, char* format, int score_model); 00062 #endif 00063