mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 05:59:08 +02:00
* bugfix for multiline string constants
This commit is contained in:
parent
4a0a19d733
commit
ea51b18d9b
@ -503,7 +503,7 @@ implementation
|
|||||||
begin
|
begin
|
||||||
AsmWrite(#9#9'DB'#9);
|
AsmWrite(#9#9'DB'#9);
|
||||||
quoted:=false;
|
quoted:=false;
|
||||||
for i:=counter to counter+line_length do
|
for i:=counter to counter+line_length-1 do
|
||||||
begin
|
begin
|
||||||
{ it is an ascii character. }
|
{ it is an ascii character. }
|
||||||
if (ord(tai_string(hp).str[i])>31) and
|
if (ord(tai_string(hp).str[i])>31) and
|
||||||
@ -534,6 +534,7 @@ implementation
|
|||||||
counter := counter+line_length;
|
counter := counter+line_length;
|
||||||
end; { end for j:=0 ... }
|
end; { end for j:=0 ... }
|
||||||
{ do last line of lines }
|
{ do last line of lines }
|
||||||
|
if counter<tai_string(hp).len then
|
||||||
AsmWrite(#9#9'DB'#9);
|
AsmWrite(#9#9'DB'#9);
|
||||||
quoted:=false;
|
quoted:=false;
|
||||||
for i:=counter to tai_string(hp).len-1 do
|
for i:=counter to tai_string(hp).len-1 do
|
||||||
@ -882,7 +883,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.46 2004-02-27 10:21:05 florian
|
Revision 1.47 2004-03-17 12:03:00 olle
|
||||||
|
* bugfix for multiline string constants
|
||||||
|
|
||||||
|
Revision 1.46 2004/02/27 10:21:05 florian
|
||||||
* top_symbol killed
|
* top_symbol killed
|
||||||
+ refaddr to treference added
|
+ refaddr to treference added
|
||||||
+ refsymbol to treference added
|
+ refsymbol to treference added
|
||||||
|
@ -942,12 +942,12 @@ var
|
|||||||
lines := tai_string(hp).len div line_length;
|
lines := tai_string(hp).len div line_length;
|
||||||
{ separate lines in different parts }
|
{ separate lines in different parts }
|
||||||
if tai_string(hp).len > 0 then
|
if tai_string(hp).len > 0 then
|
||||||
Begin
|
begin
|
||||||
for j := 0 to lines-1 do
|
for j := 0 to lines-1 do
|
||||||
begin
|
begin
|
||||||
AsmWrite(#9'dc.b'#9);
|
AsmWrite(#9'dc.b'#9);
|
||||||
quoted:=false;
|
quoted:=false;
|
||||||
for i:=counter to counter+line_length do
|
for i:=counter to counter+line_length-1 do
|
||||||
begin
|
begin
|
||||||
{ it is an ascii character. }
|
{ it is an ascii character. }
|
||||||
if (ord(tai_string(hp).str[i])>31) and
|
if (ord(tai_string(hp).str[i])>31) and
|
||||||
@ -975,10 +975,12 @@ var
|
|||||||
end;
|
end;
|
||||||
end; { end for i:=0 to... }
|
end; { end for i:=0 to... }
|
||||||
if quoted then AsmWrite('''');
|
if quoted then AsmWrite('''');
|
||||||
AsmWrite(target_info.newline);
|
AsmLn;
|
||||||
counter := counter+line_length;
|
counter := counter+line_length;
|
||||||
end; { end for j:=0 ... }
|
end; { end for j:=0 ... }
|
||||||
|
|
||||||
{ do last line of lines }
|
{ do last line of lines }
|
||||||
|
if counter < tai_string(hp).len then
|
||||||
AsmWrite(#9'dc.b'#9);
|
AsmWrite(#9'dc.b'#9);
|
||||||
quoted:=false;
|
quoted:=false;
|
||||||
for i:=counter to tai_string(hp).len-1 do
|
for i:=counter to tai_string(hp).len-1 do
|
||||||
@ -987,7 +989,8 @@ var
|
|||||||
if (ord(tai_string(hp).str[i])>31) and
|
if (ord(tai_string(hp).str[i])>31) and
|
||||||
(ord(tai_string(hp).str[i])<128) and
|
(ord(tai_string(hp).str[i])<128) and
|
||||||
(tai_string(hp).str[i]<>'''') and
|
(tai_string(hp).str[i]<>'''') and
|
||||||
(tai_string(hp).str[i]<>'\') then begin
|
(tai_string(hp).str[i]<>'\') then
|
||||||
|
begin
|
||||||
if not(quoted) then
|
if not(quoted) then
|
||||||
begin
|
begin
|
||||||
if i>counter then
|
if i>counter then
|
||||||
@ -1359,7 +1362,10 @@ initialization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.33 2004-03-02 00:57:01 olle
|
Revision 1.34 2004-03-17 12:03:31 olle
|
||||||
|
* bugfix for multiline string constants
|
||||||
|
|
||||||
|
Revision 1.33 2004/03/02 00:57:01 olle
|
||||||
+ adding missing log msg: misc fixes
|
+ adding missing log msg: misc fixes
|
||||||
|
|
||||||
Revision 1.32 2004/03/02 00:36:33 olle
|
Revision 1.32 2004/03/02 00:36:33 olle
|
||||||
|
Loading…
Reference in New Issue
Block a user