aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf-dump.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-08-10 16:58:13 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-08-10 16:58:13 +0000
commitc8e7d2e6329fc6b415b86764b55dc6fe56043b71 (patch)
tree871ce9dd8338fdeb762af0f17f0e404ea5b3e1fa /gcc/java/jcf-dump.c
parent1ef1bf063b0a944563d37d7d079d9f860d149c0b (diff)
downloadgcc-c8e7d2e6329fc6b415b86764b55dc6fe56043b71.zip
gcc-c8e7d2e6329fc6b415b86764b55dc6fe56043b71.tar.gz
gcc-c8e7d2e6329fc6b415b86764b55dc6fe56043b71.tar.bz2
check-init.c (check_bool2_init, [...]): Add static prototypes.
* check-init.c (check_bool2_init, done_alternative): Add static prototypes. * class.c (add_interface_do, maybe_layout_super_class): Likewise. (add_method, build_utf8_ref, build_class_ref, append_gpp_mangled_type, layout_class_method): Constify a char*. * decl.c (push_promoted_type, make_binding_level): Add static prototypes. (push_promoted_type, pushdecl): Constify a char*. * except.c (find_handler_in_range, link_handler, check_start_handlers): Add static prototypes. * expr.c (process_jvm_instruction): Constify a char*. * gjavah.c (main): Constify a char*. * java-tree.h (verify_jvm_instructions, process_jvm_instruction): Constify a char*. * jcf-depend.c (free_entry, add_entry, munge, print_ents): Add static prototypes. (add_entry, jcf_dependency_set_target, jcf_dependency_add_target, munge, print_ents): Constify a char*. * jcf-dump.c (disassemble_method): Constify a char*. (print_constant_pool, print_exception_table): Add static prototypes. (print_constant, print_exception_table, main, disassemble_method): Constify a char*. * jcf-io.c (find_classfile, find_class): Likewise. * jcf-parse.c (JPOOL_UTF_DATA, find_in_current_zip): Likewise. (set_source_filename, predefined_filename_p): Add static prototypes. (set_source_filename, get_constant, get_class_constant, find_in_current_zip): Constify a char*. * jcf-path.c (free_entry, append_entry, add_entry, add_path): Add static prototypes. (add_entry, add_path, jcf_path_classpath_arg, jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*. * jcf-reader.c (get_attribute, jcf_parse_preamble, jcf_parse_constant_pool, jcf_parse_class, jcf_parse_fields, jcf_parse_one_method, jcf_parse_methods, jcf_parse_final_attributes): Add static prototypes. (get_attribute): Constify a char*. * jcf.h (find_class, find_classfile, jcf_dependency_set_target, jcf_dependency_add_target, jcf_path_classpath_arg, jcf_path_CLASSPATH_arg, jcf_path_include_arg): Constify a char*. * jv-scan.c (main): Constify a char*. (gcc_obstack_init): Add prototype arguments. * jvgenmain.c (gcc_obstack_init): Likewise. (main): Constify a char*. * lang.c (put_decl_string, put_decl_node, java_dummy_print): Add static prototypes. (put_decl_string, lang_print_error): Constify a char*. (lang_init): Remove redundant extern prototype. * mangle.c (emit_unicode_mangled_name): Constify a char*. * typeck.c (convert_ieee_real_to_integer, parse_signature_type): Add static prototypes. (get_type_from_signature): Constify a char*. * verify.c (check_pending_block, type_stack_dup, start_pc_cmp ): Add static prototypes. (start_pc_cmp): Prefer PTR over GENERIC_PTR. (verify_jvm_instructions): Constify a char*. * xref.c (xref_flag_value): Likewise. * xref.h (xref_flag_value): Likewise. * zextract.c (makeword, makelong): Add static prototypes. (makeword, makelong): Constify a uch*. From-SVN: r28648
Diffstat (limited to 'gcc/java/jcf-dump.c')
-rw-r--r--gcc/java/jcf-dump.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/gcc/java/jcf-dump.c b/gcc/java/jcf-dump.c
index a26a6fb..676a751 100644
--- a/gcc/java/jcf-dump.c
+++ b/gcc/java/jcf-dump.c
@@ -82,12 +82,15 @@ static void print_access_flags PROTO ((FILE *, uint16, char));
static void print_constant_terse PROTO ((FILE*, JCF*, int, int));
static void print_constant PROTO ((FILE *, JCF *, int, int));
static void print_constant_ref PROTO ((FILE *, JCF *, int));
-static void disassemble_method PROTO ((JCF*, unsigned char *, int));
+static void disassemble_method PROTO ((JCF*, const unsigned char *, int));
static void print_name PROTO ((FILE*, JCF*, int));
static void print_signature PROTO ((FILE*, JCF*, int, int));
static int utf8_equal_string PROTO ((struct JCF*, int, const char *));
static int usage PROTO ((void));
static void process_class PROTO ((struct JCF *));
+static void print_constant_pool PROTO ((struct JCF *));
+static void print_exception_table PROTO ((struct JCF *,
+ const unsigned char *entries, int));
#define PRINT_SIGNATURE_RESULT_ONLY 1
#define PRINT_SIGNATURE_ARGS_ONLY 2
@@ -482,7 +485,7 @@ DEFUN(print_constant, (out, jcf, index, verbosity),
break;
case CONSTANT_Utf8:
{
- register unsigned char *str = JPOOL_UTF_DATA (jcf, index);
+ register const unsigned char *str = JPOOL_UTF_DATA (jcf, index);
int length = JPOOL_UTF_LENGTH (jcf, index);
if (verbosity > 0)
{ /* Print as 8-bit bytes. */
@@ -503,7 +506,7 @@ DEFUN(print_constant, (out, jcf, index, verbosity),
}
}
-void
+static void
DEFUN(print_constant_pool, (jcf),
JCF *jcf)
{
@@ -630,13 +633,13 @@ DEFUN(print_signature, (stream, jcf, signature_index, int options),
static void
DEFUN(print_exception_table, (jcf, entries, count),
- JCF *jcf AND unsigned char *entries AND int count)
+ JCF *jcf AND const unsigned char *entries AND int count)
{
/* Print exception table. */
int i = count;
if (i > 0)
{
- unsigned char *ptr = entries;
+ const unsigned char *ptr = entries;
fprintf (out, "Exceptions (count: %d):\n", i);
for (; --i >= 0; ptr+= 8)
{
@@ -726,7 +729,7 @@ DEFUN(main, (argc, argv),
for (argi = 1; argi < argc; argi++)
{
- char *arg = argv[argi];
+ const char *arg = argv[argi];
if (arg[0] != '-' || ! strcmp (arg, "--"))
break;
@@ -802,7 +805,7 @@ DEFUN(main, (argc, argv),
for (; argi < argc; argi++)
{
char *arg = argv[argi];
- char* class_filename = find_class (arg, strlen (arg), jcf, 0);
+ const char *class_filename = find_class (arg, strlen (arg), jcf, 0);
if (class_filename == NULL)
class_filename = find_classfile (arg, jcf, NULL);
if (class_filename == NULL)
@@ -816,7 +819,7 @@ DEFUN(main, (argc, argv),
long compressed_size, member_size;
int compression_method, filename_length, extra_length;
int general_purpose_bits;
- char *filename;
+ const char *filename;
int total_length;
if (flag_print_class_info)
fprintf (out, "Reading classes from archive %s.\n",
@@ -910,7 +913,7 @@ DEFUN(main, (argc, argv),
static void
DEFUN(disassemble_method, (jcf, byte_ops, len),
- JCF* jcf AND unsigned char *byte_ops AND int len)
+ JCF* jcf AND const unsigned char *byte_ops AND int len)
{
#undef AND /* Causes problems with opcodes for iand and land. */
#undef PTR
@@ -999,7 +1002,7 @@ DEFUN(disassemble_method, (jcf, byte_ops, len),
#define ARRAY_NEW(TYPE) ARRAY_NEW_##TYPE
#define ARRAY_NEW_NUM \
INT_temp = IMMEDIATE_u1; \
- { char *str; \
+ { const char *str; \
switch (INT_temp) { \
case 4: str = "boolean"; break; \
case 5: str = "char"; break; \