diff options
author | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-10 13:34:04 +0000 |
---|---|---|
committer | pbrook <pbrook@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-08-10 13:34:04 +0000 |
commit | 357fae516a6e9d23857a5716939ffddd6fd30261 (patch) | |
tree | a62bb4cf04088ac64a050809fe3aa40648d713d6 /libgfortran | |
parent | 025d4f81807a2a4bc0702913beac65976a9678f5 (diff) | |
download | gcc-357fae516a6e9d23857a5716939ffddd6fd30261.tar.gz |
2004-08-10 Victor Leikehman <lei@il.ibm.com>
* io/list_read.c (namelist_read): Convert variable names
to lower case, so that mixed-case names are recognized.
Don't read beyond terminating slash.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85751 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/io/list_read.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index de54f0f2115..c6f1a8df05d 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2004-08-10 Victor Leikehman <lei@il.ibm.com> + + * io/list_read.c (namelist_read): Convert variable names + to lower case, so that mixed-case names are recognized. + Don't read beyond terminating slash. + 2004-08-09 Richard Henderson <rth@redhat.com> Roger Sayle <roger@eyesopen.com> diff --git a/libgfortran/io/list_read.c b/libgfortran/io/list_read.c index bcfbc83fe7b..92ef1e7b9e9 100644 --- a/libgfortran/io/list_read.c +++ b/libgfortran/io/list_read.c @@ -1453,11 +1453,15 @@ restart: match_namelist_name(ioparm.namelist_name, ioparm.namelist_name_len); /* Ready to read namelist elements */ - for (;;) + while (!input_complete) { c = next_char (); switch (c) { + case '/': + input_complete = 1; + next_record (0); + break; case '&': match_namelist_name("end",3); return; @@ -1475,7 +1479,7 @@ restart: name_matched = 1; nl = find_nml_node (saved_string); if (nl == NULL) - internal_error ("Can not found a valid namelist var!"); + internal_error ("Can not match a namelist variable"); free_saved(); len = nl->len; @@ -1528,7 +1532,7 @@ restart: break; default : - push_char(c); + push_char(tolower(c)); break; } } |