diff options
author | Ken Raeburn <raeburn@cygnus> | 1992-12-29 23:53:52 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@cygnus> | 1992-12-29 23:53:52 +0000 |
commit | 6d331d7151afcbe56722acffaf446266778cf629 (patch) | |
tree | d035a7729661585f309def05a6c8373736caa162 | |
parent | 54f1b715e5a6faacc14a74e1929d7caff7e2e811 (diff) | |
download | gdb-6d331d7151afcbe56722acffaf446266778cf629.zip gdb-6d331d7151afcbe56722acffaf446266778cf629.tar.gz gdb-6d331d7151afcbe56722acffaf446266778cf629.tar.bz2 |
app.c (app_push): Use memcpy, not bcopy.
(do_scrub_next_char): For \", return " not '.
(symbol_chars): Now const.
-rw-r--r-- | gas/ChangeLog | 4 | ||||
-rw-r--r-- | gas/app.c | 19 |
2 files changed, 14 insertions, 9 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index 0db37ba..b182c94 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,9 @@ Mon Dec 28 10:32:05 1992 Ken Raeburn (raeburn@cygnus.com) + * app.c (app_push): Use memcpy, not bcopy. + (do_scrub_next_char): For \", return " not '. + (symbol_chars): Now const. + * expr.c (operand): If not LOCAL_LABELS_FB, don't look for "0f" and "0b". If LOCAL_LABELS_DOLLAR, check for "0$". @@ -36,7 +36,7 @@ #endif static char lex[256]; -static char symbol_chars[] = +static const char symbol_chars[] = "$._ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; #define LEX_IS_SYMBOL_COMPONENT 1 @@ -181,7 +181,7 @@ app_push () saved->state = state; saved->old_state = old_state; saved->out_string = out_string; - bcopy (saved->out_buf, out_buf, sizeof (out_buf)); + memcpy (out_buf, saved->out_buf, sizeof (out_buf)); saved->add_newlines = add_newlines; saved->scrub_string = scrub_string; saved->scrub_last_string = scrub_last_string; @@ -210,6 +210,8 @@ app_pop (arg) free (arg); } /* app_pop() */ +/* @@ This assumes that \n &c are the same on host and target. This is not + necessarily true. */ int process_escape (ch) char ch; @@ -229,7 +231,7 @@ process_escape (ch) case '\'': return '\''; case '"': - return '\''; + return '\"'; default: return ch; } @@ -341,9 +343,8 @@ do_scrub_next_char (get, unget) ch = (*get) (); switch (ch) { - /* This is neet. Turn "string - more string" into "string\n more string" - */ + /* Handle strings broken across lines, by turning '\n' into + '\\' and 'n'. */ case '\n': (*unget) ('n'); add_newlines++; @@ -429,9 +430,9 @@ recycle: #endif /* If we're in state 2, we've seen a non-white - character followed by whitespace. If the next - character is ':', this is whitespace after a label - name which we can ignore. */ + character followed by whitespace. If the next + character is ':', this is whitespace after a label + name which we can ignore. */ if (state == 2 && lex[ch] == LEX_IS_COLON) { state = 0; |