home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / os / vms / 18276 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  830 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!sarah!cook!psinntp!psinntp!npri6!murphy
  2. From: murphy@npri6.npri.com (David P. Murphy)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: Easy Way to trap for Control-Z In VAX C?
  5. Message-ID: <6584@npri6.npri.com>
  6. Date: 19 Nov 92 01:11:40 GMT
  7. References: <01GQZFW3KCAA8WW9G8@NKUVAX.BITNET> <10NOV199220580780@spades.aces.com>
  8. Distribution: world
  9. Organization: NPRI, Alexandria VA
  10. Lines: 19
  11.  
  12. simplest method of checking for ^Z in VAXC:
  13.  
  14.     char reply[20];
  15.  
  16.     printf("Enter something: ");
  17.     if (gets(reply) == NULL) {
  18.         /* user pressed ^Z! */
  19.         exit(SS$_NORMAL);
  20.     }
  21.  
  22. no fuss, no muss.
  23.  
  24. ok
  25. dpm
  26. -- 
  27. murphy@npri6.npri.com 602 Cameron St. Alexandria, VA 22314 (703) 683-9090
  28.  
  29.               When every one is dead the Great Game is finished.  Not before.
  30.                               --- Hurree Babu, "Kim"
  31.