Browse Source

Accept floats with 1.2L0_100 syntax when reading from streams, not only when

reading from strings.
master
Bruno Haible 25 years ago
parent
commit
53cf241b08
  1. 10
      ChangeLog
  2. 2
      src/complex/input/cl_N_read_stream.cc
  3. 2
      src/float/input/cl_F_read_stream.cc
  4. 2
      src/integer/input/cl_I_read_stream.cc
  5. 2
      src/rational/input/cl_RA_read_stream.cc
  6. 2
      src/real/input/cl_R_read_stream.cc

10
ChangeLog

@ -1,3 +1,13 @@
2000-07-13 Bruno Haible <haible@clisp.cons.org>
* 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 <haible@clisp.cons.org>
* include/cl_object.h: Rename cl_word_size to cl_pointer_size.

2
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;

2
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;

2
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;

2
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;

2
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;

Loading…
Cancel
Save