Mail Archives: djgpp/1999/11/29/06:16:38
At 01:19 PM 11/27/99 +0200, you wrote:
>On 26 Nov 99, at 18:35, Anton Helm wrote:
>Perhaps src/utils/shiftscl.c but not shiftscn.c
sure.
>Verified that _GR_shift_scanline works for me compiled with gcc-
>2.95.2 (tested it's really called). However I have patched GRX-2.3 rather
>much (some patches from me, also ones from other authors)
Excuse me, but this isn't very helpful as long as these patches are not
available. I have applied the patches I have found on the GRX home page
and the others posted here a week ago to make gcc 2.95 happy.
>I also used gcc-2.95 and gcc-2.95.1 earlier and didn't met problems
>except than I had to fix invalid inline assembler instructions to appease
>gcc-2.95
Do these fixes match the patches that were distributed here last week ?
(http://www.shelob.f9.co.uk/djgpp/)
My gcc calls itself 2.95 and the cross compiler (Solaris->DOS) is 2.95.1
(cross-binutils 2.9.1). The results are similar.
>and also some assembler instructions operands needed to use
>rather recent binutils snapshots.
This isn't very enlightning either. Could you please name the
binutil version you used and why it was necessary to use it for
source code that is several years old (and used to work before).
Maybe it would be an idea to put a binary of the library in
the djgpp distribution as for most of the other packs.
I don't mind compiling myself but it would help lots of others
who don't want to digg into inline asm (and its changes with gcc
versions).
>Perhaps it would be better to post small example which causes crash
>in _GR_move_scanline() when latest is compiled with gcc-2.95.X.
_GR_shift_scanline() but not _GR_move_scanline()
Here is a little testprogram that shows the described behavior.
_GR_shift_scanline() is called by GrMouseDisplayCursor().
The program should switch your display into graphics mode
and wait for a key. After pressing the key it should display
a mouse cursor and wait for annother key. Then exit.
This has been cut out of the actual program, so there is a
chance that I have removed too much of the necessary code but it
seems to work.
#include <stdio.h>
#include <stdlib.h>
#include <pc.h>
#include <grx20.h>
int main(int argc, char *argv[])
{
/* do we have a mouse ? */
if(GrMouseDetect())
{
/* set graphic mode */
GrSetMode(GR_width_height_graphics, 640, 480);
/* initialize mouse */
GrMouseEventMode(0);
GrMouseInit();
GrMouseEventEnable(0,1);
/* press any key() */
getkey();
/* display mouse cursor */
/* the following function calls several
libgrx internal functions and finally
_GR_shift_scanline() which crashes in
inline asm
*/
GrMouseDisplayCursor();
/* press any key ... */
getkey();
}
else
{
fprintf(stderr, "no mouse ...\n");
}
return 0;
}
libgrx20.a binary from grx homepage (2.8.1 compiled) -> OK
libgrx20.a compiled with gcc 2.95 -> crash in _GR_shift_scanline()+99
libgrx20.a compiled with gcc 2.95 and shiftscl.o
replaced with the one from the 2.8.1 binary -> OK
www.gnu.de is currently down. So I cannot give an exact URL where to find
the binary of libgrx (unfortunately it isn't in an obvious place).
The file is called grx23dj2.zip.
Tony
**************************************************************
Dipl.-Ing. Anton HELM *T* mailto:tony AT nt DOT tuwien DOT ac DOT at
Institut fuer *U* http://www.nt.tuwien.ac.at/~tony/
Nachrichtentechnik und *W* http://www.nt.tuwien.ac.at/
Hochfrequenztechnik *I* talkto:tony AT eagle DOT nt DOT tuwien DOT ac DOT at
Guszhausstr. 25/389 *E* phoneto:+43-1-58801-38920
A-1040 Wien, AUSTRIA *N* faxto:+43-1-58801-38999
**************************************************************
finger -l tony AT penguin DOT nt DOT tuwien DOT ac DOT at for PGP public key
**************************************************************
- Raw text -