summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-16 11:49:22 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2004-08-16 11:49:22 +0000
commit0750f30d61b075cc98ecfb9d750ff20d1e46bb7c (patch)
tree40ca20d9d3e98bdb2b62f5475db240c6535ebef1
parente0f42093b7ec59ece3ef77310adaaebb5741cd49 (diff)
downloadgcc-0750f30d61b075cc98ecfb9d750ff20d1e46bb7c.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@86051 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/jcf-parse.c17
2 files changed, 20 insertions, 3 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index 493a5f3c2f7..4e0dc7e3de3 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
2004-08-15 Nathan Sidwell <nathan@codesourcery.com>
* boehm.c (get_boehm_type_descriptor): Use build_int_cst.
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index d62b1b8f325..cb4853f4128 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;