comp.lang.ada
 help / color / mirror / Atom feed
* Re: How to bypass CTRL-C?
@ 1999-01-28  0:00 John Herro
  0 siblings, 0 replies; 6+ messages in thread
From: John Herro @ 1999-01-28  0:00 UTC (permalink / raw)



psx2@videotron.ca wrote:
> How can I block the CTRL-C keys so that the
> program can not terminate that way.

If you're using DOS with an Ada compiler that lets you call the DOS interrupts,
call interrupt 16#21#, function 16#07#.  This will put the character in AL
without echoing it, and without allowing Ctrl-C to break.  Separately echo the
character if you want.

If you're using DOS with the Open Ada compiler, there's a simpler solution:
with Tty;
...
  C : Character;
...
  C := Tty.Get(Direct => True);

- John Herro
You can download a shareware AdaTutor program at
http://members.aol.com/AdaTutor. 




^ permalink raw reply	[flat|nested] 6+ messages in thread
* How to bypass CTRL-C?
@ 1999-01-27  0:00 psx2
  1999-01-27  0:00 ` Larry Kilgallen
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: psx2 @ 1999-01-27  0:00 UTC (permalink / raw)


The topic says it all.
How can I block the CTRL-C keys so that the 
program can not terminate that way.

Thanks.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-01-28  0:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-01-28  0:00 How to bypass CTRL-C? John Herro
  -- strict thread matches above, loose matches on Subject: below --
1999-01-27  0:00 psx2
1999-01-27  0:00 ` Larry Kilgallen
1999-01-28  0:00 ` bourguet
1999-01-28  0:00 ` Geert Bosch
1999-01-28  0:00 ` robert_dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox