00001 /** @file psLine.h 00002 * 00003 * the psLine functions allow manipulation of fixed-length lines 00004 */ 00005 00006 #ifndef PS_LINE_H 00007 #define PS_LINE_H 00008 00009 // structure to carry a dynamic string 00010 typedef struct 00011 { 00012 long NLINE; // allocated length 00013 long Nline; // current length 00014 char *line; // character string data 00015 } 00016 psLine; 00017 00018 // allocate a line object of length Nline 00019 psLine *psLineAlloc(long Nline); 00020 00021 // (re-)init the line 00022 bool psLineInit(psLine *line); 00023 00024 // add the new string segment to the line 00025 bool psLineAdd(psLine *line, const char *format, ...); 00026 00027 #endif /* PS_LINE_H */
1.4.4