#ifndef NULL #define NULL ((void *)0) #endif static char *errors[] = { NULL, "bad function", "file not found", "path not found", "too many open files", "access denied", "invalid handle", "memory trashed", "insufficient memory", "invalid memory block address", "invalid environment", "invalid format", "invalid access code", "invalid data", "mysterious internal DOS error", "invalid drive", "can't remove current directory", "not same device", "no more files", "unknown error" }; void print_error(string,code) char *string; { write(2,string,strlen(string)); write(2," : ",3); if (code < 0 || code > 18) code = 19; write(2,errors[code],strlen(errors[code])); write(2,"\r\n",2); }