home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / clipper / nfpat8.zip / ALT.C next >
C/C++ Source or Header  |  1993-07-16  |  2KB  |  70 lines

  1. /*
  2.  * File......: ALT.C
  3.  * Author....: Ted Means
  4.  * Date......: $Date:   15 Jul 1993 23:48:00  $
  5.  * Revision..: $Revision:   1.4  $
  6.  * Log file..: $Logfile:   C:/nanfor/src/alt.c_v  $
  7.  * 
  8.  * This function is an original work by Ted Means and is placed in the
  9.  * public domain.
  10.  *
  11.  * Modification history:
  12.  * ---------------------
  13.  *
  14.  * $Log:   C:/nanfor/src/alt.c_v  $
  15.  * 
  16.  *    Rev 1.4   15 Jul 1993 23:48:00   GLENN
  17.  * Dropped _MK_FP for preferred 0x00400017
  18.  * 
  19.  *    Rev 1.3   13 Jul 1993 22:28:58   GLENN
  20.  * Added call to _MK_FP in order to be compatible in protected mode.
  21.  * 
  22.  *    Rev 1.2   15 Aug 1991 23:08:34   GLENN
  23.  * Forest Belt proofread/edited/cleaned up doc
  24.  * 
  25.  *    Rev 1.1   14 Jun 1991 19:53:36   GLENN
  26.  * Minor edit to file header
  27.  * 
  28.  *    Rev 1.0   01 Apr 1991 01:02:42   GLENN
  29.  * Nanforum Toolkit
  30.  * 
  31.  *
  32.  */
  33.  
  34.  
  35. /*  $DOC$
  36.  *  $FUNCNAME$
  37.  *     FT_ALT()
  38.  *  $CATEGORY$
  39.  *     Keyboard/Mouse
  40.  *  $ONELINER$
  41.  *     Determine status of the Alt key
  42.  *  $SYNTAX$
  43.  *     FT_ALT() -> lValue
  44.  *  $ARGUMENTS$
  45.  *     None
  46.  *  $RETURNS$
  47.  *     .T. if Alt key is pressed, .F. if otherwise.
  48.  *  $DESCRIPTION$
  49.  *     This function is useful for times you need to know whether or not the
  50.  *     Alt key is pressed, such as during a MemoEdit().
  51.  *  $EXAMPLES$
  52.  *     IF FT_ALT()
  53.  *        @24, 0 say "Alt"
  54.  *     ELSE
  55.  *        @24, 0 say "   "
  56.  *     ENDIF
  57.  *  $SEEALSO$
  58.  *     FT_CAPLOCK() FT_CTRL() FT_NUMLOCK() FT_PRTSCR() FT_SHIFT()
  59.  *  $END$
  60.  */
  61.  
  62. #include <dos.h>
  63. #include <extend.h>
  64.  
  65. CLIPPER FT_ALT(void)
  66. {
  67.    _retl( (int) ((*(char *) 0x00400017 ) & 0x8) );
  68.    return;
  69. }
  70.