This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Outstanding patches
Ranjit Mathew wrote:
>
> Uggghhh! I just noticed (after posting) that my mailer (Outlook
> Express 6.0) has converted the leading TABs in my ChangeLog
> entries to single spaces! Awfully sorry for this!! (I *swear*
> I used TABs while preparing this - if you wish, I'll repost them
> again, if acceptable, as attachments instead.)
All right, here are both of these patches combined, with some
formatting changes (hopefully for the better), in the "diff -c2p"
format that Andrew prefers and using Netscape Messenger 4.79:
Index: ChangeLog
from Ranjit Mathew <rmathew at hotmail dot com>
* jcf-io.c (opendir_in_zip): Use COMPARE_FILENAMES
instead of strcmp to compare file names.
(compare_path): Likewise.
(memoized_dirlist_lookup_eq): Likewise.
* jcf-parse.c (set_source_filename): Use COMPARE_FILENAMES
instead of strcmp to compare file names.
Use IS_DIR_SEPARATOR instead of directly comparing to
'/' and '\\'.
* jcf-write.c (generate_classfile): Use IS_DIR_SEPARATOR
instead of directly comparing to '/' and '\\'.
Index: jcf-io.c
===================================================================
*** jcf-io.c Sun Mar 9 08:45:46 2003
--- jcf-io.c Sun Mar 9 09:03:30 2003
*************** opendir_in_zip (const char *zipfile, int
*** 113,117 ****
for (zipf = SeenZipFiles; zipf != NULL; zipf = zipf->next)
{
! if (strcmp (zipf->name, zipfile) == 0)
return zipf;
}
--- 113,117 ----
for (zipf = SeenZipFiles; zipf != NULL; zipf = zipf->next)
{
! if (COMPARE_FILENAMES (zipf->name, zipfile) == 0)
return zipf;
}
*************** static int
*** 284,289 ****
compare_path (const void *key, const void *entry)
{
! return strcmp ((const char *) key,
! (*((const struct dirent **) entry))->d_name);
}
--- 284,289 ----
compare_path (const void *key, const void *entry)
{
! return COMPARE_FILENAMES ((const char *) key,
! (*((const struct dirent **) entry))->d_name);
}
*************** static int
*** 318,323 ****
memoized_dirlist_lookup_eq (const void *entry, const void *key)
{
! return strcmp ((const char *) key,
! ((const memoized_dirlist_entry *) entry)->dir) == 0;
}
--- 318,324 ----
memoized_dirlist_lookup_eq (const void *entry, const void *key)
{
! return
! COMPARE_FILENAMES ((const char *) key,
! ((const memoized_dirlist_entry *) entry)->dir) == 0;
}
Index: jcf-parse.c
===================================================================
*** jcf-parse.c Sun Mar 9 08:45:46 2003
--- jcf-parse.c Sun Mar 9 09:07:24 2003
*************** set_source_filename (JCF *jcf, int index
*** 139,145 ****
if it has a directory prefix, but otherwise matches sfname. */
if (old_len > new_len
! && strcmp (sfname, input_filename + old_len - new_len) == 0
! && (input_filename[old_len - new_len - 1] == '/'
! || input_filename[old_len - new_len - 1] == '\\'))
return;
}
--- 139,145 ----
if it has a directory prefix, but otherwise matches sfname. */
if (old_len > new_len
! && COMPARE_FILENAMES (sfname,
! input_filename + old_len - new_len) == 0
! && IS_DIR_SEPARATOR (input_filename[old_len - new_len - 1]))
return;
}
Index: jcf-write.c
===================================================================
*** jcf-write.c Sun Mar 9 08:45:46 2003
--- jcf-write.c Sun Mar 9 09:01:34 2003
*************** generate_classfile (tree clas, struct jc
*** 3094,3098 ****
if (ch == '\0')
break;
! if (ch == '/' || ch == '\\')
source_file = s+1;
}
--- 3094,3098 ----
if (ch == '\0')
break;
! if (IS_DIR_SEPARATOR (ch))
source_file = s+1;
}