From: Maurice Lombardi Newsgroups: comp.os.msdos.djgpp Subject: Problem with last patch of grx23 Date: Wed, 21 Jun 2000 22:52:40 +0200 Organization: Universite Joseph Fourier - Grenoble 1 Lines: 62 Message-ID: <39512B18.CE67EC4C@ujf-grenoble.fr> NNTP-Posting-Host: knautie.ujf-grenoble.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: amazone.ujf-grenoble.fr 961621833 42831 193.54.234.27 (21 Jun 2000 21:10:33 GMT) X-Complaints-To: abus AT ujf-grenoble DOT fr NNTP-Posting-Date: 21 Jun 2000 21:10:33 GMT X-Mailer: Mozilla 4.7 [fr] (Win98; U) X-Accept-Language: fr,it,en To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com http://www.gnu.de/software/GRX/grx23.update.000520.gz 1 - it is not gzipped 2 - four hunks failed (with respect to the original grx23.zip, no update) in highlow.h grdriver.h makebase.dj and makefile.bcc two (in makebase.dj and makefile.bcc) contain "return return linefeed" instead of "return linefeed" as end of lines dtou solves that the other are cosmetic changes (some extra spaces to align consecutive lines) which seem different between your version of "original" grx23 and the one on simtelnet. The best is probably to make fresh new diffs rather than to try to modify the present diff file. 3 - more seriously, compiling tests on grx23 fails at the first file (arctest.c) for not finding GrLine. The problem seems that the src/bgi/line.c coming from bcc2grx (which is merged now) shadows in the merged library libgrx20.a the src/draw/line.c which comes from the original grx23 (and which contains the function GrLine() ). This was not a problem with the old setup where compiling with -lbcc2 -lgrx20 (for bcc2grx) or simply -lgrx20 for pure grx solved the problem. In fact looking to the output of the "ar -rv" command in the make command I see that indeed bgi/line.o is replaced (flagged r) instead of to be added (a). And the same is true for polygon.o fillpatt.o and fillpoly.o according to the same listing. Since the problem is with the filenames, not with the functions which they contain (the systematic prefix Gr in libgrx avoids that), I have renamed these four files (in src/bgi) as lineb.c polygonb.c fillpatb.c and fillpolb.c and modified accordingly src/stdobjs.mak. All compiles without problem now. All tests run perfectly except for one in bccbgi: the sierpinski test (i.e. the first floodfill test), while the snake test (the second floodfill) works. In looking to floodfill() contained in src/bgi/fldfill.c I see that you have changed the content of that function with respect to old BCC2GRX to call directly grx functions. If I restore the old content by replacing at the beginning of the floodfill() function: #if (GRX_VERSION_API-0)>=0x0225 by #if 0 everything works perfectly. I have not tried to understand further. 4 - A directory grx23/chr containing the .chr files (which are presently in src/bgi) should be included in order that the character tests work (or replace the BGI_PATH in the tests programs, but creating a chr directory analogous to the font directory seems better). 5 - I have tried the pascal tests. They work except for two problems which were already presents in previous versions of grx and bgi2grx. - pascal/bgi/demos/color.pas fails due to an invalid typecast between real and word. Replacing word() by a function realtoword() which rounds the real corrects it. - the polygon tests (DrawPoly and FillPoly) in pascal/bgi/demos/demo.pas fail due to a problem when transferring "open arrays" parameters between pascal and C for recent alphas of gpc. gpc pushes in that case an extra parameter on the stack so that "var Polypoints: array of PointType" in pascal is no more equivalent to "PointType *Polypoints" in C, because C pushes only the address of Polypoints. The trick is to use in the pascal unit an untyped variable "var Polypoints" which pushes also only the address of Polypoints on the stack. With this correction the demo program works perfectly. It is necessary to change that way pascal/bgi/bgi2grx.pas and also pascal/grx20.pas (I have no test program at hand to check in that case however). Hope this helps. -- Maurice Lombardi Laboratoire de Spectrometrie Physique, Universite Joseph Fourier de Grenoble, BP87 38402 Saint Martin d'Heres Cedex FRANCE Tel: 33 (0)4 76 51 47 51 Fax: 33 (0)4 76 51 45 44 mailto:Maurice DOT Lombardi AT ujf-grenoble DOT fr