]> www.ginac.de Git - cln.git/blobdiff - src/complex/input/cl_N_read_stream.cc
* */*: Remove cl_boolean, cl_true, and cl_false in favor of built-in
[cln.git] / src / complex / input / cl_N_read_stream.cc
index 48df82ee2def615fa8750deb98b773ef0c766376..330f068eb3a5eeb5151f666274a1cc7d4347f629 100644 (file)
@@ -24,17 +24,17 @@ public:
        char* end_pointer (void) { return buffer+index; }
 };
 
-static cl_boolean number_char_p (char c)
+static bool number_char_p (char c)
 {
        if ((c >= '0') && (c <= '9'))
-               return cl_true;
+               return true;
        if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))
-               return cl_true;
+               return true;
        switch (c) {
                case '+': case '-': case '.': case '_': case '/':
-                       return cl_true;
+                       return true;
                default:
-                       return cl_false;
+                       return false;
        }
 }
 
@@ -72,7 +72,6 @@ const cl_N read_complex (std::istream& stream, const cl_read_flags& flags)
                }
                if (!(((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z'))))
                        goto syntax1;
-               buffer.push(c);
                c = freadchar(stream);
                if (c == cl_EOF) goto eof;
                if (c == '(') {
@@ -109,10 +108,10 @@ done:
 
        // Handle syntax error.
 syntax1:       buffer.push(c);
-syntax:        read_number_bad_syntax(buffer.start_pointer(),buffer.end_pointer());
+syntax:        throw read_number_bad_syntax_exception(buffer.start_pointer(),buffer.end_pointer());
 
        // Handle premature EOF.
-eof:   read_number_eof();
+eof:   throw read_number_eof_exception();
 }
 
 }  // namespace cln