From: "Jeff W./DMT" 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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