diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2002-06-04 20:32:08 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2002-06-04 20:32:08 +0000 |
commit | c02ebb18348ef5ef1f334bfc9ece21e390f658a0 (patch) | |
tree | a6275d033b57d7601b83e9717938acf4b721796c /gcc/java/jcf-io.c | |
parent | d6ee617dd7edc5cb721ad5cd320c47acd18e7ea8 (diff) | |
download | gcc-c02ebb18348ef5ef1f334bfc9ece21e390f658a0.zip gcc-c02ebb18348ef5ef1f334bfc9ece21e390f658a0.tar.gz gcc-c02ebb18348ef5ef1f334bfc9ece21e390f658a0.tar.bz2 |
java-tree.h, [...]: Remove all #if JAVA_USE_HANDLES blocks...
* java-tree.h, class.c, expr.c, jcf-parse.c, parse.y,
typeck.c, verify.c: Remove all #if JAVA_USE_HANDLES blocks,
all mention of CLASS_TO_HANDLE_TYPE or HANDLE_TO_CLASS_TYPE,
and all now-pointless local variables. Rename other local
variables to reflect their not being handles.
* java-tree.h, jcf-dump.c, jcf-io.c: Remove all
#if JCF_USE_STDIO blocks.
* parse.y: Add missing semicolon at end of rule.
From-SVN: r54261
Diffstat (limited to 'gcc/java/jcf-io.c')
-rw-r--r-- | gcc/java/jcf-io.c | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/gcc/java/jcf-io.c b/gcc/java/jcf-io.c index b228bf5..a1af70a 100644 --- a/gcc/java/jcf-io.c +++ b/gcc/java/jcf-io.c @@ -231,30 +231,6 @@ DEFUN(read_zip_member, (jcf, zipd, zipf), return 0; } -#if JCF_USE_STDIO -const char * -DEFUN(open_class, (filename, jcf, stream, dep_name), - const char *filename AND JCF *jcf AND FILE* stream - AND const char *dep_name) -{ - if (jcf) - { - if (dep_name != NULL) - jcf_dependency_add_file (dep_name, 0); - JCF_ZERO (jcf); - jcf->buffer = NULL; - jcf->buffer_end = NULL; - jcf->read_ptr = NULL; - jcf->read_end = NULL; - jcf->read_state = stream; - jcf->filename = filename; - jcf->filbuf = jcf_filbuf_from_stdio; - } - else - fclose (stream); - return filename; -} -#else const char * DEFUN(open_class, (filename, jcf, fd, dep_name), const char *filename AND JCF *jcf AND int fd AND const char *dep_name) @@ -289,24 +265,16 @@ DEFUN(open_class, (filename, jcf, fd, dep_name), close (fd); return filename; } -#endif const char * DEFUN(find_classfile, (filename, jcf, dep_name), char *filename AND JCF *jcf AND const char *dep_name) { -#if JCF_USE_STDIO - FILE *stream = fopen (filename, "rb"); - if (stream == NULL) - return NULL; - return open_class (arg, jcf, stream, dep_name); -#else int fd = open (filename, O_RDONLY | O_BINARY); if (fd < 0) return NULL; return open_class (filename, jcf, fd, dep_name); -#endif } #if JCF_USE_SCANDIR @@ -461,11 +429,7 @@ DEFUN(find_class, (classname, classname_length, jcf, source_ok), const char *classname AND int classname_length AND JCF *jcf AND int source_ok) { -#if JCF_USE_STDIO - FILE *stream; -#else int fd; -#endif int i, k, java = -1, class = -1; struct stat java_buf, class_buf; char *dep_file; @@ -578,27 +542,6 @@ DEFUN(find_class, (classname, classname_length, jcf, source_ok), dep_file = java_buffer; else dep_file = buffer; -#if JCF_USE_STDIO - if (!class) - { - SOURCE_FRONTEND_DEBUG (("Trying %s", buffer)); - stream = fopen (buffer, "rb"); - if (stream) - goto found; - } - /* Give .java a try, if necessary */ - if (!java) - { - strcpy (buffer, java_buffer); - SOURCE_FRONTEND_DEBUG (("Trying %s", buffer)); - stream = fopen (buffer, "r"); - if (stream) - { - jcf->java_source = 1; - goto found; - } - } -#else if (!class) { SOURCE_FRONTEND_DEBUG ((stderr, "[Class selected: %s]\n", @@ -624,7 +567,6 @@ DEFUN(find_class, (classname, classname_length, jcf, source_ok), goto found; } } -#endif free (buffer); @@ -635,12 +577,6 @@ DEFUN(find_class, (classname, classname_length, jcf, source_ok), return NULL; found: -#if JCF_USE_STDIO - if (jcf->java_source) - return NULL; /* FIXME */ - else - return open_class (buffer, jcf, stream, dep_file); -#else if (jcf->java_source) { JCF_ZERO (jcf); /* JCF_FINISH relies on this */ @@ -652,7 +588,6 @@ DEFUN(find_class, (classname, classname_length, jcf, source_ok), buffer = (char *) open_class (buffer, jcf, fd, dep_file); jcf->classname = xstrdup (classname); return buffer; -#endif } void |