mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 14:09:17 +02:00
Fix compilation of graph unit for msdos OS target
git-svn-id: trunk@36630 -
This commit is contained in:
parent
4882b802ae
commit
91995c004c
@ -227,7 +227,13 @@ end;
|
|||||||
function unpack(buf: pchar; index: smallint; var Stroke: TStrokes): smallint;
|
function unpack(buf: pchar; index: smallint; var Stroke: TStrokes): smallint;
|
||||||
|
|
||||||
var
|
var
|
||||||
|
{$ifdef CPU16}
|
||||||
|
{ TStrokes is too big for small MSDOS Stacks,
|
||||||
|
use individual TStroke instead }
|
||||||
|
spo : TStroke;
|
||||||
|
{$else}
|
||||||
po: TStrokes;
|
po: TStrokes;
|
||||||
|
{$endif}
|
||||||
num_ops: smallint;
|
num_ops: smallint;
|
||||||
opcode, i, opc: word;
|
opcode, i, opc: word;
|
||||||
counter: smallint;
|
counter: smallint;
|
||||||
@ -251,12 +257,20 @@ end;
|
|||||||
|
|
||||||
for i:=0 to num_ops-1 do { /* For each opcode in buffer */ }
|
for i:=0 to num_ops-1 do { /* For each opcode in buffer */ }
|
||||||
Begin
|
Begin
|
||||||
|
{$ifdef CPU16}
|
||||||
|
opc := decode(buf[counter], buf[counter+1], Stroke[lindex].x, Stroke[lindex].y); {* Decode the data field *}
|
||||||
|
inc(counter,2);
|
||||||
|
Stroke[lindex].opcode := opc;
|
||||||
|
{$else}
|
||||||
opc := decode(buf[counter], buf[counter+1], po[lindex].x, po[lindex].y); {* Decode the data field *}
|
opc := decode(buf[counter], buf[counter+1], po[lindex].x, po[lindex].y); {* Decode the data field *}
|
||||||
inc(counter,2);
|
inc(counter,2);
|
||||||
po[lindex].opcode := opc; {* Save the opcode *}
|
po[lindex].opcode := opc; {* Save the opcode *}
|
||||||
|
{$endif}
|
||||||
Inc(lindex);
|
Inc(lindex);
|
||||||
end;
|
end;
|
||||||
|
{$ifndef CPU16}
|
||||||
Stroke:=po;
|
Stroke:=po;
|
||||||
|
{$endif}
|
||||||
unpack := num_ops; {* return OPS count *}
|
unpack := num_ops; {* return OPS count *}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user