Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!ptsfa!hoptoad!pozar From: pozar@hoptoad.UUCP Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: Help with ^C in MS-DOS Message-ID: <1922@hoptoad.uucp> Date: Mon, 23-Mar-87 17:13:11 EST Article-I.D.: hoptoad.1922 Posted: Mon Mar 23 17:13:11 1987 Date-Received: Wed, 25-Mar-87 01:07:50 EST References: <234@cup.portal.com> Reply-To: pozar@hoptoad.UUCP (Tim Pozar) Distribution: world Organization: Syncstream (San Francisco) Lines: 28 Xref: utgpu comp.lang.c:1309 comp.sys.ibm.pc:2498 In article <234@cup.portal.com> RichardKitts@cup.portal.com writes: > > I am trying to prevent a ^C break in MS-DOS using MSC 4.0. >If anyone could mail me some generic routines, pointers, or reference >sources I would be grateful. I assume your refering to a programme that was compiled under MSC 4.0, not while MSC is compiling. There are a couple of ways to handle a ^C. MSC provides the best way. Look up signal() (page 350 Run Time Library Manual). Signal() will let you define what should go on when a ^C is received by the programme. In this way you can define how the programme should go through an orderly exit of the routine or the programme itself. The example on page 352 is a good example of this. You can also put the Console into the 'RAW' mode where MS-DOS does not do any ^C checking. This can be done with the dos call 'I/O Control for Devices', (44h). And can be accessed through the intdos() function provided by MSC 4.0. -- Tim Pozar UUCP pozar@hoptoad.UUCP Fido 125/406 USNail KLOK-FM 77 Maiden Lane San Francisco CA 94108 terrorist cryptography DES drugs cipher secret decode NSA CIA NRO IRS coke crack pot LSD russian missile atom nuclear assassinate libyan RSA