X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Flexer%2Flexer.c;h=9f9e433815ef5bbb6a2219e619c549e31d307929;hb=f89de8c330e8f82f0e7195c4d35588cfcbdd02fc;hp=452eb7e7beee0ca91471022b42ecf3cd8c05d9ea;hpb=e070d7ddf78446b9852c61c9af84ad3659bac3b3;p=pspp-builds.git diff --git a/src/language/lexer/lexer.c b/src/language/lexer/lexer.c index 452eb7e7..9f9e4338 100644 --- a/src/language/lexer/lexer.c +++ b/src/language/lexer/lexer.c @@ -1067,6 +1067,9 @@ convert_numeric_string_to_char_string (enum string_type type) static int parse_string (enum string_type type) { + if (type != CHARACTER_STRING) + prog++; + /* Accumulate the entire string, joining sections indicated by + signs. */ for (;;) @@ -1160,24 +1163,6 @@ finish: ds_truncate (&tokstr, 255); } - { - /* FIXME. */ - size_t i; - int warned = 0; - - for (i = 0; i < ds_length (&tokstr); i++) - if (ds_cstr (&tokstr)[i] == 0) - { - if (!warned) - { - msg (SE, _("Sorry, literal strings may not contain null " - "characters. Replacing with spaces.")); - warned = 1; - } - ds_cstr (&tokstr)[i] = ' '; - } - } - return T_STRING; }