diff options
author | Nick Clifton <nickc@redhat.com> | 2000-06-25 17:59:22 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2000-06-25 17:59:22 +0000 |
commit | 1994a7c76c7cb0c013596cc97202aa6aa7dacbb2 (patch) | |
tree | c2ad37dbf3d2894daf7d7f9a896cea38f04d1bec /gas/macro.c | |
parent | 590a2450f15d88ee8491c0819ae21f3d7627d9c8 (diff) | |
download | gdb-1994a7c76c7cb0c013596cc97202aa6aa7dacbb2.zip gdb-1994a7c76c7cb0c013596cc97202aa6aa7dacbb2.tar.gz gdb-1994a7c76c7cb0c013596cc97202aa6aa7dacbb2.tar.bz2 |
Fix spelling typos.
Remove use of DEFUN().
Diffstat (limited to 'gas/macro.c')
-rw-r--r-- | gas/macro.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/gas/macro.c b/gas/macro.c index 3a0b612..a8a0ae4 100644 --- a/gas/macro.c +++ b/gas/macro.c @@ -305,7 +305,9 @@ getstring (idx, in, acc) { char tchar = in->ptr[idx]; int escaped = 0; + idx++; + while (idx < in->len) { if (in->ptr[idx-1] == '\\') @@ -315,24 +317,29 @@ getstring (idx, in, acc) if (macro_alternate && in->ptr[idx] == '!') { - idx++ ; - sb_add_char (acc, in->ptr[idx++]); + idx ++; + + sb_add_char (acc, in->ptr[idx]); + + idx ++; } else if (escaped && in->ptr[idx] == tchar) { sb_add_char (acc, tchar); - idx++; + idx ++; } else { if (in->ptr[idx] == tchar) { - idx++; + idx ++; + if (idx >= in->len || in->ptr[idx] != tchar) break; } + sb_add_char (acc, in->ptr[idx]); - idx++; + idx ++; } } } |