Category : OS/2 Files
Archive   : EMXLIB8F.ZIP
Filename : EAERRNO.C

 
Output of file : EAERRNO.C contained in archive : EMXLIB8F.ZIP
/* eaerrno.c (emx+gcc) -- Copyright (c) 1993 by Eberhard Mattes */

#define INCL_DOSFILEMGR
#define INCL_DOSERRORS
#include
#include
#include
#include "ea.h"

void _ea_set_errno (ULONG rc)
{
switch (rc)
{
case ERROR_FILE_NOT_FOUND:
case ERROR_PATH_NOT_FOUND:
errno = ENOENT;
break;
case ERROR_ACCESS_DENIED:
errno = EACCES;
break;
case ERROR_NOT_ENOUGH_MEMORY:
errno = ENOMEM;
break;
case ERROR_INVALID_HANDLE:
errno = EBADF;
break;
case ERROR_FILENAME_EXCED_RANGE:
errno = ENAMETOOLONG;
break;
default:
errno = EINVAL;
break;
}
}


  3 Responses to “Category : OS/2 Files
Archive   : EMXLIB8F.ZIP
Filename : EAERRNO.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/