Changeset 1160 for trunk/src


Ignore:
Timestamp:
Oct 7, 1999, 11:28:49 AM (26 years ago)
Author:
sandervl
Message:

Jens Weissner's changes (all functions included)

Location:
trunk/src/crtdll
Files:
3 edited

Legend:

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

    r1118 r1160  
    1 /* $Id: crtdll.cpp,v 1.7 1999-10-04 09:55:54 sandervl Exp $ */
     1/* $Id: crtdll.cpp,v 1.8 1999-10-07 09:28:48 sandervl Exp $ */
    22
    33/*
     
    267267/*********************************************************************
    268268 *                  _XcptFilter    (CRTDLL.21)
    269  *      FIXME - Could not find anything about it
    270  */
    271 INT CDECL CRTDLL__XcptFilter(DWORD ret)
     269 */
     270INT CDECL CRTDLL__XcptFilter(DWORD ret, struct _EXCEPTION_POINTERS *  ExceptionInfo )
    272271{
    273272  dprintf(("CRTDLL: XcptFilter not implemented.\n"));
     
    371370
    372371/*********************************************************************
     372 *                  __fpecode            (CRTDLL.27)
     373 */
     374int * CDECL CRTDLL___fpecode ( void )
     375{       
     376        dprintf(("__fpecode not implemented.\n"));
     377        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     378        return FALSE;
     379}
     380
     381
     382/*********************************************************************
    373383 *           CRTDLL___isascii   (CRTDLL.28)
    374384 */
     
    404414
    405415/*********************************************************************
    406  *                  __mb_cur_max_dll    (CRTDLL.31)
    407  *      FIXME - Could not find anything about it
    408  */
    409 INT CDECL CRTDLL___mb_cur_max_dll(DWORD ret)
    410 {
    411   dprintf(("CRTDLL: __mb_cur_max_dll not implemented.\n"));
    412   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    413   return FALSE;
    414 }
    415 
    416 
    417 /*********************************************************************
    418  *           CRTDLL___threadhandle   (CRTDLL.32)
     416 *           CRTDLL___pxcptinfoptrs   (CRTDLL.32)
     417 */
     418void ** CDECL CRTDLL___pxcptinfoptrs (void)
     419{
     420  dprintf(("CRTDLL: __pxcptinfoptrs not implemented.\n"));
     421  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     422  return NULL;
     423}
     424
     425
     426/*********************************************************************
     427 *           CRTDLL___threadhandle   (CRTDLL.33)
    419428 */
    420429unsigned long CDECL CRTDLL___threadhandle( void )
    421430{
    422   dprintf(("CRTDLL: __threadhandle  not implemented.\n"));
    423   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    424   return FALSE;
    425 }
    426 
    427 
    428 /*********************************************************************
    429  *           CRTDLL___threadid   (CRTDLL.33)
     431  dprintf(("CRTDLL: __threadhandle not implemented.\n"));
     432  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     433  return FALSE;
     434}
     435
     436
     437/*********************************************************************
     438 *           CRTDLL___threadid   (CRTDLL.34)
    430439 */
    431440int * CDECL CRTDLL___threadid(void)
     
    459468
    460469/*********************************************************************
     470 *           CRTDLL___toascii   (CRTDLL.38)
     471 */
     472int CDECL CRTDLL___toascii(int c)
     473{
     474  dprintf(("CRTDLL: __toascii\n"));
     475  return ((unsigned)(c) & 0x7F );
     476}
     477
     478
     479/*********************************************************************
    461480 *                  _aexit_rtn_dll    (CRTDLL.39)
    462  *      FIXME - Could not find anything about it
    463  */
    464 INT CDECL CRTDLL__aexit_rtn_dll(DWORD ret)
    465 {
    466   dprintf(("CRTDLL: _aexit_rtn_dll not implemented.\n"));
    467   SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    468   return FALSE;
     481 */
     482VOID CDECL CRTDLL__aexit_rtn_dll(int exitcode)
     483{
     484  dprintf(("CRTDLL: _aexit_rtn_dll\n"));
     485  ExitProcess(exitcode);
    469486}
    470487
     
    472489/*********************************************************************
    473490 *                  _amsg_exit    (CRTDLL.40)
    474  *      FIXME - Could not find anything about it
    475  */
    476 INT CDECL CRTDLL__amsg_exit(DWORD ret)
    477 {
    478         dprintf(("CRTDLL: _amsg_exit not implemented.\n"));
    479         return 0;
     491 */
     492VOID CDECL CRTDLL__amsg_exit(int errnum)
     493{
     494  dprintf(("CRTDLL: _amsg_exit\n"));
     495  fprintf(stderr,strerror(errnum));
     496  ExitProcess(-1);
    480497}
    481498
     
    634651
    635652/*********************************************************************
     653 *                  CRTDLL__commit    (CRTDLL.58)
     654 */
     655int CDECL CRTDLL__commit( int handle )
     656{
     657  dprintf(("CRTDLL: _commit not implemented.\n"));
     658  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     659  return FALSE;
     660}
     661
     662
     663/*********************************************************************
    636664 *           CRTDLL__control87   (CRTDLL.60)
    637665 */
     
    753781  dprintf(("CRTDLL: _endthread\n"));
    754782  _endthread ();
     783}
     784
     785
     786/*********************************************************************
     787 *           CRTDLL___eof   (CRTDLL.76)
     788 */
     789int CDECL CRTDLL__eof( int _fd )
     790{
     791  dprintf(("CRTDLL: _eof\n"));
     792  int cur_pos = CRTDLL__lseek(_fd, 0, SEEK_CUR);
     793  int end_pos = CRTDLL__filelength( _fd );
     794  if ( cur_pos == -1 || end_pos == -1)
     795        return -1;
     796
     797  if ( cur_pos == end_pos )
     798        return 1;
     799
     800  return 0;
    755801}
    756802
     
    12331279
    12341280/*********************************************************************
     1281 *                  _getdllprocaddr     (CRTDLL.123)
     1282 */
     1283FARPROC CDECL  CRTDLL__getdllprocaddr(HMODULE hModule,char * lpProcName, int iOrdinal)
     1284{
     1285  dprintf(("CRTDLL: _getdllprocaddr\n"));   
     1286  if ( lpProcName != NULL )
     1287        return GetProcAddress(hModule, lpProcName);
     1288  else
     1289        return GetProcAddress(hModule, (LPSTR)iOrdinal);
     1290  return (NULL);
     1291}
     1292
     1293
     1294/*********************************************************************
    12351295 *                  _getdrive    (CRTDLL.124)
    12361296 */
     
    12601320  dprintf(("CRTDLL: _getpid\n"));
    12611321  return (_getpid());
     1322}
     1323
     1324
     1325/*********************************************************************
     1326 *                  _getsystime    (CRTDLL.127)
     1327 */
     1328unsigned int CDECL CRTDLL__getsystime(struct tm *tp)
     1329{
     1330  dprintf(("CRTDLL: _getsystime not implemented.\n"));
     1331  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     1332  return FALSE;
    12621333}
    12631334
     
    17211792  return FALSE;
    17221793//  return (_lfind(v1,v2,i1,i2,i3(v3,v4)));
     1794}
     1795
     1796
     1797/*********************************************************************
     1798 *                  _loaddll    (CRTDLL.171)
     1799 */
     1800void * CDECL CRTDLL__loaddll (char *name)
     1801{
     1802  dprintf(("CRTDLL: _loaddll not implemented.\n"));
     1803  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     1804  return FALSE;
    17231805}
    17241806
     
    25062588
    25072589/*********************************************************************
    2508  *                  _pctype_dll    (CRTDLL.245)
    2509  *      FIXME - Could not find anything about it
    2510  */
    2511 INT CDECL CRTDLL__pctype_dll(DWORD ret)
    2512 {
    2513         dprintf(("CRTDLL: _pctype_dll not implemented.\n"));
    2514         return 0;
    2515 }
    2516 
    2517 
    2518 /*********************************************************************
    25192590 *                  _pipe     (CRTDLL.247)
    25202591 */
     
    25352606  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
    25362607  return FALSE;
     2608}
     2609
     2610
     2611/*********************************************************************
     2612 *                  _purecall     (CRTDLL.249)
     2613 */
     2614void CDECL CRTDLL__purecall(void)
     2615{
     2616  dprintf(("CRTDLL: _purecall\n"));
    25372617}
    25382618
     
    26702750        dprintf(("CRTDLL: _setmode\n"));
    26712751        return (_setmode(fh, mode));
     2752}
     2753
     2754
     2755/*********************************************************************
     2756 *                  _setsystime    (CRTDLL.264)
     2757 */
     2758unsigned int CDECL CRTDLL__setsystime(struct tm *tp, unsigned int ms)
     2759{
     2760  dprintf(("CRTDLL: _setsystime not implemented.\n"));
     2761  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     2762  return FALSE;
    26722763}
    26732764
     
    30493140
    30503141/*********************************************************************
     3142 *           CRTDLL__unloaddll   (CRTDLL.313)
     3143 */
     3144int CDECL CRTDLL__unloaddll(void *handle)
     3145{
     3146  dprintf(("CRTDLL: _unloaddll not implemented.\n"));
     3147  SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
     3148  return FALSE;
     3149}
     3150
     3151
     3152/*********************************************************************
    30513153 *           CRTDLL__utime       (CRTDLL.314)
    30523154 */
  • trunk/src/crtdll/crtdll.def

    r1118 r1160  
    1 ; $Id: crtdll.def,v 1.7 1999-10-04 09:55:55 sandervl Exp $
     1; $Id: crtdll.def,v 1.8 1999-10-07 09:28:48 sandervl Exp $
    22
    33;Created by BLAST for IBM's compiler
     
    120120    _CItan                      = _CRTDLL__CItan                @18
    121121    _CItanh                     = _CRTDLL__CItanh               @19
    122 ;   _HUGE_dll                                                   @20
     122    _HUGE_dll                   = CRTDLL_HUGE_dll               @20
    123123    _XcptFilter                 = _CRTDLL__XcptFilter           @21
    124124    __GetMainArgs               = _CRTDLL__GetMainArgs          @22
     
    127127    __dllonexit                 = _CRTDLL___dllonexit           @25
    128128    __doserrno                  = _CRTDLL___doserrno            @26
    129 ;   __fpecode                                                   @27
     129    __fpecode                   = _CRTDLL___fpecode             @27
    130130    __isascii                   = _CRTDLL___isascii             @28
    131131    __iscsym                    = _CRTDLL___iscsym              @29
    132132    __iscsymf                   = _CRTDLL___iscsymf             @30
    133     __mb_cur_max_dll            = _CRTDLL___mb_cur_max_dll      @31
    134 ;   __pxcptinfoptrs                                             @32
     133    __mb_cur_max_dll            = CRTDLL_mb_cur_max_dll         @31
     134    __pxcptinfoptrs             = _CRTDLL___pxcptinfoptrs       @32
    135135    __threadhandle              = _CRTDLL___threadhandle        @33
    136136    __threadid                  = _CRTDLL___threadid            @34
    137 ;   __toascii                                                   @35
     137    __toascii                   = _CRTDLL___toascii             @35
    138138    _abnormal_termination       = _CRTDLL__abnormal_termination @36
    139139    _access                     = _CRTDLL__access               @37
     
    158158    _clearfp                    = _CRTDLL__clearfp              @56
    159159    _close                      = _CRTDLL__close                @57
    160 ;   _commit                                                     @58
     160    _commit                     = _CRTDLL__commit               @58
    161161    _commode_dll                = CRTDLL_commode_dll            @59
    162162    _control87                  = _CRTDLL__control87            @60
     
    164164    _copysign                   = _CRTDLL__copysign             @62
    165165    _cprintf                    = _CRTDLL__cprintf              @63
    166 ;   _cpumode_dll                                                @64
     166    _cpumode_dll                = CRTDLL_cpumode_dll            @64
    167167    _cputs                      = _CRTDLL__cputs                @65
    168168    _creat                      = _CRTDLL__creat                @66
    169169    _cscanf                     = _CRTDLL__cscanf               @67
    170 ;   _ctype                                                      @68
     170    _ctype                      = CRTDLL_ctype                  @68
    171171    _cwait                      = _CRTDLL__cwait                @69
    172172    _daylight_dll               = CRTDLL_daylight_dll           @70
     
    176176    _endthread                  = _CRTDLL__endthread            @74
    177177    _environ_dll                = CRTDLL_environ_dll            @75
    178 ;   _eof                                                        @76
     178    _eof                        = _CRTDLL__eof                  @76
    179179    _errno                      = _CRTDLL__errno                @77
    180180    _except_handler2            = _CRTDLL__except_handler2      @78
     
    224224    _getdcwd                    = _CRTDLL__getdcwd              @121
    225225    _getdiskfree                = _CRTDLL__getdiskfree          @122
    226 ;   _getdllprocaddr                                             @123
     226    _getdllprocaddr             = _CRTDLL__getdllprocaddr       @123
    227227    _getdrive                   = _CRTDLL__getdrive             @124
    228228    _getdrives                  = _CRTDLL__getdrives            @125
    229229    _getpid                     = _CRTDLL__getpid               @126
    230 ;   _getsystime                                                 @127
     230    _getsystime                 = _CRTDLL__getsystime           @127
    231231    _getw                       = _CRTDLL__getw                 @128
    232232    _global_unwind2             = _CRTDLL__global_unwind2       @129
     
    272272    _kbhit                      = _CRTDLL__kbhit                @169
    273273    _lfind                      = _CRTDLL__lfind                @170
    274 ;   _loaddll                                                    @171
     274    _loaddll                    = _CRTDLL__loaddll              @171
    275275    _local_unwind2              = _CRTDLL__local_unwind2        @172
    276276    _locking                    = _CRTDLL__locking              @173
     
    294294    _mbctombb                   = _CRTDLL__mbctombb             @191
    295295    _mbctoupper                 = _CRTDLL__mbctoupper           @192
    296 ;   _mbctype                                                    @193
     296    _mbctype                    = CRTDLL_mbctype                @193
    297297    _mbsbtype                   = _CRTDLL__mbsbtype             @194
    298298    _mbscat                     = _CRTDLL__mbscat               @195
     
    347347    _osversion_dll              = CRTDLL_osversion_dll          @243
    348348    _pclose                     = _CRTDLL__pclose               @244
    349     _pctype_dll                 = _CRTDLL__pctype_dll           @245
    350 ;   _pgmptr_dll                                                 @246
     349    _pctype_dll                 = CRTDLL_pctype_dll             @245
     350    _pgmptr_dll                 = CRTDLL_pgmptr_dll             @246
    351351    _pipe                       = _CRTDLL__pipe                 @247
    352352    _popen                      = _CRTDLL__popen                @248
    353 ;   _purecall                                                   @249
     353    _purecall                   = _CRTDLL__purecall             @249
    354354    _putch                      = _CRTDLL__putch                @250
    355355    _putenv                     = _CRTDLL__putenv               @251
    356356    _putw                       = _CRTDLL__putw                 @252
    357 ;   _pwctype_dll                                                @253
     357    _pwctype_dll                = CRTDLL_pwctype_dll            @253
    358358    _read                       = _CRTDLL__read                 @254
    359359    _rmdir                      = _CRTDLL__rmdir                @255
     
    366366    _setjmp                     = _CRTDLL__setjmp               @262
    367367    _setmode                    = _CRTDLL__setmode              @263
    368 ;   _setsystime                                                 @264
     368    _setsystime                 = _CRTDLL__setsystime           @264
    369369    _sleep                      = _CRTDLL__sleep                @265
    370370    _snprintf                   = NTDLL__snprintf               @266
     
    416416    _ungetch                    = _CRTDLL__ungetch              @311
    417417    _unlink                     = _CRTDLL__unlink               @312
    418 ;   _unloaddll                                                  @313
     418    _unloaddll                  = _CRTDLL__unloaddll            @313
    419419    _utime                      = _CRTDLL__utime                @314
    420420    _vsnprintf                  = NTDLL__vsnprintf              @315
  • trunk/src/crtdll/crtinc.h

    r1118 r1160  
    1 /* $Id: crtinc.h,v 1.4 1999-10-04 09:55:56 sandervl Exp $ */
     1/* $Id: crtinc.h,v 1.5 1999-10-07 09:28:49 sandervl Exp $ */
    22
    33/* Definitions for the CRTDLL library (CRTDLL.DLL)
     
    4747static new_handler_type new_handler;
    4848
    49 CRTDLL_FILE * CDECL CRTDLL__fdopen(INT handle, LPCSTR mode);
    50 
    51 
    52 
     49double  *CRTDLL_HUGE_dll;        /* CRTDLL.20 */
    5350UINT    CRTDLL_argc_dll;         /* CRTDLL.23 */
    5451LPSTR   *CRTDLL_argv_dll;        /* CRTDLL.24 */
     52int     CRTDLL_mb_cur_max_dll;   /* CRTDLL.31 */
    5553LPSTR   CRTDLL_acmdln_dll;       /* CRTDLL.38 */
    5654UINT    CRTDLL_basemajor_dll;    /* CRTDLL.42 */
     
    5856UINT    CRTDLL_baseversion_dll;  /* CRTDLL.44 */
    5957UINT    CRTDLL_commode_dll;      /* CRTDLL.59 */
     58UCHAR   *CRTDLL_cpumode_dll;     /* CRTDLL.64 */
     59USHORT  *CRTDLL_ctype;           /* CRTDLL.68 */
    6060UINT    CRTDLL_daylight_dll;     /* CRTDLL.70 */
    6161LPSTR   CRTDLL_environ_dll;      /* CRTDLL.75 */
    6262LPSTR   CRTDLL_fileinfo_dll;     /* CRTDLL.95 */
    6363UINT    CRTDLL_fmode_dll;        /* CRTDLL.104 */
     64LPSTR   CRTDLL_mbctype;          /* CRTDLL.193 */
    6465UINT    CRTDLL_osmajor_dll;      /* CRTDLL.239 */
    6566UINT    CRTDLL_osminor_dll;      /* CRTDLL.240 */
     
    6768UINT    CRTDLL_osver_dll;        /* CRTDLL.242 */
    6869UINT    CRTDLL_osversion_dll;    /* CRTDLL.243 */
     70USHORT CRTDLL_pctype_dll[] = {0,0}; /* CRTDLL.245 */
     71LPSTR   CRTDLL_pgmptr_dll;       /* CRTDLL.246 */
     72USHORT *CRTDLL_pwctype_dll;      /* CRTDLL.253 */
    6973UINT    CRTDLL_sys_errlist;      /* CRTDLL.300 */
    7074UINT    CRTDLL_sys_nerr_dll;     /* CRTDLL.301 */
     
    7579UINT    CRTDLL_winver_dll;       /* CRTDLL.328 */
    7680
    77 INT CDECL NTDLL__wcsicmp( LPCWSTR str1, LPCWSTR str2 );
    78 INT CDECL CRTDLL_vfprintf( CRTDLL_FILE *file, LPSTR format, va_list args );
    79 VOID* CDECL CRTDLL_malloc(DWORD size);
    8081
     82
     83
     84CRTDLL_FILE *   CDECL CRTDLL__fdopen(INT handle, LPCSTR mode);
     85INT             CDECL NTDLL__wcsicmp( LPCWSTR str1, LPCWSTR str2 );
     86INT             CDECL CRTDLL_vfprintf( CRTDLL_FILE *file, LPSTR format, va_list args );
     87VOID *          CDECL CRTDLL_malloc(DWORD size);
     88long            CDECL CRTDLL__lseek(int handle,long offset,int origin);
     89long            CDECL CRTDLL__filelength( int i );
     90VOID            CDECL CRTDLL__exit(DWORD ret);
Note: See TracChangeset for help on using the changeset viewer.