aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-08-21 21:03:50 +0000
committerIan Lance Taylor <ian@airs.com>1995-08-21 21:03:50 +0000
commit9821fda9251251db7010f47aa14cf74deae06341 (patch)
treef0c5150ef497f47f7031e467c984ddea063bb7e1 /gas
parentbb8e4e4d95f4b3cf074ab399babc614ab60013c0 (diff)
downloadgdb-9821fda9251251db7010f47aa14cf74deae06341.zip
gdb-9821fda9251251db7010f47aa14cf74deae06341.tar.gz
gdb-9821fda9251251db7010f47aa14cf74deae06341.tar.bz2
* app.c (do_scrub_next_char): If LEX_IS_STRINGQUOTE or
LEX_IS_ONECHAR_QUOTE is seen in state 10, preserve one space.
Diffstat (limited to 'gas')
-rw-r--r--gas/app.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gas/app.c b/gas/app.c
index 9cfece4..09492b4 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -564,7 +564,14 @@ recycle:
break;
case LEX_IS_STRINGQUOTE:
- if (state == 9 || state == 10)
+ if (state == 10)
+ {
+ /* Preserve the whitespace in foo "bar" */
+ (*unget) (ch);
+ state = 3;
+ return ' ';
+ }
+ else if (state == 9)
old_state = 3;
else
old_state = state;
@@ -572,6 +579,13 @@ recycle:
return ch;
#ifndef IEEE_STYLE
case LEX_IS_ONECHAR_QUOTE:
+ if (state == 10)
+ {
+ /* Preserve the whitespace in foo 'b' */
+ (*unget) (ch);
+ state = 3;
+ return ' ';
+ }
ch = GET ();
if (ch == EOF)
{
@@ -599,7 +613,7 @@ recycle:
{
return out_buf[0];
}
- if (state == 9 || state == 10)
+ if (state == 9)
old_state = 3;
else
old_state = state;