home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 328_01 / wexit.c < prev    next >
C/C++ Source or Header  |  1991-03-17  |  404b  |  31 lines

  1. /*! wexit.c
  2.  *
  3.  *    verify that user wants to quit,
  4.  *    if yes, exit to DOS.
  5.  */
  6. #include "wsys.h"
  7.  
  8.  
  9. void wexit (void)
  10.     {
  11.     unsigned char saveattr;
  12.     int  key;
  13.  
  14.  
  15.  
  16.  
  17.     saveattr = wgetattr();
  18.  
  19.     wsetattr( ( RED<<4) + WHITE ) ;
  20.  
  21.     key =wpromptc (NULL, "Verify: Q = quit program, ESCAPE = continue",
  22.             "Quit",  NULL);
  23.  
  24.  
  25.     if ( key == 'Q' )
  26.         exit(00);
  27.  
  28.  
  29.     wsetattr (saveattr);
  30.     return;
  31.     }