home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / APPS / dm.lzh / error.c < prev    next >
Text File  |  1995-10-30  |  1KB  |  55 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.     gotoxy(16,3);
  42.     printf("%c%cERROR: %s: %s.\nError number:%d\n",7,7,errmsg,errfile,errno);
  43.     printf("Press CTRL-C to quit, any key to continue");
  44.     do {
  45.         if(_gs_rdy(STDIN) > 0) {
  46.             ch = getchar();
  47.             flush_kbd();
  48.         }
  49.     } while (ch == '\0');
  50.     if (ch == '\3')
  51.         return(FAIL);
  52.     return(PASS);
  53. }
  54. /* EOF error.c */
  55.