home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.update.uu.se
/
ftp.update.uu.se.2014.03.zip
/
ftp.update.uu.se
/
pub
/
rainbow
/
msdos
/
misc
/
make.lzh
/
DOSERROR.C
next >
Wrap
Text File
|
1986-01-19
|
2KB
|
49 lines
/*
* DOSERROR.C
*
* Copyright (C) 1984 by Larry Campbell, 73 Concord St., Maynard Mass.
*
* This software may be freely copied and disseminated for
* noncommercial purposes, if and only if this entire copyright
* statement and notice is included intact. This software, and
* the information contained herein, may not be used for commercial
* purposes without my prior written permission.
*
* char *dos_error (error_num)
*
* Return address of string describing an MS-DOS error code
* (useful only for Xenix-style calls, CP/M-style calls have
* different error codes)
*/
static char
ebuf[40];
char *dos_error (error_num)
int error_num;
{
switch (error_num)
{
case 1: return ("invalid function");
case 2: return ("file not found");
case 3: return ("path not found");
case 4: return ("too many open files");
case 5: return ("access denied");
case 6: return ("invalid handle");
case 7: return ("arena trashed");
case 8: return ("not enough memory");
case 9: return ("invalid block");
case 10: return ("bad environment");
case 11: return ("bad format for EXE file");
case 12: return ("invalid access");
case 13: return ("invalid data");
case 15: return ("invalid drive");
case 16: return ("can't remove current directory");
case 17: return ("can't rename across devices");
case 18: return ("no more files");
default:
sprintf (ebuf, "unknown error code %d", error_num);
return (ebuf);
};
}