home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / progc / cfuncs.arj / IDLECHAR.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-08  |  820 b   |  28 lines

  1. #include <conio.h>
  2. #include <funcs.h>
  3.  
  4. void (*idle_func)(void) = ShowClock;
  5. /*-------------------- Get Idle Char ---------------------------*/
  6. /*                                                              */
  7. /* Description: Runs a functions until a key is pressed.        */
  8. /*                                                              */
  9. /* Input: A void function that takes nothing as input.          */
  10. /*                                                              */
  11. /* Output: The key pressed.                                     */
  12. /*                                                              */
  13. /*--------------------------------------------------------------*/
  14.  
  15.  
  16. char GetIdleCh ( void )
  17. {
  18.  
  19.   while (!kbhit() )
  20.     idle_func();
  21.  
  22.   return(getch());
  23.  
  24. }
  25.  
  26. void nothing(void)
  27. {
  28. };