7 #include "cln/string.h"
13 #include "cl_spushstring.h"
17 const cl_string cl_fget (cl_istream stream, int n, char delim)
19 var cl_spushstring buffer;
20 // Handling of eofp is tricky: EOF is reached when (!stream.good()) || (stream.get()==EOF).
21 while (stream.good()) {
22 var int c = stream.get();
24 break; // ios::eofbit already set
31 stream.setstate(std::ios::failbit);
36 return buffer.contents();