diff options
author | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-05-09 07:00:44 +0000 |
---|---|---|
committer | rms <rms@138bc75d-0d04-0410-961f-82ee72b054a4> | 1992-05-09 07:00:44 +0000 |
commit | 5e3dea2b290e513ad99da2d35bcd5acc8e479d04 (patch) | |
tree | b9c8d53638aefdbe9a3932947ee2682b0f21aede /gcc/rtl.c | |
parent | 99b0f1208db5bb0f5355ed0bc217743a6e65e252 (diff) | |
download | gcc-5e3dea2b290e513ad99da2d35bcd5acc8e479d04.tar.gz |
*** empty log message ***
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@945 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r-- | gcc/rtl.c | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c index dc9e2187a6f..7d7d73abf16 100644 --- a/gcc/rtl.c +++ b/gcc/rtl.c @@ -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) { |