2011-01-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/47154
* io/list_read.c (namelist_read): Remove calls to hit_eof to avoid the
duplicate calls via next_record.
From-SVN: r168502
+2011-01-04 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/47154
+ * io/list_read.c (namelist_read): Remove calls to hit_eof to avoid the
+ duplicate calls via next_record.
+
\f
Copyright (C) 2011 Free Software Foundation, Inc.
node names or namelist on stdout. */
find_nml_name:
- if ((c = next_char (dtp)) == EOF)
- goto nml_err_eof;
+ c = next_char (dtp);
switch (c)
{
case '$':
break;
case '!':
- if (eat_line (dtp))
- goto nml_err_eof;
+ eat_line (dtp);
goto find_nml_name;
case '=':
- if ((c = next_char (dtp)) == EOF)
- goto nml_err_eof;
+ c = next_char (dtp);
if (c == '?')
nml_query (dtp, '=');
else
case '?':
nml_query (dtp, '?');
+ case EOF:
+ return;
+
default:
goto find_nml_name;
}
goto find_nml_name;
/* A trailing space is required, we give a little lattitude here, 10.9.1. */
- if ((c = next_char (dtp)) == EOF)
- goto nml_err_eof;
+ c = next_char (dtp);
if (!is_separator(c) && c != '!')
{
unget_char (dtp, c);
free_line (dtp);
return;
- /* All namelist error calls return from here */
-
-nml_err_eof:
- hit_eof (dtp);
nml_err_ret:
+ /* All namelist error calls return from here */
free_saved (dtp);
free_line (dtp);
generate_error (&dtp->common, LIBERROR_READ_VALUE, nml_err_msg);