home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_03 / 9n03038c < prev    next >
Text File  |  1991-01-18  |  774b  |  34 lines

  1. /****************************************************
  2.  * NAME       :        display
  3.  * DESCRIPTION:        skeleton routine
  4.  *                     to read key stroke
  5.  ***************************************************/
  6.  
  7. void t_display()
  8. {
  9.    unsigned char key;
  10.    int state = 0;
  11.  
  12.    while(1)
  13.   {
  14.       switch (state)
  15.       {
  16.          case 0:
  17.             /*
  18.              *  here you would implement a
  19.              *  state machine to handle cases of
  20.              *  key strokes and their effect on
  21.              *  the display
  22.              */
  23.  
  24.         default:
  25.            break;
  26.       }  /* end of switch logic for states */
  27.  
  28.       while (key_que.empty && !reset && !disable_on)
  29.          suspend();
  30.       key = remove_one(&key_que);
  31.  
  32.    }
  33. }
  34.