diff options
author | Tom Tromey <tromey@cygnus.com> | 1998-10-13 11:49:26 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 1998-10-13 11:49:26 +0000 |
commit | 0a65887a3817cedf471aa17c7ae25ac7996abac1 (patch) | |
tree | acde2dcc1a0325798460888b3e4af2f977157708 /gcc | |
parent | 2ce5e1b422b29b6b85a271060d17fde8c8905974 (diff) | |
download | gcc-0a65887a3817cedf471aa17c7ae25ac7996abac1.zip gcc-0a65887a3817cedf471aa17c7ae25ac7996abac1.tar.gz gcc-0a65887a3817cedf471aa17c7ae25ac7996abac1.tar.bz2 |
jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
* jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1.
(main): Likewise. Exit with SUCCESS_EXIT_CODE at end of
function.
Include <config.h> and "system.h".
(disassemble_method): Undefine RET to avoid clash with
config/i386/i386.h.
From-SVN: r23050
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/java/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/java/jcf-dump.c | 26 |
2 files changed, 25 insertions, 10 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 32c7268..c22ff05 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,12 @@ +1998-10-13 Tom Tromey <tromey@cygnus.com> + + * jcf-dump.c (process_class): Use FATAL_EXIT_CODE, not -1. + (main): Likewise. Exit with SUCCESS_EXIT_CODE at end of + function. + Include <config.h> and "system.h". + (disassemble_method): Undefine RET to avoid clash with + config/i386/i386.h. + 1998-10-09 Tom Tromey <tromey@cygnus.com> * gjavah.c (decode_signature_piece): New function. diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c index 9e36b45..69ec957 100644 --- a/gcc/java/jcf-dump.c +++ b/gcc/java/jcf-dump.c @@ -46,6 +46,9 @@ The Free Software Foundation is independent of Sun Microsystems, Inc. */ */ +#include <config.h> +#include "system.h" + #include <stdio.h> #include "jcf.h" @@ -667,13 +670,13 @@ DEFUN(process_class, (jcf), if (code != 0) { fprintf (stderr, "error while parsing constant pool\n"); - exit (-1); + exit (FATAL_EXIT_CODE); } code = verify_constant_pool (jcf); if (code > 0) { fprintf (stderr, "error in constant pool entry #%d\n", code); - exit (-1); + exit (FATAL_EXIT_CODE); } if (flag_print_constant_pool) print_constant_pool (jcf); @@ -683,19 +686,19 @@ DEFUN(process_class, (jcf), if (code != 0) { fprintf (stderr, "error while parsing fields\n"); - exit (-1); + exit (FATAL_EXIT_CODE); } code = jcf_parse_methods (jcf); if (code != 0) { fprintf (stderr, "error while parsing methods\n"); - exit (-1); + exit (FATAL_EXIT_CODE); } code = jcf_parse_final_attributes (jcf); if (code != 0) { fprintf (stderr, "error while parsing final attributes\n"); - exit (-1); + exit (FATAL_EXIT_CODE); } jcf->filename = NULL; } @@ -735,7 +738,7 @@ DEFUN(main, (argc, argv), else { fprintf (stderr, "%s: illegal argument\n", argv[argi]); - exit (-1); + exit (FATAL_EXIT_CODE); } } @@ -750,7 +753,7 @@ DEFUN(main, (argc, argv), else { fprintf (stderr, "%s: illegal argument\n", argv[argi]); - exit (-1); + exit (FATAL_EXIT_CODE); } } else @@ -780,7 +783,7 @@ DEFUN(main, (argc, argv), if (out) { fprintf (stderr, "Cannot open '%s' for output.\n", output_file); - exit (-1); + exit (FATAL_EXIT_CODE); } } else @@ -807,7 +810,7 @@ DEFUN(main, (argc, argv), if (class_filename == NULL) { perror ("Could not find class"); - exit (-1); + exit (FATAL_EXIT_CODE); } JCF_FILL (jcf, 4); if (GET_u4 (jcf->read_ptr) == ZIPMAGIC) @@ -830,7 +833,7 @@ DEFUN(main, (argc, argv), if (magic != 0x04034b50) /* ZIPMAGIC (little-endian) */ { fprintf (stderr, "bad format of .zip archine\n"); - exit (-1); + exit (FATAL_EXIT_CODE); } JCF_FILL (jcf, 26); JCF_SKIP (jcf, 2); @@ -903,6 +906,8 @@ DEFUN(main, (argc, argv), JCF_FINISH(jcf); } } + + exit (SUCCESS_EXIT_CODE); } static void @@ -1029,6 +1034,7 @@ DEFUN(disassemble_method, (jcf, byte_ops, len), saw_index = 0, INT_temp = (OPERAND_VALUE); \ fprintf (out, " %d", saw_index ? INT_temp : oldpc + INT_temp) +#undef RET /* Defined by config/i386/i386.h */ #define RET(OPERAND_TYPE, OPERAND_VALUE) \ INT_temp = saw_wide ? IMMEDIATE_u2 : (OPERAND_VALUE); \ saw_wide = 0; \ |