/** @file  psLine.h
 *
 * the psLine functions allow manipulation of fixed-length lines
 */

#ifndef PS_LINE_H
#define PS_LINE_H

// structure to carry a dynamic string
typedef struct
{
    long NLINE;                 // allocated length
    long Nline;                 // current length
    char *line;                 // character string data
}
psLine;

// allocate a line object of length Nline
psLine *psLineAlloc(long Nline);

// (re-)init the line
bool psLineInit(psLine *line);

// add the new string segment to the line
bool psLineAdd(psLine *line, const char *format, ...);

#endif /* PS_LINE_H */
