home *** CD-ROM | disk | FTP | other *** search
- /* ==( bench/iotran.c )== */
-
- /* ----------------------------------------------- */
- /* Pro-C - Copyright (C) 1988, 1990 Vestronix Inc. */
- /* Modification to this source is not supported */
- /* by Vestronix Inc. */
- /* All Rights Reserved */
- /* ----------------------------------------------- */
-
- #include <proc.io>
-
-
- /*
- ** Convert error codes into readable strings
- */
- char *
- io_tran(stat)
- int stat;
- {
- char *msg;
- static char foobie[20];
-
- switch (stat)
- {
- case IOGOOD: msg = "IOGOOD"; break;
- case IOERROR: msg = "IOERROR"; break;
- case IONOFILE: msg = "IONOFILE"; break;
- case IOBADOPEN: msg = "IOBADOPEN"; break;
- case IOINDEXPOSN: msg = "IOINDEXPOSN"; break;
- case IONOKEY: msg = "IONOKEY"; break;
- case IODUP: msg = "IODUP"; break;
- case IOTOF: msg = "IOTOF"; break;
- case IOEOF: msg = "IOEOF"; break;
- case IOLOCKED: msg = "IOLOCKED"; break;
- case IONOLOCK: msg = "IONOLOCK"; break;
- case IONONEXT: msg = "IONONEXT"; break;
- case IONOLOGON: msg = "IONOLOGON"; break;
- case IO_NO_ADMIN: msg = "IO_NO_ADMIN"; break;
- case IOADD: msg = "IOADD"; break;
-
- #ifdef IODATSEEK
- case IODATSEEK: msg = "IODATSEEK"; break;
- case IOIDXSEEK: msg = "IOIDXSEEK"; break;
- case IODATWRITE: msg = "IODATWRITE"; break;
- case IOIDXWRITE: msg = "IOIDXWRITE"; break;
- case IODATREAD: msg = "IODATREAD"; break;
- case IOIDXREAD: msg = "IOIDXREAD"; break;
- case IOOLDVER: msg = "IOOLDVER"; break;
- case IONEWVER: msg = "IONEWVER"; break;
- case IODATOPEN: msg = "IODATOPEN"; break;
- case IOIDXOPEN: msg = "IOIDXOPEN"; break;
- case IOFLDDEF: msg = "IOFLDDEF"; break;
- case IOKEYDEF: msg = "IOKEYDEF"; break;
- case IOFLDPERM: msg = "IOFLDPERM"; break;
- case IOIDXPERM: msg = "IOIDXPERM"; break;
- case IODATPERM: msg = "IODATPERM"; break;
- case IOFILLOCK: msg = "IOFILLOCK"; break;
- case IONOSERVER: msg = "IONOSERVER"; break;
- case IOCONFIG: msg = "IOCONFIG"; break;
- case IOFTABLE: msg = "IOFTABLE"; break;
- case IOILOCKED: msg = "IOILOCKED"; break;
- case IOINOLOCK: msg = "IOINOLOCK"; break;
- #endif
-
- default:
- msg = foobie;
- sprintf(msg, "<stat=%d>", stat);
- break;
- }
-
- return(msg);
- }
-