diff options
author | Richard Stallman <rms@gnu.org> | 1992-05-09 07:00:44 +0000 |
---|---|---|
committer | Richard Stallman <rms@gnu.org> | 1992-05-09 07:00:44 +0000 |
commit | 2dcb563f6cccc1a1d222e1141c8b15f06798ac97 (patch) | |
tree | b9c8d53638aefdbe9a3932947ee2682b0f21aede /gcc/rtl.c | |
parent | a8031c4edce5929649e0c2558f5a7977cc4b89fa (diff) | |
download | gcc-2dcb563f6cccc1a1d222e1141c8b15f06798ac97.zip gcc-2dcb563f6cccc1a1d222e1141c8b15f06798ac97.tar.gz gcc-2dcb563f6cccc1a1d222e1141c8b15f06798ac97.tar.bz2 |
*** empty log message ***
From-SVN: r945
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r-- | gcc/rtl.c | 32 |
1 files changed, 12 insertions, 20 deletions
@@ -642,36 +642,28 @@ read_rtx (infile) } if (c != '"') dump_and_abort ('"', c, infile); - j = 0; - stringbufsize = 10; - stringbuf = (char *) xmalloc (stringbufsize + 1); while (1) { - if (j >= stringbufsize - 4) + c = getc (infile); /* Read the string */ + if (c == '\\') { - stringbufsize *= 2; - stringbuf = (char *) xrealloc (stringbuf, stringbufsize + 1); - } - stringbuf[j] = getc (infile); /* Read the string */ - if (stringbuf[j] == '\\') - { - stringbuf[j] = getc (infile); /* Read the string */ + c = getc (infile); /* Read the string */ /* \; makes stuff for a C string constant containing newline and tab. */ - if (stringbuf[j] == ';') - { - strcpy (&stringbuf[j], "\\n\\t"); - j += 3; - } + if (c == ';') + obstack_grow (rtl_obstack, "\\n\\t", 4); + else + obstack_1grow (rtl_obstack, c); } - else if (stringbuf[j] == '"') + else if (c == '"') break; - j++; + + obstack_1grow (rtl_obstack, c); } - stringbuf[j] = 0; /* NUL terminate the string */ - stringbuf = (char *) xrealloc (stringbuf, j + 1); + obstack_1grow (rtl_obstack, 0); + stringbuf = (char *) obstack_finish (rtl_obstack); if (saw_paren) { |