]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/fortran/scanner.c
Replace enum gfc_try with bool type.
[thirdparty/gcc.git] / gcc / fortran / scanner.c
index f714ed01a549fcfc8c1f9f1188c8eca872960718..fd8f284827c16350049983c6ef7dfcc07064b993 100644 (file)
@@ -326,7 +326,7 @@ add_path_to_list (gfc_directorylist **list, const char *path,
   q = (char *) alloca (len + 1);
   memcpy (q, p, len + 1);
   i = len - 1;
-  while (i >=0 && IS_DIR_SEPARATOR(q[i]))
+  while (i >=0 && IS_DIR_SEPARATOR (q[i]))
     q[i--] = '\0';
 
   if (stat (q, &st))
@@ -1123,7 +1123,7 @@ restart:
       else
        gfc_advance_line ();
       
-      if (gfc_at_eof())
+      if (gfc_at_eof ())
        goto not_continuation;
 
       /* We've got a continuation line.  If we are on the very next line after
@@ -1831,7 +1831,7 @@ preprocessor_line (gfc_char_t *c)
 }
 
 
-static gfc_try load_file (const char *, const char *, bool);
+static bool load_file (const char *, const char *, bool);
 
 /* include_line()-- Checks a line buffer to see if it is an include
    line.  If so, we call load_file() recursively to load the included
@@ -1902,7 +1902,7 @@ include_line (gfc_char_t *line)
                   read by anything else.  */
 
   filename = gfc_widechar_to_char (begin, -1);
-  if (load_file (filename, NULL, false) == FAILURE)
+  if (!load_file (filename, NULL, false))
     exit (FATAL_EXIT_CODE);
 
   free (filename);
@@ -1912,7 +1912,7 @@ include_line (gfc_char_t *line)
 
 /* Load a file into memory by calling load_line until the file ends.  */
 
-static gfc_try
+static bool
 load_file (const char *realfilename, const char *displayedname, bool initial)
 {
   gfc_char_t *line;
@@ -1936,7 +1936,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
        fprintf (stderr, "%s:%d: Error: File '%s' is being included "
                 "recursively\n", current_file->filename, current_file->line,
                 filename);
-       return FAILURE;
+       return false;
       }
 
   if (initial)
@@ -1951,7 +1951,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
       if (input == NULL)
        {
          gfc_error_now ("Can't open file '%s'", filename);
-         return FAILURE;
+         return false;
        }
     }
   else
@@ -1961,7 +1961,7 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
        {
          fprintf (stderr, "%s:%d: Error: Can't open included file '%s'\n",
                   current_file->filename, current_file->line, filename);
-         return FAILURE;
+         return false;
        }
     }
 
@@ -2096,19 +2096,19 @@ load_file (const char *realfilename, const char *displayedname, bool initial)
     add_file_change (NULL, current_file->inclusion_line + 1);
   current_file = current_file->up;
   linemap_add (line_table, LC_LEAVE, 0, NULL, 0);
-  return SUCCESS;
+  return true;
 }
 
 
-/* Open a new file and start scanning from that file. Returns SUCCESS
-   if everything went OK, FAILURE otherwise.  If form == FORM_UNKNOWN
+/* Open a new file and start scanning from that file. Returns true
+   if everything went OK, false otherwise.  If form == FORM_UNKNOWN
    it tries to determine the source form from the filename, defaulting
    to free form.  */
 
-gfc_try
+bool
 gfc_new_file (void)
 {
-  gfc_try result;
+  bool result;
 
   if (gfc_cpp_enabled ())
     {