mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-12-17 16:18:37 +08:00
2000-06-13 Ulf Carlsson <ulfc@engr.sgi.com>
* macro.c (getstring): Make it possible to escape the quote character.
This commit is contained in:
@@ -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>
|
Tue Jun 13 20:58:28 2000 Catherine Moore <clm@redhat.com>
|
||||||
|
|
||||||
* config/tc-hppa.c (pa_export): Weak symbols can be global.
|
* config/tc-hppa.c (pa_export): Weak symbols can be global.
|
||||||
|
|||||||
11
gas/macro.c
11
gas/macro.c
@@ -304,14 +304,25 @@ getstring (idx, in, acc)
|
|||||||
else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'')
|
else if (in->ptr[idx] == '"' || in->ptr[idx] == '\'')
|
||||||
{
|
{
|
||||||
char tchar = in->ptr[idx];
|
char tchar = in->ptr[idx];
|
||||||
|
int escaped = 0;
|
||||||
idx++;
|
idx++;
|
||||||
while (idx < in->len)
|
while (idx < in->len)
|
||||||
{
|
{
|
||||||
|
if (in->ptr[idx-1] == '\\')
|
||||||
|
escaped ^= 1;
|
||||||
|
else
|
||||||
|
escaped = 0;
|
||||||
|
|
||||||
if (macro_alternate && in->ptr[idx] == '!')
|
if (macro_alternate && in->ptr[idx] == '!')
|
||||||
{
|
{
|
||||||
idx++ ;
|
idx++ ;
|
||||||
sb_add_char (acc, in->ptr[idx++]);
|
sb_add_char (acc, in->ptr[idx++]);
|
||||||
}
|
}
|
||||||
|
else if (escaped && in->ptr[idx] == tchar)
|
||||||
|
{
|
||||||
|
sb_add_char (acc, tchar);
|
||||||
|
idx++;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (in->ptr[idx] == tchar)
|
if (in->ptr[idx] == tchar)
|
||||||
|
|||||||
Reference in New Issue
Block a user