X-Git-Url: https://ginac.de/CLN/cln.git//cln.git?a=blobdiff_plain;f=src%2Freal%2Finput%2Fcl_R_read_stream.cc;h=b6947451b5619f079744e047b83329539fd0f1b6;hb=f3b29e52ea5a7b013f8294065920365e5d17d18f;hp=5bdc7736977b07ba57f34047eaefc1703fe55e5a;hpb=dd9e0f894eec7e2a8cf85078330ddc0a6639090b;p=cln.git diff --git a/src/real/input/cl_R_read_stream.cc b/src/real/input/cl_R_read_stream.cc index 5bdc773..b694745 100644 --- a/src/real/input/cl_R_read_stream.cc +++ b/src/real/input/cl_R_read_stream.cc @@ -6,14 +6,16 @@ #include "cl_sysdep.h" // Specification. -#include "cl_real_io.h" +#include "cln/real_io.h" // Implementation. -#include "cl_io.h" +#include "cln/io.h" #include "cl_spushstring.h" -#include "cl_input.h" +#include "cln/input.h" + +namespace cln { // We read an entire token (or even more, if it begins with #C) into a // buffer and then call read_real() on the buffer. @@ -31,14 +33,14 @@ static cl_boolean number_char_p (char c) if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))) return cl_true; switch (c) { - case '+': case '-': case '.': case '/': + case '+': case '-': case '.': case '_': case '/': return cl_true; default: return cl_false; } } -const cl_R read_real (cl_istream stream, const cl_read_flags& flags) +const cl_R read_real (std::istream& stream, const cl_read_flags& flags) { // One pre-allocated buffer. This reduces the allocation/free cost. static pushstring_hack buffer; @@ -102,3 +104,5 @@ syntax1: buffer.push(c); // Handle premature EOF. eof: read_number_eof(); } + +} // namespace cln