From 53cf241b087f70998460b1dcb3e678dd19cfaf32 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 13 Jul 2000 19:46:43 +0000 Subject: [PATCH] Accept floats with 1.2L0_100 syntax when reading from streams, not only when reading from strings. --- ChangeLog | 10 ++++++++++ src/complex/input/cl_N_read_stream.cc | 2 +- src/float/input/cl_F_read_stream.cc | 2 +- src/integer/input/cl_I_read_stream.cc | 2 +- src/rational/input/cl_RA_read_stream.cc | 2 +- src/real/input/cl_R_read_stream.cc | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3f72f40..f281046 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2000-07-13 Bruno Haible + + * src/float/input/cl_F_read_stream.cc (number_char_p): Accept '_', + used as precision marker for floats. + Reported by Keith Briggs (in 1998) and Thomas Roessler. + * src/integer/input/cl_I_read_stream.cc (number_char_p): Likewise. + * src/rational/input/cl_RA_read_stream.cc (number_char_p): Likewise. + * src/real/input/cl_R_read_stream.cc (number_char_p): Likewise. + * src/complex/input/cl_N_read_stream.cc (number_char_p): Likewise. + 2000-06-22 Bruno Haible * include/cl_object.h: Rename cl_word_size to cl_pointer_size. diff --git a/src/complex/input/cl_N_read_stream.cc b/src/complex/input/cl_N_read_stream.cc index 3fa7462..9d5e1b9 100644 --- a/src/complex/input/cl_N_read_stream.cc +++ b/src/complex/input/cl_N_read_stream.cc @@ -29,7 +29,7 @@ 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; diff --git a/src/float/input/cl_F_read_stream.cc b/src/float/input/cl_F_read_stream.cc index 30ef968..889c6ae 100644 --- a/src/float/input/cl_F_read_stream.cc +++ b/src/float/input/cl_F_read_stream.cc @@ -31,7 +31,7 @@ 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; diff --git a/src/integer/input/cl_I_read_stream.cc b/src/integer/input/cl_I_read_stream.cc index e375665..44f79c0 100644 --- a/src/integer/input/cl_I_read_stream.cc +++ b/src/integer/input/cl_I_read_stream.cc @@ -31,7 +31,7 @@ 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; diff --git a/src/rational/input/cl_RA_read_stream.cc b/src/rational/input/cl_RA_read_stream.cc index b7a8ce7..f4266a7 100644 --- a/src/rational/input/cl_RA_read_stream.cc +++ b/src/rational/input/cl_RA_read_stream.cc @@ -32,7 +32,7 @@ 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; diff --git a/src/real/input/cl_R_read_stream.cc b/src/real/input/cl_R_read_stream.cc index 5bdc773..c798358 100644 --- a/src/real/input/cl_R_read_stream.cc +++ b/src/real/input/cl_R_read_stream.cc @@ -31,7 +31,7 @@ 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;