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

  1. /* wflush ()
  2.  *
  3.  *    this routine flushes the keyboard/mouse
  4.  */
  5.  
  6. #include "wsys.h"
  7.  
  8.  
  9. void wflush (void)
  10.     {
  11.  
  12.     if  (wpipein)
  13.         {
  14.         /* redirection is in effect - don't flush
  15.          */
  16.         return;
  17.         }
  18.  
  19.     while ( wready_kbd() )
  20.         {
  21.         wread_kbd();
  22.         }
  23.  
  24.     wmouse_location();
  25.     wmouse.wms_used = wmouse.wms_internal= 0;
  26.  
  27.  
  28.  
  29.     return;        /*wflush*/
  30.     }