www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/22/18:16:47

From: "Jeff W./DMT" <dmt AT bigfoot DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro key press problem
Date: Thu, 20 Nov 1997 10:37:09 -0600
Organization: ZipLink -- America's Hottest ISP
Lines: 40
Message-ID: <34746735.2C3886C6@bigfoot.com>
Reply-To: dmt AT bigfoot DOT com
NNTP-Posting-Host: chi-ip-1-153.ziplink.net
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I already made a program thta works just fine with the allegro library
(i think v.2.2? The newest version?), and loops in the following basic
way:
do
{
    ...
} while (!key[KEY_ESC])

I am making another program that also has that same looping structure.
I can hit escape and the program will terminate and call my shutdown
stuff/etc., but I noticed that allegro dumps this debug  stuff out to
the screen (telling me what the registers are/etc).  That's not the real
problem though.  The problem is that in the middle of that loop, i have
a statement that says
if (key[KEY_PGUP])
{
    ++count;
    ....
}
as soon as I hit page up, my program stops at the line ++count (without
executing it), and terminates with an error saying that allegro received
signal SIGSEGV and complaining of a general protectin fault.  I can't
see how this is really any different from my original progam, which also
detected key presses in the middle of the loop.  Anyone have any ideas?

--

--Jeff W.

"The finding of DMT in normal human body fluids
opens up interesting moral and legal questions.
Since DMT is illegal, as is 'any substance, compound
or mixture' containing DMT, it would seem that we
are all guilty of possesion of a controlled substance"
-Jonathon Ott

My funky-ass-ghetto-bitch webpage:
http://www.geocities.com/SunsetStrip/Alley/3450/index.html


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019