[fpc-devel] Graph unit under Go32V2

borsa77 at libero.it borsa77 at libero.it
Mon Jan 22 21:34:36 CET 2007

I send a patch in attachement to the Graph unit for the 2.0.4 version under Go32V2 platform that make possible compile and almost running properly the following example: 
program dawn; 
uses graph; 
var gd,gm:integer; 
if graphresult<>grok then 
There's a problem in the out of centre of the rectangle, I have also recognized the same thing in the mandel.pp demo. 
What this patch does: 
- FirstPlane and VGA's constant becomes typed; 
- general preservation of CPU registers in the assembler block; 
- it changes the type of ScrOfs in the VLine16 procedure; 
- it fixes all the variable in the assembler block by reference; 
- in the SaveState procedures it avoids to restore after saving; 
- it moves the check of SavePtr from procedure RestoreState to freeSaveStateBuffer, in any way if it is null a RE 203 has occurred; 
- it initializes SavePtr in the procedure QueryAdapterInfo for the program that do not call InitGraph where CloseGraph is at the end by default; 
- it assigned the return value to the procedure QueryAdapterInfo, even do not seem to be used; 
- it fixes the type of the parameter of the system procedure 
- in the vesa.inc file it removes the double deallocation of 
SavePtr in the procedure RestoreState; 
- in the modes.inc file it fixes the leak of elements in the 
newModeList and the final pointer in the ModeList. 
PS: I see now that the last source code for graph.pp file is revision 5862 and my patch applies to 2.0.4, how do we solve? 
If it is accepted the simplest way should be to remove r5862 and reincorporate it by hand, I may make myself such. 
Greetings, Marco. 

Vendi qualcosa? AdBoom.it pubblica i tuoi annunci su 4 siti in 45 secondi GRATIS!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: graph.diff
Type: application/octet-stream
Size: 44334 bytes
Desc: not available
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20070122/c43e7ed8/attachment.obj>

More information about the fpc-devel mailing list