UNIVERS
15.3
UNIVERS base processing software API
|
#include <LineInput.H>
Public Member Functions | |
LineInput (FILE *fp) | |
int | read_line () |
char & | operator[] (int i) |
operator char * () | |
int | len () |
void | strip (int i) |
void | unstrip (int i) |
void | undo_strips () |
char * | word (int i) |
int | word_len (int i) |
int | word_cmp (int i, const char *s) |
int | skip (const char *set) |
Protected Attributes | |
FILE * | file |
CharAr | buf |
int | strip_base |
Line input abstraction with logical line ('\' as glue char between real lines.
LineInput::LineInput | ( | FILE * | fp | ) |
Attach input stream
|
inline |
Return length of line
|
inline |
Access to the whole line
|
inline |
Access to the line contents char by char
int LineInput::read_line | ( | ) |
Read full logical line into internal buffer; returns !0 if can not due to EOF.
int LineInput::skip | ( | const char * | set | ) |
Skip pointed characters and return the first non-pointed char
|
inline |
Strip line from the left end until i char; i become 0
|
inline |
Undo all strips
|
inline |
Unstrip line by i
char* LineInput::word | ( | int | i | ) |
Access to the line contents per word (space separated)
int LineInput::word_cmp | ( | int | i, |
const char * | s | ||
) |
Compare pointed word with string; -1 means word is less than s
int LineInput::word_len | ( | int | i | ) |
Return length if pointed word