home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!sarah!cook!psinntp!psinntp!npri6!murphy
- From: murphy@npri6.npri.com (David P. Murphy)
- Newsgroups: comp.os.vms
- Subject: Re: Easy Way to trap for Control-Z In VAX C?
- Message-ID: <6584@npri6.npri.com>
- Date: 19 Nov 92 01:11:40 GMT
- References: <01GQZFW3KCAA8WW9G8@NKUVAX.BITNET> <10NOV199220580780@spades.aces.com>
- Distribution: world
- Organization: NPRI, Alexandria VA
- Lines: 19
-
- simplest method of checking for ^Z in VAXC:
-
- char reply[20];
-
- printf("Enter something: ");
- if (gets(reply) == NULL) {
- /* user pressed ^Z! */
- exit(SS$_NORMAL);
- }
-
- no fuss, no muss.
-
- ok
- dpm
- --
- murphy@npri6.npri.com 602 Cameron St. Alexandria, VA 22314 (703) 683-9090
-
- When every one is dead the Great Game is finished. Not before.
- --- Hurree Babu, "Kim"
-