module.c (module_char): Replace fgetc() with getc().

2007-04-25  Janne Blomqvist  <jb@gcc.gnu.org>

	* module.c (module_char): Replace fgetc() with
	getc(). 
	(write_char): Replace fputc() with putc().
	* scanner.c (load_line): Replace fgetc() with getc().
	(gfc_read_orig_filename): Likewise.

From-SVN: r124154
This commit is contained in:
Janne Blomqvist 2007-04-25 15:06:26 +03:00
parent 500fc42586
commit c4da1827ac
3 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,11 @@
2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
* module.c (module_char): Replace fgetc() with
getc().
(write_char): Replace fputc() with putc().
* scanner.c (load_line): Replace fgetc() with getc().
(gfc_read_orig_filename): Likewise.
2007-04-25 Tobias Burnus <burnus@net-b.de>
PR fortran/31668

View File

@ -956,7 +956,7 @@ module_char (void)
{
int c;
c = fgetc (module_fp);
c = getc (module_fp);
if (c == EOF)
bad_module ("Unexpected EOF");
@ -1276,7 +1276,7 @@ find_enum (const mstring *m)
static void
write_char (char out)
{
if (fputc (out, module_fp) == EOF)
if (putc (out, module_fp) == EOF)
gfc_fatal_error ("Error writing modules file: %s", strerror (errno));
/* Add this to our MD5. */

View File

@ -1033,7 +1033,7 @@ load_line (FILE *input, char **pbuf, int *pbuflen)
buffer = *pbuf;
preprocessor_flag = 0;
c = fgetc (input);
c = getc (input);
if (c == '#')
/* In order to not truncate preprocessor lines, we have to
remember that this is one. */
@ -1042,7 +1042,7 @@ load_line (FILE *input, char **pbuf, int *pbuflen)
for (;;)
{
c = fgetc (input);
c = getc (input);
if (c == EOF)
break;
@ -1121,7 +1121,7 @@ load_line (FILE *input, char **pbuf, int *pbuflen)
/* Truncate the rest of the line. */
for (;;)
{
c = fgetc (input);
c = getc (input);
if (c == '\n' || c == EOF)
break;
@ -1602,7 +1602,7 @@ gfc_read_orig_filename (const char *filename, const char **canon_source_file)
if (gfc_src_file == NULL)
return NULL;
c = fgetc (gfc_src_file);
c = getc (gfc_src_file);
ungetc (c, gfc_src_file);
if (c != '#')
@ -1618,7 +1618,7 @@ gfc_read_orig_filename (const char *filename, const char **canon_source_file)
if (filename == NULL)
return NULL;
c = fgetc (gfc_src_file);
c = getc (gfc_src_file);
ungetc (c, gfc_src_file);
if (c != '#')