home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / dm14.lzh / error.c < prev    next >
Text File  |  1996-07-19  |  1KB  |  61 lines

  1. /* error.c functions for DISKMASTER.C         */
  2. /* copyright (c) 1995 by Bob Devries          */
  3. /* email: bdevries@gil.ipswichcity.qld.gov.au */
  4.  
  5. /* error functions */
  6.  
  7. #include <stdio.h>
  8. #include "screen.h"
  9. #include "diskmaster.h"
  10.  
  11. open_err(path,ernum)
  12. char *path;
  13. int ernum;
  14. {
  15.        gotoxy(1,24);
  16.        printf("%c%cERROR %d: Can't open %-57.57s",7,7,ernum,path);
  17.        sleep(5);
  18.        commands();
  19. }
  20.  
  21.  
  22. creat_err(path,ernum)
  23. char *path;
  24. int ernum;
  25. {
  26.        gotoxy(1,24);
  27.        printf("%c%cERROR %d: Can't create %-57.57s",7,7,ernum,path);
  28.        sleep(5);
  29.        commands();
  30. }
  31.  
  32. error(errmsg,errfile,errno)
  33. char *errmsg;
  34. char *errfile;
  35. int errno;
  36. {
  37.     int ch = '\0';
  38.     
  39.     box_doub(15,2,20,5);
  40.     clearwin(16,3,18,3);
  41. #ifdef MM1
  42.     CurOn(1);
  43. #endif
  44.     gotoxy(16,3);
  45.     printf("%c%cERROR: %s: %s.\nError number:%d\n",7,7,errmsg,errfile,errno);
  46.     printf("Press CTRL-C to quit, any key to continue");
  47.     do {
  48.         if(_gs_rdy(STDIN) > 0) {
  49.             ch = getchar();
  50.             flush_kbd();
  51.         }
  52.     } while (ch == '\0');
  53. #ifdef MM1
  54.     CurOff(1);
  55. #endif
  56.     if (ch == '\3')
  57.         return(FAIL);
  58.     return(PASS);
  59. }
  60. /* EOF error.c */
  61.