Changeset 7847 for trunk/psLib/src/sys/psLine.h
- Timestamp:
- Jul 7, 2006, 5:17:13 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psLine.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psLine.h
r7380 r7847 7 7 #define PS_LINE_H 8 8 9 / / structure to carry a dynamic string9 /** Structure to carry a dynamic string */ 10 10 typedef struct 11 11 { 12 long NLINE; //allocated length13 long Nline; //current length14 char *line; //character string data12 long NLINE; ///< allocated length 13 long Nline; ///< current length 14 char *line; ///< character string data 15 15 } 16 16 psLine; 17 17 18 // allocate a line object of length Nline 19 psLine *psLineAlloc(long Nline); 18 /** Allocates a line object of length Nline 19 * 20 * @return psLine*: the newly allocated line object. 21 */ 22 psLine *psLineAlloc( 23 long Nline ///< 24 ); 20 25 21 // (re-)init the line 22 bool psLineInit(psLine *line); 26 /** Initializes or re-initializes a line. 27 * 28 * Initializes or re-initializes a line, setting the current length to zero and setting 29 * the string data values to 0. If the function is passed NULL, false is returned. 30 * 31 * @return bool: True if successful, otherwise false. 32 */ 33 bool psLineInit( 34 psLine *line ///< 35 ); 23 36 24 // add the new string segment to the line 25 bool psLineAdd(psLine *line, const char *format, ...); 37 /** Adds the line segment to the string. 38 * 39 * Appends a line segment to the string, returning false if the new segment would 40 * overflow the allocated string length. 41 * 42 * @return bool: True if successful, otherwise false. 43 */ 44 bool psLineAdd( 45 psLine *line, ///< the line segment to append 46 const char *format, ///< printf-style format of line 47 ... ///< any parameters required in format 48 ); 26 49 27 50 #endif /* PS_LINE_H */
Note:
See TracChangeset
for help on using the changeset viewer.
