home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / flistfrontend / src / setctrl.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-04  |  640 b   |  33 lines

  1. #ifndef NO_IDENT
  2. static char *Id = "$Id: setctrl.c,v 1.4 1995/06/04 01:19:32 tom Exp $";
  3. #endif
  4.  
  5. /*
  6.  * Title:    setctrl.c
  7.  * Author:    Thomas E. Dickey
  8.  * Created:    18 Dec 1984
  9.  * Last update:    18 Dec 1984
  10.  *
  11.  * Function:    Set/clear the VMS control functions for ^T, ^Y.  This is used
  12.  *        by FLIST.
  13.  */
  14.  
  15. #include    <lib$routines.h>
  16.  
  17. #define    LIB$M_CLI_CTRLT    0x00100000
  18. #define    LIB$M_CLI_CTRLY    0x02000000
  19.  
  20. void
  21. setctrl (int turnon)
  22. {
  23. static
  24. int    newmask    = (LIB$M_CLI_CTRLT | LIB$M_CLI_CTRLY),
  25.     oldmask;
  26.  
  27.     oldmask |= LIB$M_CLI_CTRLY;    /* Should be set always    */
  28.     if (turnon)
  29.         lib$enable_ctrl (&oldmask);
  30.     else
  31.         lib$disable_ctrl (&newmask, &oldmask);
  32. }
  33.