From 5d6e6b3bb69323d1211e34411a8389a7e17f72ec Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 28 May 2010 20:35:28 -0700 Subject: [PATCH] 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 . --- doc/language.texi | 3 +-- src/language/lexer/lexer.c | 7 ------- 2 files changed, 1 insertion(+), 9 deletions(-) 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; } -- 2.30.2