mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-26 09:47:11 +01:00
* constant sets are now written correctly to the ppufile
This commit is contained in:
parent
6fe91685a0
commit
a30819a8ee
@ -68,9 +68,9 @@
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure writeset(var s); {You cannot pass an array[0..31] of byte!}
|
procedure writenormalset(var s); {You cannot pass an array[0..31] of byte!}
|
||||||
begin
|
begin
|
||||||
current_ppu^.putdata(s,32);
|
current_ppu^.putdata(s,sizeof(tnormalset));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -264,9 +264,9 @@
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure readset(var s); {You cannot pass an array [0..31] of byte.}
|
procedure readnormalset(var s); {You cannot pass an array [0..31] of byte.}
|
||||||
begin
|
begin
|
||||||
current_ppu^.getdata(s,32);
|
current_ppu^.getdata(s,sizeof(tnormalset));
|
||||||
if current_ppu^.error then
|
if current_ppu^.error then
|
||||||
Message(unit_f_ppu_read_error);
|
Message(unit_f_ppu_read_error);
|
||||||
end;
|
end;
|
||||||
@ -694,7 +694,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.9 1998-08-11 15:31:41 peter
|
Revision 1.10 1998-08-13 10:57:30 peter
|
||||||
|
* constant sets are now written correctly to the ppufile
|
||||||
|
|
||||||
|
Revision 1.9 1998/08/11 15:31:41 peter
|
||||||
* write extended to ppu file
|
* write extended to ppu file
|
||||||
* new version 0.99.7
|
* new version 0.99.7
|
||||||
|
|
||||||
|
|||||||
@ -1325,7 +1325,6 @@
|
|||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tconstsym.init(const n : string;t : tconsttype;v : longint;def : pdef);
|
constructor tconstsym.init(const n : string;t : tconsttype;v : longint;def : pdef);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
tsym.init(n);
|
tsym.init(n);
|
||||||
typ:=constsym;
|
typ:=constsym;
|
||||||
@ -1334,12 +1333,11 @@
|
|||||||
value:=v;
|
value:=v;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor tconstsym.load;
|
|
||||||
|
|
||||||
|
constructor tconstsym.load;
|
||||||
var
|
var
|
||||||
pd : pbestreal;
|
pd : pbestreal;
|
||||||
ps : pointer; {***SETCONST}
|
ps : pnormalset;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
tsym.load;
|
tsym.load;
|
||||||
typ:=constsym;
|
typ:=constsym;
|
||||||
@ -1358,38 +1356,43 @@
|
|||||||
pd^:=readreal;
|
pd^:=readreal;
|
||||||
value:=longint(pd);
|
value:=longint(pd);
|
||||||
end;
|
end;
|
||||||
{***SETCONST}
|
|
||||||
constseta : begin
|
constseta : begin
|
||||||
getmem(ps,32);
|
definition:=readdefref;
|
||||||
readset(ps^);
|
new(ps);
|
||||||
|
readnormalset(ps^);
|
||||||
value:=longint(ps);
|
value:=longint(ps);
|
||||||
end;
|
end;
|
||||||
{***}
|
else
|
||||||
else Message1(unit_f_ppu_invalid_entry,tostr(ord(consttype)));
|
Message1(unit_f_ppu_invalid_entry,tostr(ord(consttype)));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
destructor tconstsym.done;
|
destructor tconstsym.done;
|
||||||
begin
|
begin
|
||||||
if consttype = conststring then stringdispose(pstring(value));
|
case consttype of
|
||||||
|
conststring : stringdispose(pstring(value));
|
||||||
|
constreal : dispose(pbestreal(value));
|
||||||
|
constseta : dispose(pnormalset(value));
|
||||||
|
end;
|
||||||
inherited done;
|
inherited done;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function tconstsym.mangledname : string;
|
|
||||||
|
|
||||||
|
function tconstsym.mangledname : string;
|
||||||
begin
|
begin
|
||||||
mangledname:=name;
|
mangledname:=name;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tconstsym.deref;
|
|
||||||
|
|
||||||
|
procedure tconstsym.deref;
|
||||||
begin
|
begin
|
||||||
if consttype=constord then
|
if consttype in [constord,constseta] then
|
||||||
resolvedef(pdef(definition));
|
resolvedef(pdef(definition));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure tconstsym.write;
|
|
||||||
|
|
||||||
|
procedure tconstsym.write;
|
||||||
begin
|
begin
|
||||||
{$ifdef OLDPPU}
|
{$ifdef OLDPPU}
|
||||||
writebyte(ibconstsym);
|
writebyte(ibconstsym);
|
||||||
@ -1406,10 +1409,12 @@
|
|||||||
end;
|
end;
|
||||||
conststring : writestring(pstring(value)^);
|
conststring : writestring(pstring(value)^);
|
||||||
constreal : writereal(pbestreal(value)^);
|
constreal : writereal(pbestreal(value)^);
|
||||||
{***SETCONST}
|
constseta : begin
|
||||||
constseta: writeset(pointer(value)^);
|
writedefref(definition);
|
||||||
{***}
|
writenormalset(pointer(value)^);
|
||||||
else internalerror(13);
|
end;
|
||||||
|
else
|
||||||
|
internalerror(13);
|
||||||
end;
|
end;
|
||||||
{$ifndef OLDPPU}
|
{$ifndef OLDPPU}
|
||||||
current_ppu^.writeentry(ibconstsym);
|
current_ppu^.writeentry(ibconstsym);
|
||||||
@ -1671,7 +1676,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.29 1998-08-11 15:31:42 peter
|
Revision 1.30 1998-08-13 10:57:29 peter
|
||||||
|
* constant sets are now written correctly to the ppufile
|
||||||
|
|
||||||
|
Revision 1.29 1998/08/11 15:31:42 peter
|
||||||
* write extended to ppu file
|
* write extended to ppu file
|
||||||
* new version 0.99.7
|
* new version 0.99.7
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user