home *** CD-ROM | disk | FTP | other *** search
/ Zodiac Super OZ / MEDIADEPOT.ISO / FILES / 16 / FREEDOS.ZIP / FD_A4PRE.ZIP / SOURCE / FD10.ZIP / ctrl_c.h < prev    next >
C/C++ Source or Header  |  1995-05-15  |  2KB  |  59 lines

  1. /*
  2.  * *      ctrl_c.h *
  3.  * 
  4.  *      Author:  John Galvin *      Date:    25-Jul-1988 *      Purpose: trap
  5.  * Ctrl-C and Ctrl-Break without printing anything. *
  6.  * 
  7.  *      Note: *          Use of these routines will prevent Ctrl-C and
  8.  * Ctrl-Break *          from terminating your program.  They will also
  9.  * prevent *          Ctrl-P, Ctrl-S, and Ctrl-Z from being interpreted by *
  10.  * MS-DOS as they normally are.  Your program will be able *          to read
  11.  * *all* of these characters, so if you don't want *          them in your
  12.  * input stream, you will have to do something *          about them
  13.  * yourself.  This code was written to work in *          all standard memory
  14.  * models of the Microsoft C compiler *          version 5.1.  Do not use
  15.  * getch() or getche() with these *          routines. *
  16.  * 
  17.  *      $Id: ctrl_c.h 1.1 88/07/25 22:04:48 galvin Exp $ *
  18.  * 
  19.  *      Copyright (c) 1988 by John W. Galvin.  All Rights Reserved. *
  20.  * 
  21.  *      Permission is hereby granted by the author for anyone to use this *
  22.  * code in their own programs provided the following conditions are met: *
  23.  * This copyright notice is left intact.  Any changes to this text/code *
  24.  * must be commented and credited to the correct author somewhere *      in
  25.  * this file. *
  26.  * 
  27.  *      $Log:   ctrl_c.h $ *      Revision 1.1  88/07/25  22:04:48  galvin *
  28.  * Initial revision *
  29.  * 
  30.  *
  31.  */
  32.  
  33. #ifndef __CTRL_C_H
  34. #define __CTRL_C_H
  35.  
  36. #ifndef TRUE
  37. #define TRUE     1
  38. #endif
  39.  
  40. #ifndef FALSE
  41. #define FALSE    0
  42. #endif
  43.  
  44. #define INTERCEPT       0
  45. #define RELEASE         1
  46. #define GET             0x00
  47. #define SET             0x01
  48. #define CHKON           0x01
  49. #define CHKOFF          0x00
  50.  
  51.  
  52. extern int      ctrl_c(int op);
  53. extern int      get_ctrl_c_chk(void);
  54. extern int      set_ctrl_c_chk(int value);
  55. extern int      rawio(int handle, int raw);
  56. extern word     ioctl(int handle, int op, word value);
  57.  
  58. #endif
  59.