home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_02_07 / 2n07050a < prev    next >
Text File  |  1991-06-02  |  703b  |  35 lines

  1. #include <dos.h>
  2. #include <bios.h>
  3. #include <stdio.h>
  4. #include <signal.h>
  5. #include <stdlib.h>
  6. #include <process.h>
  7.  
  8. extern disable_break();
  9. extern enable_break();
  10.  
  11. main()
  12. {
  13.         int end_of_job = 0;
  14.         int c = 0;
  15.         
  16.         printf("\nStart of job...");
  17.         
  18.         DISABLE_BREAK();
  19.         
  20.         while (! end_of_job)
  21.         {
  22.                 if (!kbhit())
  23.                 {
  24.                         c = getch();
  25.                         printf(".");
  26.                         if (c == 'Z')
  27.                                 end_of_job = 1;
  28.                 }
  29.         }
  30.         
  31.         ENABLE_BREAK();
  32.         
  33.         printf("\nEnd of execution.\n");
  34. }
  35.