Remove 255-byte limit on the length of literal strings. 20100529040502/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 29 May 2010 03:35:28 +0000 (20:35 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 29 May 2010 03:35:43 +0000 (20:35 -0700)
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 <el@lisse.NA>.

doc/language.texi
src/language/lexer/lexer.c

index 19c9a6b9dc72593d76ec80ba7ba4722bf71e3772..d117a0eeb0e2cd75d7aa5ec03b6c495ee5a6d384 100644 (file)
@@ -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},
index 1c35642f874daa9ef8447522af7428a34f89d023..317aac73e66354ad12e4c20bd69abcf1a223159a 100644 (file)
@@ -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;
 }
 \f