home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- *
- * $Source: /unixb/home/unixlib/source/unixlib37/src/sys/c/RCS/os,v $
- * $Date: 1996/09/16 21:23:52 $
- * $Revision: 1.2 $
- * $State: Rel $
- * $Author: unixlib $
- *
- * $Log: os,v $
- * Revision 1.2 1996/09/16 21:23:52 unixlib
- * CL_0002 Nick Burret
- * Minor changes to file handling
- * Change most error numbers, and use in assembler sources (SJC)
- * Various minor bug fixes and compatability changes.
- *
- * Revision 1.1 1996/04/19 21:34:24 simon
- * Initial revision
- *
- ***************************************************************************/
-
- static const char rcs_id[] = "$Id: os,v 1.2 1996/09/16 21:23:52 unixlib Rel $";
-
- #include <errno.h>
- #include <string.h>
-
- #include <sys/os.h>
-
- static _kernel_oserror the_error;
-
- void
- __seterr (register _kernel_oserror * e)
- {
- if (!e)
- {
- errno = 0;
- return;
- }
-
- errno = EOPSYS;
- /* make sure the error message is stored safely for later diagnostics */
- the_error.errnum = e->errnum;
- strncpy (the_error.errmess, e->errmess, sizeof (the_error.errmess));
- sys_errlist[EOPSYS] = the_error.errmess;
- }
-
- void
- __seterr_ (register char *s)
- {
- if (!s)
- {
- errno = 0;
- return;
- }
-
- errno = EOPSYS;
- sys_errlist[EOPSYS] = s;
- }
-