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

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