TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: Frank Adam
from: Paul Edwards
date: 1996-10-03 00:04:42
subject: using ctrlbrk()

FA> Yep, if the handler returns 0 it will quit, make it return 1.
FA> Try something like this..

FA> int myhandler( void )
FA> {
FA> asm{cli}; /* not sure if it needs this,the handler seems to restore */
FA> /* it, so presumably it would also clear it, just to be sure */
FA> /* i've left it there */  

FA> puts("Quit ? (y/N)");
FA> if(getch() != 'y') return (1); /* nah */
FA> return (0); /* quit */
FA> }

Well, you got me to look up my standard, but unless your section 7.7.1.1 is
different from mine, the return value from your handler is irrelevant. 
Actually, not so much irrelevant as ILLEGAL.  The signal handler is meant
to be of return type "void".

BFN.  Paul.
@EOT:

---
* Origin: X (3:711/934.9)

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.