summaryrefslogtreecommitdiff
path: root/libgfortran/io/read.c
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-09 02:53:41 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-09 02:53:41 +0000
commit2b208c623ec8b86960a9548e5b87c624dd65a62a (patch)
tree5889deeb49a6f23a2237c4405b7a024084c89977 /libgfortran/io/read.c
parenta47b0dc33e3fbc0fec94550329f285d3ab7f727d (diff)
downloadgcc-2b208c623ec8b86960a9548e5b87c624dd65a62a.tar.gz
2005-12-08 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/25039 * io/io.h: Create a new flag sf_read_comma to control comma separators in numeric reads. * io/transfer.c (formatted_transfer_scalar): Initialize the flag. (read_sf): Check for commas coming in and if the flag is set, shortcut the read. * io/read.c (read_a) (read_x): Clear the flag for character reads and reset it after the reads. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108271 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io/read.c')
-rw-r--r--libgfortran/io/read.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c
index 5f88a398f05..e1e61ee30da 100644
--- a/libgfortran/io/read.c
+++ b/libgfortran/io/read.c
@@ -244,7 +244,9 @@ read_a (st_parameter_dt *dtp, const fnode *f, char *p, int length)
if (w == -1) /* '(A)' edit descriptor */
w = length;
+ dtp->u.p.sf_read_comma = 0;
source = read_block (dtp, &w);
+ dtp->u.p.sf_read_comma = 1;
if (source == NULL)
return;
if (w > length)
@@ -843,6 +845,9 @@ read_x (st_parameter_dt *dtp, int n)
&& dtp->u.p.current_unit->bytes_left < n)
n = dtp->u.p.current_unit->bytes_left;
+ dtp->u.p.sf_read_comma = 0;
if (n > 0)
read_block (dtp, &n);
+ dtp->u.p.sf_read_comma = 1;
+
}