diff options
author | Ulf Carlsson <ulfc@engr.sgi.com> | 2000-06-14 04:58:50 +0000 |
---|---|---|
committer | Ulf Carlsson <ulfc@engr.sgi.com> | 2000-06-14 04:58:50 +0000 |
commit | c06ae4f232e6e2b3d3062ffc5bce2b4477cb388a (patch) | |
tree | f3e46abbcf8c111a4b9e81044ef6b9221fd1e743 /gas | |
parent | 20348649cc46f313dfd80f168eb4679d77b34dd8 (diff) | |
download | fsf-binutils-gdb-c06ae4f232e6e2b3d3062ffc5bce2b4477cb388a.zip fsf-binutils-gdb-c06ae4f232e6e2b3d3062ffc5bce2b4477cb388a.tar.gz fsf-binutils-gdb-c06ae4f232e6e2b3d3062ffc5bce2b4477cb388a.tar.bz2 |
2000-06-13 Ulf Carlsson <ulfc@engr.sgi.com>
* macro.c (getstring): Make it possible to escape the quote
character.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/macro.c | 11 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index f305b25..98e8ec1 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2000-06-13 Ulf Carlsson <ulfc@engr.sgi.com> + + * macro.c (getstring): Make it possible to escape the quote + character. + Tue Jun 13 20:58:28 2000 Catherine Moore <clm@redhat.com> * config/tc-hppa.c (pa_export): Weak symbols can be global. diff --git a/gas/macro.c b/gas/macro.c index df01bc5..3a0b612 100644 --- a/gas/macro.c +++ b/gas/macro.c @@ -304,14 +304,25 @@ getstring (idx, in, acc) else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'') { char tchar = in->ptr[idx]; + int escaped = 0; idx++; while (idx < in->len) { + if (in->ptr[idx-1] == '\\') + escaped ^= 1; + else + escaped = 0; + if (macro_alternate && in->ptr[idx] == '!') { idx++ ; sb_add_char (acc, in->ptr[idx++]); } + else if (escaped && in->ptr[idx] == tchar) + { + sb_add_char (acc, tchar); + idx++; + } else { if (in->ptr[idx] == tchar) |