Changeset 1220 for trunk/src


Ignore:
Timestamp:
Oct 9, 1999, 3:32:26 PM (26 years ago)
Author:
sandervl
Message:

More updates

Location:
trunk/src/crtdll
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/crtdll/crtdll.cpp

    r1207 r1220  
    1 /* $Id: crtdll.cpp,v 1.9 1999-10-09 09:39:12 sandervl Exp $ */
     1/* $Id: crtdll.cpp,v 1.10 1999-10-09 13:32:25 sandervl Exp $ */
    22
    33/*
     
    4848#include <crtdll.h>
    4949#include "crtinc.h"
     50#include "ieee.h"
    5051
    5152DEFAULT_DEBUG_CHANNEL(crtdll)
     
    271272INT CDECL CRTDLL__XcptFilter(DWORD ret, struct _EXCEPTION_POINTERS *  ExceptionInfo )
    272273{
    273   dprintf(("CRTDLL: XcptFilter not implemented.\n"));
    274   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    275   return FALSE;
     274  dprintf(("CRTDLL: _XcptFilter\n"));
     275  return UnhandledExceptionFilter(ExceptionInfo);
    276276}
    277277
     
    372372 *                  __fpecode            (CRTDLL.27)
    373373 */
     374int fpecode = 0;
     375
    374376int * CDECL CRTDLL___fpecode ( void )
    375377{       
    376         dprintf(("__fpecode not implemented.\n"));
    377         SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    378         return FALSE;
     378        dprintf(("__fpecode\n"));
     379        return &fpecode;
    379380}
    380381
     
    604605 *           CRTDLL__chgsign     (CRTDLL.53)
    605606 */
    606 double CDECL CRTDLL__chgsign(double x)
    607 {
    608   dprintf(("CRTDLL: _chgsign not implemented.\n"));
    609   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    610   return FALSE;
     607double CDECL CRTDLL__chgsign(double __x)
     608{
     609  dprintf(("CRTDLL: _chgsign\n"));
     610  double_t *x = (double_t *)&x;
     611  if ( x->sign == 1 )
     612        x->sign = 0;
     613  else
     614        x->sign = 1;
     615
     616  return __x;
    611617}
    612618
     
    689695 *                  CRTDLL__copysign    (CRTDLL.62)
    690696 */
    691 double CDECL CRTDLL__copysign( double x, double y )
    692 {
    693   dprintf(("CRTDLL: _copysign not implemented.\n"));
    694   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    695   return FALSE;
    696 }
    697 
    698 
    699 /*********************************************************************
    700  *                  CRTDLL__cprintf    (CRTDLL.63)
     697double CDECL CRTDLL__copysign( double __d, double __s )
     698{
     699  dprintf(("CRTDLL: _copysign\n"));
     700  double_t *d = (double_t *)&__d;
     701  double_t *s = (double_t *)&__s;
     702
     703  d->sign = s->sign;
     704
     705  return __d;
     706}
     707
     708
     709/*********************************************************************
     710 *                  _cprintf    (CRTDLL.63)
    701711 */
    702712INT CDECL CRTDLL__cprintf( char *s, ... )
     
    830840
    831841/*********************************************************************
    832  *           CRTDLL__execl   (CRTDLL.79)
    833  */
    834 int CDECL CRTDLL__execl( char *s1, char *s2, ...)
     842 *           _execl   (CRTDLL.79)
     843 */
     844int CDECL CRTDLL__execl(const char* szPath, const char* szArgv0, ...)
    835845{
    836846  dprintf(("CRTDLL: _execl not implemented.\n"));
     
    924934
    925935/*********************************************************************
    926  *           CRTDLL__expand   (CRTDLL.88)
     936 *           _expand   (CRTDLL.88)
    927937 */
    928938void * CDECL CRTDLL__expand( void *ptr, size_t size )
     
    935945
    936946/*********************************************************************
    937  *           CRTDLL__fcloseall   (CRTDLL.89)
     947 *           _fcloseall   (CRTDLL.89)
    938948 */
    939949int CDECL CRTDLL__fcloseall( void )
     
    945955
    946956/*********************************************************************
    947  *           CRTDLL__fcvt  (CRTDLL.90)
     957 *           _fcvt  (CRTDLL.90)
    948958 */
    949959char * CDECL CRTDLL__fcvt( double val, int ndig, int *dec, int *sign )
     
    986996
    987997/*********************************************************************
    988  *           CRTDLL__fgetchar  (CRTDLL.92)
     998 *           _fgetchar  (CRTDLL.92)
    989999 */
    9901000int CDECL CRTDLL__fgetchar( void )
     
    9961006
    9971007/*********************************************************************
    998  *           CRTDLL__fgetwchar  (CRTDLL.93)
     1008 *           _fgetwchar  (CRTDLL.93)
    9991009 */
    10001010wint_t CDECL CRTDLL__fgetwchar( void *i )
     
    10061016
    10071017/*********************************************************************
    1008  *           CRTDLL__filbuf     (CRTDLL.94)
     1018 *           _filbuf     (CRTDLL.94)
    10091019 */
    10101020int CDECL CRTDLL__filbuf(FILE * f)
     
    10271037
    10281038/*********************************************************************
    1029  *           CRTDLL__fileno     (CRTDLL.97)
     1039 *           _fileno     (CRTDLL.97)
    10301040 */
    10311041int CDECL CRTDLL__fileno(FILE * f)
     
    10761086INT CDECL CRTDLL__finite(double x)
    10771087{
    1078   dprintf(("CRTDLL: _finite not implemented.\n"));
    1079   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    1080   return FALSE;
     1088  dprintf(("CRTDLL: _finite\n"));
     1089  return !_isinf(x);
    10811090}
    10821091
     
    11061115 *                  _fpclass     (CRTDLL.105)
    11071116 */
    1108 INT CDECL CRTDLL__fpclass( double x )
    1109 {
    1110   dprintf(("CRTDLL: _fpclass not implemented.\n"));
    1111   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    1112   return FALSE;
     1117INT CDECL CRTDLL__fpclass( double __d )
     1118{
     1119  dprintf(("CRTDLL: _fpclass\n"));
     1120        double_t *d = (double_t *)&__d;
     1121
     1122        if ( d->exponent == 0 ) {
     1123                if ( d->mantissah == 0 &&  d->mantissal == 0 ) {
     1124                        if ( d->sign ==0 )
     1125                                return FP_NZERO;
     1126                        else
     1127                                return FP_PZERO;
     1128                } else {
     1129                        if ( d->sign ==0 )
     1130                                return FP_NDENORM;
     1131                        else
     1132                                return FP_PDENORM;
     1133                }
     1134        }
     1135        if (d->exponent == 0x7ff ) {
     1136                if ( d->mantissah == 0 &&  d->mantissal == 0 ) {
     1137                        if ( d->sign ==0 )
     1138                                return FP_NINF;
     1139                        else
     1140                                return FP_PINF;
     1141                }
     1142                else if ( d->mantissah == 0 &&  d->mantissal != 0 ) {
     1143                        return FP_QNAN;
     1144                }
     1145                else if ( d->mantissah == 0 &&  d->mantissal != 0 ) {
     1146                        return FP_SNAN;
     1147                }
     1148       
     1149        }
     1150
     1151        return 0;
    11131152}
    11141153
     
    14111450  dprintf(("CRTDLL: _heapwalk not implemented.\n"));
    14121451  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    1413   return FALSE;
     1452  return 0;
    14141453}
    14151454
     
    14201459double CDECL CRTDLL__hypot(double x1, double x2)
    14211460{
    1422   dprintf(("CRTDLL: _hypot not implemented.\n"));
     1461  dprintf(("CRTDLL: _hypot\n"));
    14231462  return (_hypot(x1, x2));
    14241463}
     
    17991838 *                  _isnan     (CRTDLL.164)
    18001839 */
    1801 int CDECL CRTDLL__isnan( double x )
    1802 {
    1803   dprintf(("CRTDLL: _isnan not implemented.\n"));
    1804   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    1805   return FALSE;
     1840int CDECL CRTDLL__isnan( double __x )
     1841{
     1842  dprintf(("CRTDLL: _isnan\n"));
     1843  double_t * x = (double_t *)&__x;
     1844  return ( x->exponent == 0x7ff  && ( x->mantissah != 0 || x->mantissal != 0 ));
    18061845}
    18071846
     
    18641903void * CDECL CRTDLL__loaddll (char *name)
    18651904{
    1866   dprintf(("CRTDLL: _loaddll not implemented.\n"));
    1867   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    1868   return FALSE;
     1905  dprintf(("CRTDLL: _loaddll\n"));
     1906  return (void*)LoadLibraryA(name);
    18691907}
    18701908
     
    22052243unsigned char * CDECL CRTDLL__mbscat( unsigned char *dst, const unsigned char *src )
    22062244{
    2207   dprintf(("CRTDLL: _mbscat  not implemented.\n"));
    2208   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    2209   return FALSE;
     2245  dprintf(("CRTDLL: _mbscat\n"));
     2246  return (unsigned char*)strcat((char*)dst,(char*)src);
    22102247}
    22112248
     
    22162253unsigned char * CDECL CRTDLL__mbschr( const unsigned char *str, unsigned int c )
    22172254{
    2218   dprintf(("CRTDLL: _mbschr not implemented.\n"));
    2219   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    2220   return FALSE;
     2255  dprintf(("CRTDLL: _mbschr\n"));
     2256  return (unsigned char*)strchr((char*)str,c);
    22212257}
    22222258
     
    22272263int CDECL CRTDLL__mbscmp( const unsigned char *s1, const unsigned char *s2 )
    22282264{
    2229   dprintf(("CRTDLL: _mbscmp not implemented.\n"));
    2230   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    2231   return FALSE;
     2265  dprintf(("CRTDLL: _mbscmp\n"));
     2266  return strcmp((char*)s1,(char*)s2);
    22322267}
    22332268
     
    22382273unsigned char * CDECL CRTDLL__mbscpy( unsigned char *s1, const unsigned char *s2 )
    22392274{
    2240   dprintf(("CRTDLL: _mbscpy not implemented.\n"));
    2241   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    2242   return FALSE;
     2275  dprintf(("CRTDLL: _mbscpy\n"));
     2276  return (unsigned char*)strcpy((char*)s1,(char*)s2);
    22432277}
    22442278
     
    22492283size_t CDECL CRTDLL__mbscspn( const unsigned char *s1, const unsigned char *s2 )
    22502284{
    2251   dprintf(("CRTDLL: _mbscspn not implemented.\n"));
    2252   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    2253   return FALSE;
     2285  dprintf(("CRTDLL: _mbscspn\n"));
     2286  const char *p, *spanp;
     2287  char c, sc;
     2288
     2289  for (p = (const char*)s1;;)
     2290  {
     2291    c = *p++;
     2292    spanp = (const char*)s2;
     2293    do {
     2294      if ((sc = *spanp++) == c)
     2295        return (size_t)(p - 1) - (size_t)s1;
     2296    } while (sc != 0);
     2297  }
     2298  /* NOTREACHED */
    22542299}
    22552300
     
    22752320 *           _mbsdup    (CRTDLL.201)
    22762321 */
    2277 unsigned char * CDECL CRTDLL__mbsdup( unsigned char *src )
    2278 {
    2279   dprintf(("CRTDLL: _mbsdup not implemented.\n"));
    2280   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    2281   return FALSE;
     2322unsigned char * CDECL CRTDLL__mbsdup( unsigned char *_s )
     2323{
     2324  dprintf(("CRTDLL: _mbsdup\n"));
     2325  char *rv;
     2326  if (_s == 0)
     2327        return 0;
     2328  rv = (char *)malloc(CRTDLL__mbslen((LPCSTR)_s) + 1);
     2329  if (rv == 0)
     2330        return 0;
     2331  CRTDLL__mbscpy((unsigned char*)rv, _s);
     2332  return (unsigned char*)rv;
    22822333}
    22832334
     
    29032954unsigned char * CDECL CRTDLL__mbsstr( const unsigned char *s1, const unsigned char *s2 )
    29042955{
    2905   dprintf(("CRTDLL: _mbsstr not implemented.\n"));
    2906   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    2907   return FALSE;
     2956  dprintf(("CRTDLL: _mbsstr\n"));
     2957  return (unsigned char*)strstr((const char*)s1,(const char*)s2);
    29082958}
    29092959
     
    29142964unsigned char * CDECL CRTDLL__mbstok( unsigned char *s, const unsigned char *delim )
    29152965{
    2916   dprintf(("CRTDLL: _mbstok not implemented\n"));
    2917   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    2918   return FALSE;
     2966  dprintf(("CRTDLL: _mbstok\n"));
     2967  const char *spanp;
     2968  int c, sc;
     2969  char *tok;
     2970  static char *last;
     2971
     2972
     2973  if (s == NULL && (s = (unsigned char*)last) == NULL)
     2974    return (NULL);
     2975
     2976  /*
     2977   * Skip (span) leading delimiters (s += strspn(s, delim), sort of).
     2978   */
     2979 cont:
     2980  c = *s;
     2981  s = (unsigned char*)CRTDLL__mbsinc((LPCSTR)s);
     2982
     2983  for (spanp = (const char*)delim; (sc = *spanp) != 0; spanp = CRTDLL__mbsinc(spanp)) {
     2984    if (c == sc)
     2985      goto cont;
     2986  }
     2987
     2988  if (c == 0) {                 /* no non-delimiter characters */
     2989    last = NULL;
     2990    return (NULL);
     2991  }
     2992  tok = (char*)s - 1;
     2993
     2994  /*
     2995   * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
     2996   * Note that delim must have one NUL; we stop if we see that, too.
     2997   */
     2998  for (;;) {
     2999    c = *s;
     3000    s = (unsigned char*)CRTDLL__mbsinc((LPCSTR)s);
     3001    spanp = (const char*)delim;
     3002    do {
     3003      if ((sc = *spanp) == c) {
     3004        if (c == 0)
     3005          s = NULL;
     3006        else
     3007          s[-1] = 0;
     3008        last = (char*)s;
     3009        return ((unsigned char*)tok);
     3010      }
     3011      spanp = CRTDLL__mbsinc(spanp);
     3012    } while (sc != 0);
     3013  }
     3014  /* NOTREACHED */
    29193015}
    29203016
     
    32733369 *           _scalb      (CRTDLL.259)
    32743370 */
    3275 double CDECL CRTDLL__scalb( double x, long exp )
    3276 {
    3277   dprintf(("CRTDLL: _scalb not implemented.\n"));
    3278   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    3279   return FALSE;
     3371double CDECL CRTDLL__scalb( double __x, long e )
     3372{
     3373  dprintf(("CRTDLL: _scalb\n"));
     3374  double_t *x = (double_t *)&__x;
     3375       
     3376  x->exponent += e;
     3377
     3378  return __x;
    32803379}
    32813380
     
    37543853int CDECL CRTDLL__unloaddll(void *handle)
    37553854{
    3756   dprintf(("CRTDLL: _unloaddll not implemented.\n"));
    3757   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    3758   return FALSE;
     3855  dprintf(("CRTDLL: _unloaddll\n"));
     3856  return FreeLibrary((HMODULE)handle);
    37593857}
    37603858
     
    50335131 *                  ungetc           (CRTDLL.492)
    50345132 */
    5035 INT CDECL CRTDLL_ungetc(int c)
     5133INT CDECL CRTDLL_ungetc(int c, FILE *f)
    50365134{
    50375135  dprintf(("CRTDLL: ungetc not implemented.\n"));
     
    52195317        return (CRTDLL__ismbblead(s>>8) && CRTDLL__ismbbtrail(s&0x00FF)) ? 2 : 1;
    52205318}
     5319
     5320
     5321/*********************************************************************
     5322 *                  _isinf    (INTERNAL-#5)
     5323 */
     5324int _isinf(double __x)
     5325{
     5326        double_t * x = (double_t *)&__x;
     5327        return ( x->exponent == 0x7ff  && ( x->mantissah == 0 && x->mantissal == 0 )); 
     5328}
  • trunk/src/crtdll/crtinc.h

    r1207 r1220  
    1 /* $Id: crtinc.h,v 1.6 1999-10-09 09:39:13 sandervl Exp $ */
     1/* $Id: crtinc.h,v 1.7 1999-10-09 13:32:26 sandervl Exp $ */
    22
    33/* Definitions for the CRTDLL library (CRTDLL.DLL)
     
    1212
    1313// Errno Defs
     14#define EPERM           1       /* Operation not permitted */
     15#define ENOFILE         2       /* No such file or directory */
     16#define ENOENT          2
     17#define ESRCH           3       /* No such process */
     18#define EINTR           4       /* Interrupted function call */
     19#define EIO             5       /* Input/output error */
     20#define ENXIO           6       /* No such device or address */
     21#define E2BIG           7       /* Arg list too long */
     22#define ENOEXEC         8       /* Exec format error */
     23#define EBADF           9       /* Bad file descriptor */
     24#define ECHILD          10      /* No child processes */
    1425#define EAGAIN          11      /* Resource temporarily unavailable */
     26#define ENOMEM          12      /* Not enough space */
     27#define EACCES          13      /* Permission denied */
     28#define EFAULT          14      /* Bad address */
     29/* 15 - Unknown Error */
     30#define EBUSY           16      /* strerror reports "Resource device" */
     31#define EEXIST          17      /* File exists */
     32#define EXDEV           18      /* Improper link (cross-device link?) */
     33#define ENODEV          19      /* No such device */
     34#define ENOTDIR         20      /* Not a directory */
     35#define EISDIR          21      /* Is a directory */
    1536#define EINVAL          22      /* Invalid argument */
     37#define ENFILE          23      /* Too many open files in system */
     38#define EMFILE          24      /* Too many open files */
     39#define ENOTTY          25      /* Inappropriate I/O control operation */
     40/* 26 - Unknown Error */
     41#define EFBIG           27      /* File too large */
     42#define ENOSPC          28      /* No space left on device */
     43#define ESPIPE          29      /* Invalid seek (seek on a pipe?) */
     44#define EROFS           30      /* Read-only file system */
     45#define EMLINK          31      /* Too many links */
     46#define EPIPE           32      /* Broken pipe */
     47#define EDOM            33      /* Domain error (math functions) */
     48#define ERANGE          34      /* Result too large (possibly too small) */
     49/* 35 - Unknown Error */
     50#define EDEADLOCK       36      /* Resource deadlock avoided (non-Cyg) */
     51#define EDEADLK         36
     52/* 37 - Unknown Error */
     53#define ENAMETOOLONG    38      /* Filename too long (91 in Cyg?) */
     54#define ENOLCK          39      /* No locks available (46 in Cyg?) */
     55#define ENOSYS          40      /* Function not implemented (88 in Cyg?) */
     56#define ENOTEMPTY       41      /* Directory not empty (90 in Cyg?) */
     57#define EILSEQ          42      /* Illegal byte sequence */
    1658
    1759
     
    4385#define CASE_DIFF (0x8281 - 0x8260)
    4486
     87
     88// fpclass Defs
     89#define FP_SNAN       0x0001  //    signaling NaN
     90#define FP_QNAN       0x0002  //    quiet NaN
     91#define FP_NINF       0x0004  //    negative infinity
     92#define FP_PINF       0x0200  //    positive infinity
     93#define FP_NDENORM    0x0008  //    negative denormalized non-zero
     94#define FP_PDENORM    0x0010  //    positive denormalized non-zero
     95#define FP_NZERO      0x0020  //    negative zero
     96#define FP_PZERO      0x0040  //    positive zero
     97#define FP_NNORM      0x0080  //    negative normalized non-zero
     98#define FP_PNORM      0x0100  //    positive normalized non-zero
     99
     100
    45101// Defs
    46102#define DOSFS_GetFullName(a,b,c) strcpy(c,a)
     
    92148static new_handler_type new_handler;
    93149
     150// CRTDLL Exports
    94151double  *CRTDLL_HUGE_dll;        /* CRTDLL.20 */
    95152UINT    CRTDLL_argc_dll;         /* CRTDLL.23 */
     
    116173LPSTR   CRTDLL_pgmptr_dll;       /* CRTDLL.246 */
    117174USHORT *CRTDLL_pwctype_dll;      /* CRTDLL.253 */
    118 UINT    CRTDLL_sys_errlist;      /* CRTDLL.300 */
    119 UINT    CRTDLL_sys_nerr_dll;     /* CRTDLL.301 */
     175// UINT         CRTDLL_sys_errlist;      /* CRTDLL.300 */
     176// UINT         CRTDLL_sys_nerr_dll;     /* CRTDLL.301 */
    120177UINT    CRTDLL_timezone_dll;     /* CRTDLL.304 */
    121178LPSTR   CRTDLL_tzname;           /* CRTDLL.307 */
     
    125182
    126183
    127 
    128 
     184// CRTDLL Functions
    129185CRTDLL_FILE *   CDECL CRTDLL__fdopen(INT handle, LPCSTR mode);
    130186INT             CDECL NTDLL__wcsicmp( LPCWSTR str1, LPCWSTR str2 );
     
    140196size_t          CDECL CRTDLL_fread( void *ptr, size_t size, size_t n, FILE *fp );
    141197int             CDECL CRTDLL__mbbtype( unsigned char c, int type );
     198unsigned char * CDECL CRTDLL__mbscpy( unsigned char *s1, const unsigned char *s2 );
    142199LPSTR           CDECL CRTDLL__mbsinc( LPCSTR str );
     200INT             CDECL CRTDLL__mbslen( LPCSTR str );
    143201int             CDECL CRTDLL__ismbbkalnum( unsigned int c );
    144202int             CDECL CRTDLL__ismbbkana( unsigned int c );
     
    147205int             CDECL CRTDLL__ismbblead( unsigned int c );
    148206char *          CDECL CRTDLL_getenv( const char *name );
     207
    149208
    150209//
     
    155214unsigned int    _mbbtolower(unsigned int c);
    156215size_t          _mbclen2(const unsigned int s);
     216int             _isinf(double __x);
    157217
    158218
     
    228288/*Fx*/  _12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,_12,___,___,___
    229289};
     290
     291
     292// syserr / sysnerr Defs
     293char __syserr00[] = "No Error";
     294char __syserr01[] = "Input to function out of range (EDOM)";
     295char __syserr02[] = "Output of function out of range (ERANGE)";
     296char __syserr03[] = "Argument list too long (E2BIG)";
     297char __syserr04[] = "Permission denied (EACCES)";
     298char __syserr05[] = "Resource temporarily unavailable (EAGAIN)";
     299char __syserr06[] = "Bad file descriptor (EBADF)";
     300char __syserr07[] = "Resource busy (EBUSY)";
     301char __syserr08[] = "No child processes (ECHILD)";
     302char __syserr09[] = "Resource deadlock avoided (EDEADLK)";
     303char __syserr10[] = "File exists (EEXIST)";
     304char __syserr11[] = "Bad address (EFAULT)";
     305char __syserr12[] = "File too large (EFBIG)";
     306char __syserr13[] = "Interrupted system call (EINTR)";
     307char __syserr14[] = "Invalid argument (EINVAL)";
     308char __syserr15[] = "Input or output error (EIO)";
     309char __syserr16[] = "Is a directory (EISDIR)";
     310char __syserr17[] = "Too many open files (EMFILE)";
     311char __syserr18[] = "Too many links (EMLINK)";
     312char __syserr19[] = "File name too long (ENAMETOOLONG)";
     313char __syserr20[] = "Too many open files in system (ENFILE)";
     314char __syserr21[] = "No such device (ENODEV)";
     315char __syserr22[] = "No such file or directory (ENOENT)";
     316char __syserr23[] = "Unable to execute file (ENOEXEC)";
     317char __syserr24[] = "No locks available (ENOLCK)";
     318char __syserr25[] = "Not enough memory (ENOMEM)";
     319char __syserr26[] = "No space left on drive (ENOSPC)";
     320char __syserr27[] = "Function not implemented (ENOSYS)";
     321char __syserr28[] = "Not a directory (ENOTDIR)";
     322char __syserr29[] = "Directory not empty (ENOTEMPTY)";
     323char __syserr30[] = "Inappropriate I/O control operation (ENOTTY)";
     324char __syserr31[] = "No such device or address (ENXIO)";
     325char __syserr32[] = "Operation not permitted (EPERM)";
     326char __syserr33[] = "Broken pipe (EPIPE)";
     327char __syserr34[] = "Read-only file system (EROFS)";
     328char __syserr35[] = "Invalid seek (ESPIPE)";
     329char __syserr36[] = "No such process (ESRCH)";
     330char __syserr37[] = "Improper link (EXDEV)";
     331char __syserr38[] = "No more files (ENMFILE)";
     332
     333const char *CRTDLL_sys_errlist[] = {
     334__syserr00, __syserr01, __syserr02, __syserr03, __syserr04,
     335__syserr05, __syserr06, __syserr07, __syserr08, __syserr09,
     336__syserr10, __syserr11, __syserr12, __syserr13, __syserr14,
     337__syserr15, __syserr16, __syserr17, __syserr18, __syserr19,
     338__syserr20, __syserr21, __syserr22, __syserr23, __syserr24,
     339__syserr25, __syserr26, __syserr27, __syserr28, __syserr29,
     340__syserr30, __syserr31, __syserr32, __syserr33, __syserr34,
     341__syserr35, __syserr36, __syserr37, __syserr38
     342};
     343
     344int __sys_nerr = sizeof(CRTDLL_sys_errlist) / sizeof(CRTDLL_sys_errlist[0]);
     345
     346int*    CRTDLL_sys_nerr_dll = &__sys_nerr;
Note: See TracChangeset for help on using the changeset viewer.