jcf-dump.c (main): Updated for change to jcf_path_seal.

* jcf-dump.c (main): Updated for change to jcf_path_seal.
	* gjavah.c (main): Updated for change to jcf_path_seal.
	* lang.c (version_flag): New global.
	(java_decode_option): Recognize `-version'.
	(java_init): Update for change to jcf_path_seal.
	* jcf.h (jcf_path_seal): Added `print' argument.
	* jcf-path.c (jcf_path_seal): Added `print' argument.

From-SVN: r44946
This commit is contained in:
Tom Tromey 2001-08-16 21:52:14 +00:00 committed by Tom Tromey
parent 3c0a5af26c
commit 4266d0b272
6 changed files with 47 additions and 10 deletions

View File

@ -1,3 +1,13 @@
2001-08-16 Tom Tromey <tromey@redhat.com>
* jcf-dump.c (main): Updated for change to jcf_path_seal.
* gjavah.c (main): Updated for change to jcf_path_seal.
* lang.c (version_flag): New global.
(java_decode_option): Recognize `-version'.
(java_init): Update for change to jcf_path_seal.
* jcf.h (jcf_path_seal): Added `print' argument.
* jcf-path.c (jcf_path_seal): Added `print' argument.
2001-08-13 Zack Weinberg <zackw@panix.com>
* Make-lang.in (java/decl.o): Update dependencies.

View File

@ -1,7 +1,7 @@
/* Program to write C++-suitable header files from a Java(TM) .class
file. This is similar to SUN's javah.
Copyright (C) 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1996, 1998, 1999, 2000, 2001 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
@ -2171,7 +2171,7 @@ DEFUN(main, (argc, argv),
usage ();
}
jcf_path_seal ();
jcf_path_seal (verbose);
if (output_file && emit_dependencies)
{

View File

@ -1,7 +1,7 @@
/* Program to dump out a Java(TM) .class file.
Functionally similar to Sun's javap.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 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
@ -902,7 +902,7 @@ DEFUN(main, (argc, argv),
usage ();
}
jcf_path_seal ();
jcf_path_seal (verbose);
if (flag_print_main)
{

View File

@ -1,6 +1,6 @@
/* Handle CLASSPATH, -classpath, and path searching.
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1998, 1999, 2000, 2001 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
@ -311,9 +311,11 @@ jcf_path_include_arg (path)
}
/* We `seal' the path by linking everything into one big list. Then
we provide a way to iterate through the sealed list. */
we provide a way to iterate through the sealed list. If PRINT is
true then we print the final class path to stderr. */
void
jcf_path_seal ()
jcf_path_seal (print)
int print;
{
int do_system = 1;
struct entry *secondary;
@ -351,6 +353,21 @@ jcf_path_seal ()
}
else
free_entry (&sys_dirs);
if (print)
{
struct entry *ent;
fprintf (stderr, "Class path starts here:\n");
for (ent = sealed; ent; ent = ent->next)
{
fprintf (stderr, " %s", ent->name);
if ((ent->flags & FLAG_SYSTEM))
fprintf (stderr, " (system)");
if ((ent->flags & FLAG_ZIP))
fprintf (stderr, " (zip)");
fprintf (stderr, "\n");
}
}
}
void *

View File

@ -1,6 +1,6 @@
/* Utility macros to read Java(TM) .class files and byte codes.
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 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
@ -273,7 +273,7 @@ extern void jcf_path_init PARAMS ((void));
extern void jcf_path_classpath_arg PARAMS ((const char *));
extern void jcf_path_CLASSPATH_arg PARAMS ((const char *));
extern void jcf_path_include_arg PARAMS ((const char *));
extern void jcf_path_seal PARAMS ((void));
extern void jcf_path_seal PARAMS ((int));
extern void *jcf_path_start PARAMS ((void));
extern void *jcf_path_next PARAMS ((void *));
extern char *jcf_path_name PARAMS ((void *));

View File

@ -150,6 +150,9 @@ int flag_force_classes_archive_check;
be tested alone, use STATIC_CLASS_INITIALIZATION_OPTIMIZATION_P instead. */
int flag_optimize_sci = 1;
/* When non zero, print extra version information. */
static int version_flag = 0;
/* Table of language-dependent -f options.
STRING is the option name. VARIABLE is the address of the variable.
ON_VALUE is the value to store in VARIABLE
@ -236,6 +239,13 @@ java_decode_option (argc, argv)
{
char *p = argv[0];
if (strcmp (p, "-version") == 0)
{
version_flag = 1;
/* We return 0 so that the caller can process this. */
return 0;
}
#define CLARG "-fassume-compiled="
if (strncmp (p, CLARG, sizeof (CLARG) - 1) == 0)
{
@ -655,7 +665,7 @@ java_init ()
#endif
jcf_path_init ();
jcf_path_seal ();
jcf_path_seal (version_flag);
decl_printable_name = lang_printable_name;
print_error_function = lang_print_error;