2007-04-25 Janne Blomqvist <jb@gcc.gnu.org>
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Apr 2007 12:06:26 +0000 (12:06 +0000)
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Apr 2007 12:06:26 +0000 (12:06 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124154 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/module.c
gcc/fortran/scanner.c

index 32affbe..74c98bf 100644 (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
index 03ad1a5..8a65038 100644 (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.  */
index 685039c..c3d3e62 100644 (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 != '#')