Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-04

Graph unit under Go32v2

3 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Hi, I have splitted the previous patch about graph unit under Go32v2 and reapplyied to the trunk branch. This chunk focuses only on saving information of the destroyed registers. If you accept it, I will look through the others points on a cumulative basis.
Regards, Marco.

The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: graph.diff
Date: 28 Apr 2007, 17:24
Size: 17364 bytes.
Type: Unknown

Reply by email

Tomas Hajny
to Unknown author

On 28 Apr 07, at 17:45, wrote:

Hi Marco,

Hi, I have splitted the previous patch about graph unit under Go32v2 and reapplyied to the trunk branch. This chunk focuses only on saving information of the destroyed registers. If you accept it, I will look through the others points on a cumulative basis.

Well, I modified it little bit (removed
unnecessary pushing of fs selector around code
not changing it) and applied the rest.

Before doing further changes, I'd suggest you to
create a test program allowing to check proper
function of the individual routines - this would
allow both to check what's broken and what not
(i.e. what needs to be fixed) and avoid breaking
working code.

Tomas

Reply by email

Unknown author
to Tomas Hajny

I completed the extraction from the old patch, the survival issues are in the new one in attachement which applies on the trunk. Here the changes: i) it is moved the safe check of SavePtr apart assigned() function from unnecessary ( RestoreState functions) to really necessary (freeSaveStateBuffer procedure);
ii) it is avoid a potential twice in deallocation of SavePtr in the RestoreStateVESA functions, I tested with

program exploit1;
uses graph;
var gd,gm,err:integer;
begin
gd:=d16bit;
gm:=m320x200;
initgraph(gd,gm,'');
err:=graphresult;
if errgrok then
begin
writeln(grapherrormsg(err));
halt;
end;
closegraph;
end.

although before and after never causes a rte216 as there's the check on SavePtr,
iii) it is passed the correct type in the Global_Dos_Free function, accordingly to the FPC manual,
iv) it is moved the initialization of SavePtr to the QueryAdapterInfo function to prevent error in the lack of the call of InitGraph, like in

program exploit2;
uses graph;
begin
closegraph;
end.

although before and after works for the automatic initialization of the compiler.
Greetings, Marco.

The following section of this message contains a file attachment prepared for transmission using the Internet MIME message format. If you are using Pegasus Mail, or any other MIME-compliant system, you should be able to save it or view it from within your mailer. If you cannot, please ask your system administrator for assistance.

---- File information -----------
File: graph.diff
Date: 12 Jun 2007, 15:04
Size: 4356 bytes.
Type: Unknown

Reply by email