aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf-parse.c
diff options
context:
space:
mode:
authorElliot Lee <sopwith@redhat.com>2004-08-16 11:49:22 +0000
committerAndrew Haley <aph@gcc.gnu.org>2004-08-16 11:49:22 +0000
commitf699e4541433ca9c8af8a4cad64d7a859b9fc782 (patch)
tree40ca20d9d3e98bdb2b62f5475db240c6535ebef1 /gcc/java/jcf-parse.c
parent4c46b835dcf63e89868c9b1099693ea3b2906a62 (diff)
downloadgcc-f699e4541433ca9c8af8a4cad64d7a859b9fc782.zip
gcc-f699e4541433ca9c8af8a4cad64d7a859b9fc782.tar.gz
gcc-f699e4541433ca9c8af8a4cad64d7a859b9fc782.tar.bz2
re PR java/9677 (File not found if spaces in file name)
2004-08-16 Elliot Lee <sopwith@redhat.com> PR java/9677 * jcf-parse.c (java_parse_file): Handle filenames with embedded spaces, and quoted filelists. From-SVN: r86051
Diffstat (limited to 'gcc/java/jcf-parse.c')
-rw-r--r--gcc/java/jcf-parse.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index d62b1b8..cb4853f 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -897,7 +897,8 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
char *list, *next;
tree node;
FILE *finput = NULL;
-
+ int in_quotes = 0;
+
if (flag_filelist_file)
{
int avail = 2000;
@@ -940,8 +941,9 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
for (next = list; ; )
{
char ch = *next;
- if (ch == '\n' || ch == '\r' || ch == '\t' || ch == ' '
- || ch == '&' /* FIXME */)
+ if (flag_filelist_file && ! in_quotes
+ && (ch == '\n' || ch == '\r' || ch == '\t' || ch == ' '
+ || ch == '&') /* FIXME */)
{
if (next == list)
{
@@ -955,6 +957,15 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
break;
}
}
+ if (flag_filelist_file && ch == '"')
+ {
+ in_quotes = ! in_quotes;
+ *next++ = '\0';
+ if (in_quotes)
+ list = next;
+ else
+ break;
+ }
if (ch == '\0')
{
next = NULL;