diff --git a/CCommon.pas b/CCommon.pas index 07aed11..9ffa432 100644 --- a/CCommon.pas +++ b/CCommon.pas @@ -78,7 +78,7 @@ const maxLine = 255; {max length of a line} maxPath = 255; {max length of a path name} {NOTE: maxPath is used in Scanner.asm} - longstringlen = 4000; {max length of a string constant} + longstringlen = 32760; {max length of a string constant} minChar = 0; {min ordinal value of source character} maxChar = 255; {max ordinal value of source character} diff --git a/Scanner.pas b/Scanner.pas index 314ed9b..86a78ab 100644 --- a/Scanner.pas +++ b/Scanner.pas @@ -4388,17 +4388,17 @@ procedure NextToken; label 1,2,3,4,5,6; type - three = (s100,s1000,s4000); {these declarations are used for a} + three = (s100,s1000,sMAX); {these declarations are used for a} gstringPtr = ^gstringRecord; { variable length string record } gstringRecord = record case three of - s100: (len1: integer; + s100: (len1: integer; str1: packed array[1..100] of char; ); s1000: (len2: integer; str2: packed array[1..1000] of char; ); - s4000: (len3: integer; + sMAX: (len3: integer; str3: packed array[1..longstringlen] of char; ); end; @@ -5000,7 +5000,7 @@ case charKinds[ord(ch)] of end {if} else if i = 1001 then begin sPtr^.len2 := 1000; - new(tsPtr,s4000); + new(tsPtr,sMAX); CopyLongString(pointer(tsPtr), pointer(sPtr)); dispose(sPtr); sPtr := tsPtr; @@ -5021,7 +5021,7 @@ case charKinds[ord(ch)] of Error(167); end; {if} i := 1; - new(sPtr,s4000); + new(sPtr,sMAX); while not (charKinds[ord(ch)] in [ch_string,ch_eol,ch_eof]) do begin if i > longstringlen-8 then begin {leave space for char and null} i := 1; diff --git a/cc.notes b/cc.notes index 8a9cd8f..6836e08 100644 --- a/cc.notes +++ b/cc.notes @@ -120,7 +120,7 @@ Character and string constants may now have prefixes indicating they should use p. 238 -The limit on the total length of string constants in a single function has been raised to 12500 characters. +The limit on the length of a single string constant is now 32760 bytes. The limit on the total length of string constants in a single function is now 12500 bytes (larger string constants can be used to initialize static arrays). p. 239