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> 2007-04-25 Tobias Burnus <burnus@net-b.de>
PR fortran/31668 PR fortran/31668

View File

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

View File

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