9 /// line counting input stream.
14 // could just have used streams.
20 Text_stream(String fn
);
21 String
get_name() { return name
; }
26 return (peek() == '\n');
56 cerr
<<__FUNCTION__
<< ": closing unended file";
61 /// GNU format message.
62 void message(String s
);
65 a stream for textfiles. linecounting. Thin interface getchar and
66 ungetchar. (ungetc is unlimited)
68 should protect get and unget against improper use
73 class Data_file
: private Text_stream
81 Text_stream::get_name
;
84 void data_unget(char c
) {
88 /// read line, eat #\n#
91 /// read a word till next space, leave space. Also does quotes
94 /// gobble horizontal white stuff.
97 /// gobble empty stuff before first field.
98 void gobble_leading_white();
99 Data_file(String s
) : Text_stream(s
) {
100 //*mlog << "(" << s << flush;
105 // *mlog << ")"<<flush;
109 message("warning: " + s
);