diff options
Diffstat (limited to 'gcc/fortran/scanner.c')
-rw-r--r-- | gcc/fortran/scanner.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/gcc/fortran/scanner.c b/gcc/fortran/scanner.c index f714ed01a54..fd8f284827c 100644 --- a/gcc/fortran/scanner.c +++ b/gcc/fortran/scanner.c @@ -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 ()) { |