diff options
author | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-04-20 16:39:28 +0000 |
---|---|---|
committer | kenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1997-04-20 16:39:28 +0000 |
commit | a5659160ae4be8bfbe3c4720a1c75bafc9784822 (patch) | |
tree | 96b1726481535d65dacd329f0027bf61226b8bb9 /gcc/fix-header.c | |
parent | 222961470be5c8eb43ceb5cee5b0dd3d328bec66 (diff) | |
download | gcc-a5659160ae4be8bfbe3c4720a1c75bafc9784822.tar.gz |
Use symbolic codes for exit.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@13938 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fix-header.c')
-rw-r--r-- | gcc/fix-header.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gcc/fix-header.c b/gcc/fix-header.c index f059952587b..3464d3fb48f 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -1,5 +1,5 @@ /* fix-header.c - Make C header file suitable for C++. - Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -624,7 +624,7 @@ read_scan_file (in_fname, argc, argv) fprintf (stderr, "(%s: %d errors and %d warnings from cpp)\n", inc_filename, scan_in.errors, warnings); if (scan_in.errors) - exit (0); + exit (SUCCESS_EXIT_CODE); /* Traditionally, getc and putc are defined in terms of _filbuf and _flsbuf. If so, those functions are also required. */ @@ -689,7 +689,7 @@ read_scan_file (in_fname, argc, argv) { if (verbose) fprintf (stderr, "%s: OK, nothing needs to be done.\n", inc_filename); - exit (0); + exit (SUCCESS_EXIT_CODE); } if (!verbose) fprintf (stderr, "%s: fixing %s\n", progname, inc_filename); @@ -1077,7 +1077,7 @@ main (argc, argv) { fprintf (stderr, "%s: Usage: foo.h infile.h outfile.h options\n", progname); - exit (-1); + exit (FATAL_EXIT_CODE); } inc_filename = argv[1]; @@ -1095,7 +1095,7 @@ main (argc, argv) { if (verbose) fprintf (stderr, "%s: ignoring %s\n", progname, inc_filename); - exit (0); + exit (SUCCESS_EXIT_CODE); } } @@ -1157,13 +1157,13 @@ main (argc, argv) fprintf (stderr, "%s: Cannot open '%s' for reading -", progname, argv[2]); perror (NULL); - exit (-1); + exit (FATAL_EXIT_CODE); } if (fstat (inf_fd, &sbuf) < 0) { fprintf (stderr, "%s: Cannot get size of '%s' -", progname, argv[2]); perror (NULL); - exit (-1); + exit (FATAL_EXIT_CODE); } inf_size = sbuf.st_size; inf_buffer = (char *) xmalloc (inf_size + 2); @@ -1180,7 +1180,7 @@ main (argc, argv) { fprintf (stderr, "%s: Failed to read '%s' -", progname, argv[2]); perror (NULL); - exit (-1); + exit (FATAL_EXIT_CODE); } if (i == 0) { @@ -1203,7 +1203,7 @@ main (argc, argv) fprintf (stderr, "%s: Cannot open '%s' for writing -", progname, argv[3]); perror (NULL); - exit (-1); + exit (FATAL_EXIT_CODE); } lineno = 1; |