From: Ben Pfaff Date: Sat, 29 May 2010 03:35:28 +0000 (-0700) Subject: Remove 255-byte limit on the length of literal strings. X-Git-Tag: v0.7.6~387 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d6e6b3bb69323d1211e34411a8389a7e17f72ec;p=pspp-builds.git Remove 255-byte limit on the length of literal strings. I don't see a reason for this restriction. I think it must date to before support for 32767-byte string variables. Problem reported by Dr Eberhard W Lisse . --- diff --git a/doc/language.texi b/doc/language.texi index 19c9a6b9..d117a0ee 100644 --- a/doc/language.texi +++ b/doc/language.texi @@ -112,8 +112,7 @@ significant inside strings. Strings can be concatenated using @samp{+}, so that @samp{"a" + 'b' + 'c'} is equivalent to @samp{'abc'}. Concatenation is useful for -splitting a single string across multiple source lines. The maximum -length of a string, after concatenation, is 255 characters. +splitting a single string across multiple source lines. Strings may also be expressed as hexadecimal, octal, or binary character values by prefixing the initial quote character by @samp{X}, diff --git a/src/language/lexer/lexer.c b/src/language/lexer/lexer.c index 1c35642f..317aac73 100644 --- a/src/language/lexer/lexer.c +++ b/src/language/lexer/lexer.c @@ -1218,13 +1218,6 @@ finish: if (type != CHARACTER_STRING) convert_numeric_string_to_char_string (lexer, type); - if (ds_length (&lexer->tokstr) > 255) - { - msg (SE, _("String exceeds 255 characters in length (%zu characters)."), - ds_length (&lexer->tokstr)); - ds_truncate (&lexer->tokstr, 255); - } - return T_STRING; }