mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 22:29:28 +02:00
- generate_pascii which is obsolete
This commit is contained in:
parent
3cbe7749c6
commit
c1b0142c1a
@ -152,23 +152,8 @@ unit hcodegen;
|
||||
{ searches the lowest label }
|
||||
function case_get_min(root : pcaserecord) : longint;
|
||||
|
||||
{ concates/inserts the ASCII string to the data segment }
|
||||
procedure generate_ascii(a : paasmoutput;const hs : string);
|
||||
{ concates/inserts the ASCII string from pchar to the data segment }
|
||||
{ WARNING : if hs has no #0 and strlen(hs)=length }
|
||||
{ the terminal zero is not written }
|
||||
procedure generate_pascii(a : paasmoutput;hs : pchar;length : longint);
|
||||
|
||||
{ convert/concats a label for constants in the consts section }
|
||||
{ function constlabel2str(l : plabel;ctype:tconsttype):string;
|
||||
function constlabelnb2str(pnb : longint;ctype:tconsttype):string;
|
||||
procedure concat_constlabel(p:plabel;ctype:tconsttype); }
|
||||
|
||||
{ to be able to force to have a global label for const }
|
||||
const
|
||||
make_const_global : boolean = false;
|
||||
|
||||
var
|
||||
make_const_global : boolean;
|
||||
temptoremove : plinkedlist;
|
||||
|
||||
implementation
|
||||
@ -344,23 +329,6 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
String Helpers
|
||||
*****************************************************************************}
|
||||
|
||||
procedure generate_ascii(a : paasmoutput;const hs : string);
|
||||
begin
|
||||
a^.concat(new(pai_string,init(hs)))
|
||||
end;
|
||||
|
||||
|
||||
procedure generate_pascii(a : paasmoutput;hs : pchar;length : longint);
|
||||
begin
|
||||
if assigned(hs) then
|
||||
a^.concat(new(pai_string,init_length_pchar(hs,length)));
|
||||
end;
|
||||
|
||||
|
||||
{*****************************************************************************
|
||||
TTempToDestroy
|
||||
*****************************************************************************}
|
||||
@ -376,7 +344,10 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.21 1998-11-04 10:11:38 peter
|
||||
Revision 1.22 1998-11-16 12:12:21 peter
|
||||
- generate_pascii which is obsolete
|
||||
|
||||
Revision 1.21 1998/11/04 10:11:38 peter
|
||||
* ansistring fixes
|
||||
|
||||
Revision 1.20 1998/10/29 15:42:48 florian
|
||||
|
@ -190,7 +190,7 @@ unit ptconst;
|
||||
begin
|
||||
getmem(ca,p^.length+2);
|
||||
move(p^.value_str^,ca^,p^.length+1);
|
||||
generate_pascii(consts,ca,p^.length+1);
|
||||
consts^.concat(new(pai_string,init_length_pchar(ca,p^.length+1)));
|
||||
end
|
||||
else
|
||||
if is_constcharnode(p) then
|
||||
@ -321,8 +321,9 @@ unit ptconst;
|
||||
datasegment^.concat(new(pai_const,init_8bit(strlength)));
|
||||
{ this can also handle longer strings }
|
||||
getmem(ca,strlength+1);
|
||||
move(p^.value_str^,ca^,strlength+1);
|
||||
generate_pascii(datasegment,ca,strlength);
|
||||
move(p^.value_str^,ca^,strlength);
|
||||
ca[strlength]:=#0;
|
||||
datasegment^.concat(new(pai_string,init_length_pchar(ca,strlength)));
|
||||
end
|
||||
else if is_constcharnode(p) then
|
||||
begin
|
||||
@ -339,7 +340,7 @@ unit ptconst;
|
||||
fillchar(ca[0],def^.size-strlength-1,' ');
|
||||
ca[def^.size-strlength-1]:=#0;
|
||||
{ this can also handle longer strings }
|
||||
generate_pascii(datasegment,ca,def^.size-strlength-1);
|
||||
datasegment^.concat(new(pai_string,init_length_pchar(ca,def^.size-strlength-1)));
|
||||
end;
|
||||
end;
|
||||
{$ifdef UseLongString}
|
||||
@ -388,17 +389,13 @@ unit ptconst;
|
||||
{ redondent with maxlength but who knows ... (PM) }
|
||||
{ third write use count (set to -1 for safety ) }
|
||||
consts^.concat(new(pai_const,init_32bit(-1)));
|
||||
{ not longer necessary, because it insert_indata
|
||||
if assigned(sym) then
|
||||
sym^.really_insert_in_data;
|
||||
}
|
||||
consts^.concat(new(pai_label,init(ll)));
|
||||
if p^.treetype=stringconstn then
|
||||
begin
|
||||
getmem(ca,strlength+1);
|
||||
move(p^.value_str^,ca^,strlength);
|
||||
ca[strlength]:=#0;
|
||||
generate_pascii(consts,ca,strlength);
|
||||
consts^.concat(new(pai_string,init_length_pchar(ca,strlength)));
|
||||
end
|
||||
else if is_constcharnode(p) then
|
||||
begin
|
||||
@ -626,7 +623,10 @@ unit ptconst;
|
||||
end.
|
||||
{
|
||||
$Log$
|
||||
Revision 1.26 1998-11-10 17:53:06 peter
|
||||
Revision 1.27 1998-11-16 12:12:23 peter
|
||||
- generate_pascii which is obsolete
|
||||
|
||||
Revision 1.26 1998/11/10 17:53:06 peter
|
||||
* fixed const string
|
||||
|
||||
Revision 1.25 1998/11/10 16:10:47 peter
|
||||
|
Loading…
Reference in New Issue
Block a user