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 >
Wrap
Text File
|
1996-07-19
|
1KB
|
61 lines
/* error.c functions for DISKMASTER.C */
/* copyright (c) 1995 by Bob Devries */
/* email: bdevries@gil.ipswichcity.qld.gov.au */
/* error functions */
#include <stdio.h>
#include "screen.h"
#include "diskmaster.h"
open_err(path,ernum)
char *path;
int ernum;
{
gotoxy(1,24);
printf("%c%cERROR %d: Can't open %-57.57s",7,7,ernum,path);
sleep(5);
commands();
}
creat_err(path,ernum)
char *path;
int ernum;
{
gotoxy(1,24);
printf("%c%cERROR %d: Can't create %-57.57s",7,7,ernum,path);
sleep(5);
commands();
}
error(errmsg,errfile,errno)
char *errmsg;
char *errfile;
int errno;
{
int ch = '\0';
box_doub(15,2,20,5);
clearwin(16,3,18,3);
#ifdef MM1
CurOn(1);
#endif
gotoxy(16,3);
printf("%c%cERROR: %s: %s.\nError number:%d\n",7,7,errmsg,errfile,errno);
printf("Press CTRL-C to quit, any key to continue");
do {
if(_gs_rdy(STDIN) > 0) {
ch = getchar();
flush_kbd();
}
} while (ch == '\0');
#ifdef MM1
CurOff(1);
#endif
if (ch == '\3')
return(FAIL);
return(PASS);
}
/* EOF error.c */