Index: trunk/src/crtdll/crtdll.def
===================================================================
--- trunk/src/crtdll/crtdll.def	(revision 9657)
+++ trunk/src/crtdll/crtdll.def	(revision 9657)
@@ -0,0 +1,556 @@
+; $Id: crtdll.def,v 1.21 2003-01-10 13:14:55 sandervl Exp $
+
+;
+; Based on Windows 98 (Build 2222): CRTDLL.DLL
+;
+LIBRARY CRTDLL32 INITINSTANCE TERMINSTANCE
+DESCRIPTION 'Odin32 System DLL - CrtDll'
+DATA MULTIPLE NONSHARED
+
+IMPORTS
+  WriteLog = KERNEL32.1202
+  RegisterLxDll = KERNEL32.1238
+  UnregisterLxDll = KERNEL32.1239
+  MSVCRT_HUGE = MSVCRT.68
+  MSVCRT__argc = MSVCRT.78
+  MSVCRT__argv = MSVCRT.79
+  MSVCRT__acmdln = MSVCRT.126
+  MSVCRT_mb_max = MSVCRT.88
+  MSVCRT_commode = MSVCRT.160
+  MSVCRT__environ = MSVCRT.173
+  MSVCRT__fmode = MSVCRT.589
+  MSVCRT__pctype = MSVCRT._pctype
+  MSVCRT__sys_nerr = MSVCRT._sys_nerr
+  MSVCRT_tzset = MSVCRT._tzset
+  MSVCRT_winmajor_dll = MSVCRT._winmajor
+  MSVCRT_winminor_dll = MSVCRT._winminor
+  MSVCRT_winver_dll = MSVCRT._winver
+  MSVCRT_gmtime = MSVCRT._gmtime
+  MSVCRT_mktime = MSVCRT.mktime
+EXPORTS
+    ??2@YAPAXI@Z            @1
+    ??3@YAXPAX@Z            @2
+    ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z   @3
+    _CIacos         @4
+    _CIasin         @5
+    _CIatan         @6
+    _CIatan2        @7
+    _CIcos          @8
+    _CIcosh         @9
+    _CIexp          @10
+    _CIfmod         @11
+    _CIlog          @12
+    _CIlog10        @13
+    _CIpow          @14
+    _CIsin          @15
+    _CIsinh         @16
+    _CIsqrt         @17
+    _CItan          @18
+    _CItanh         @19
+    _HUGE_dll = MSVCRT_HUGE  @20
+    _XcptFilter     @21
+    __GetMainArgs   @22
+    __argc_dll = MSVCRT__argc @23
+    __argv_dll = MSVCRT__argv @24
+    __dllonexit     @25
+    __doserrno      @26
+;    __fpecode       @27
+    __isascii       @28
+    __iscsym        @29
+    __iscsymf       @30
+    __mb_cur_max_dll = MSVCRT_mb_max @31
+;   __pxcptinfoptrs   @32
+    __threadhandle    @33
+    __threadid        @34
+    __toascii         @35
+    _abnormal_termination  @36
+    _access           @37
+    _acmdln_dll = MSVCRT__acmdln @38
+;   _aexit_rtn_dll    @39
+    _amsg_exit        @40
+    _assert           @41
+    _basemajor_dll   = CRTDLL__basemajor_dll      @42
+    _baseminor_dll   = CRTDLL__baseminor_dll      @43
+    _baseversion_dll = CRTDLL__baseversion_dll    @44
+    _beep  @45
+    _beginthread  @46
+    _c_exit   @47
+    _cabs     @48
+    _cexit    @49
+    _cgets    @50
+    _chdir    @51
+    _chdrive  @52
+    _chgsign  @53
+    _chmod    @54
+    _chsize   @55
+    _clearfp   @56
+    _close     @57
+    _commit    @58
+    _commode_dll = MSVCRT_commode @59
+    _control87    @60
+    _controlfp    @61
+    _copysign     @62
+    _cprintf      @63
+    _cpumode_dll  = CRTDLL__cpumode_dll        @64
+    _cputs       @65
+    _creat       @66
+    _cscanf      @67
+    _ctype       @68
+    _cwait       @69
+;    _daylight_dll   @70
+    _dup            @71
+;   _dup2           @72
+    _ecvt           @73
+    _endthread      @74
+    _environ_dll = MSVCRT__environ   @75
+    _eof            @76
+    _errno          @77
+    _except_handler2  @78
+    _execl            @79
+;    _execle           @80
+    _execlp            @81
+    _execlpe           @82
+    _execv             @83
+    _execve            @84
+    _execvp            @85
+    _execvpe           @86
+    _exit              @87
+    _expand            @88
+    _fcloseall         @89
+    _fcvt              @90
+    _fdopen            @91
+    _fgetchar          @92
+    _fgetwchar         @93
+    _filbuf            @94
+;    _fileinfo_dll      @95
+    _filelength        @96
+    _fileno            @97
+    _findclose         @98
+    _findfirst         @99
+    _findnext          @100
+    _finite            @101
+    _flsbuf            @102
+    _flushall          @103
+    _fmode_dll = MSVCRT__fmode  @104
+    _fpclass           @105
+;   _fpieee_flt        @106
+    _fpreset           @107
+    _fputchar          @108
+    _fputwchar         @109
+    _fsopen            @110
+    _fstat          = CRTDLL__fstat  @111
+    _ftime             @112
+    _ftol              @113
+    _fullpath          @114
+    _futime            @115
+    _gcvt              @116
+    _get_osfhandle     @117
+    _getch             @118
+    _getche            @119
+    _getcwd            @120
+    _getdcwd           @121
+    _getdiskfree       @122
+    _getdllprocaddr    @123
+    _getdrive          @124
+    _getdrives         @125
+    _getpid            @126
+;   _getsystime        @127
+    _getw              @128
+    _global_unwind2    @129
+    _heapchk           @130
+    _heapmin           @131
+    _heapset           @132
+    _heapwalk          @133
+    _hypot             @134
+    _initterm          @135
+    _iob               @136
+    _isatty            @137
+    _isctype           @138
+;   _ismbbalnum        @139
+;   _ismbbalpha        @140
+;   _ismbbgraph        @141
+;   _ismbbkalnum       @142
+    _ismbbkana         @143
+;   _ismbbkpunct       @144
+    _ismbblead         @145
+;   _ismbbprint        @146
+;   _ismbbpunct        @147
+    _ismbbtrail        @148
+    _ismbcalpha        @149
+    _ismbcdigit        @150
+    _ismbchira         @151
+    _ismbckata         @152
+;   _ismbcl0           @153
+;   _ismbcl1           @154
+;   _ismbcl2           @155
+;   _ismbclegal        @156
+    _ismbclower        @157
+    _ismbcprint        @158
+    _ismbcspace        @159
+    _ismbcsymbol       @160
+    _ismbcupper        @161
+    _ismbslead         @162
+    _ismbstrail        @163
+    _isnan             @164
+    _itoa              @165
+    _itow              @600 ; @@@PH fix ordinal
+    _j0                @166
+    _j1                @167
+    _jn                @168
+    _kbhit             @169
+    _lfind             @170
+    _loaddll           @171
+    _local_unwind2     @172
+    _locking           @173
+    _logb              @174
+    _lrotl             @175
+    _lrotr             @176
+    _lsearch           @177
+    _lseek             @178
+    _ltoa              @179
+    _ltow              @601   ; @@@PH ordinal missing!
+    _makepath          @180
+    _matherr           @181
+    _mbbtombc          @182
+;   _mbbtype           @183
+    _mbccpy            @184
+;   _mbcjistojms       @185
+;   _mbcjmstojis       @186
+    _mbclen            @187
+;   _mbctohira         @188
+;   _mbctokata         @189
+    _mbctolower        @190
+;   _mbctombb          @191
+    _mbctoupper        @192
+;   _mbctype           @193
+;   _mbsbtype          @194
+    _mbscat            @195
+    _mbschr            @196
+    _mbscmp            @197
+    _mbscpy            @198
+    _mbscspn           @199
+    _mbsdec            @200
+    _mbsdup            @201
+    _mbsicmp           @202
+    _mbsinc            @203
+    _mbslen            @204
+    _mbslwr            @205
+;   _mbsnbcat          @206
+    _mbsnbcmp          @207
+    _mbsnbcnt          @208
+    _mbsnbcpy          @209
+    _mbsnbicmp         @210
+;   _mbsnbset          @211
+    _mbsncat           @212
+    _mbsnccnt          @213
+    _mbsncmp           @214
+    _mbsncpy           @215
+    _mbsnextc          @216
+    _mbsnicmp          @217
+    _mbsninc           @218
+    _mbsnset           @219
+    _mbspbrk           @220
+    _mbsrchr           @221
+    _mbsrev            @222
+    _mbsset            @223
+    _mbsspn            @224
+;   _mbsspnp           @225
+    _mbsstr            @226
+;   _mbstok            @227
+    _mbstrlen          @228
+    _mbsupr            @229
+    _memccpy           @230
+    _memicmp           @231
+    _mkdir             @232
+    _mktemp            @233
+    _msize             @234
+    _nextafter         @235
+    _onexit            @236
+    _open              @237
+    _open_osfhandle    @238
+    _osmajor_dll  =    CRTDLL__osmajor_dll        @239
+    _osminor_dll  =    CRTDLL__osminor_dll        @240
+    _osmode_dll   =    CRTDLL__osmode_dll     @241
+;   _osver_dll         @242
+    _osversion_dll =   CRTDLL__osversion_dll      @243
+    _pclose            @244
+    _pctype_dll = MSVCRT__pctype @245
+;   _pgmptr_dll        @246
+    _pipe              @247
+    _popen             @248
+    _purecall          @249
+    _putch             @250
+    _putenv            @251
+    _putw              @252
+;   _pwctype_dll       @253
+    _read              @254
+    _rmdir             @255
+    _rmtmp             @256
+    _rotl              @257
+    _rotr              @258
+    _scalb             @259
+    _searchenv         @260
+;   _seterrormode      @261
+    _setjmp            @262
+    _setmode           @263
+;   _setsystime        @264
+    _sleep             @265
+    _snprintf          @266
+    _snwprintf         @267
+    _sopen             @268
+    _spawnl            @269
+    _spawnle           @270
+    _spawnlp           @271
+    _spawnlpe          @272
+    _spawnv            @273
+    _spawnve           @274
+    _spawnvp           @275
+    _spawnvpe          @276
+    _splitpath         @277
+    _stat           = CRTDLL__stat         @278
+    _statusfp         @279
+    _strcmpi          @280
+    _strdate          @281
+    _strdec           @282
+    _strdup           @283
+    _strerror         @284
+    _stricmp          @285
+;   _stricoll         @286
+    _strinc           @287
+    _strlwr           @288
+    _strncnt          @289
+    _strnextc         @290
+    _strnicmp         @291
+    _strninc          @292
+    _strnset          @293
+    _strrev           @294
+    _strset           @295
+    _strspnp          @296
+    _strtime          @297
+    _strupr           @298
+    _swab             @299
+    _sys_errlist      @300
+    _sys_nerr_dll = MSVCRT__sys_nerr  @301
+    _tell             @302
+    _tempnam          @303
+;   _timezone_dll     @304
+    _tolower          @305
+    _toupper          @306
+    _tzname           @307
+    _tzset = MSVCRT_tzset @308
+    _ultoa            @309
+    _ultow            @602 ; @@@PH ordinal missing
+    _umask            @310
+    _ungetch          @311
+    _unlink           @312
+    _unloaddll        @313
+    _utime            @314
+    _vsnprintf        @315
+    _vsnwprintf       @316
+    _wcsdup           @317
+    _wcsicmp          @318
+    _wcsicoll         @319
+    _wcslwr           @320
+    _wcsnicmp         @321
+    _wcsnset          @322
+    _wcsrev           @323
+    _wcsset           @324
+    _wcsupr           @325
+    _winmajor_dll = MSVCRT_winmajor_dll       @326
+    _winminor_dll = MSVCRT_winminor_dll       @327
+    _winver_dll   = MSVCRT_winver_dll      @328
+    _write            @329
+    _wtoi             @330
+    _wtol             @331
+    _y0               @332
+    _y1               @333
+    _yn               @334
+    abort             @335
+    abs               @336
+    acos              @337
+    asctime           @338
+    asin              @339
+    atan              @340
+    atan2             @341
+    atexit            @342
+    atof              @343
+    atoi              @344
+    atol              @345
+    bsearch           @346
+    calloc            @347
+    ceil              @348
+    clearerr          @349
+    clock             @350
+    cos               @351
+    cosh              @352
+    ctime             @353
+    difftime          @354
+    div               @355
+    exit              @356
+    exp               @357
+    fabs              @358
+    fclose            @359
+    feof              @360
+    ferror            @361
+    fflush            @362
+    fgetc             @363
+    fgetpos           @364
+    fgets             @365
+    fgetwc            @366
+    floor             @367
+    fmod              @368
+    fopen             @369
+    fprintf           @370
+    fputc             @371
+    fputs             @372
+    fputwc            @373
+    fread             @374
+    free              @375
+    freopen           @376
+    frexp             @377
+    fscanf            @378
+    fseek             @379
+    fsetpos           @380
+    ftell             @381
+    fwprintf          @382
+    fwrite            @383
+    fwscanf           @384
+    getc              @385
+    getchar           @386
+    getenv            @387
+    gets              @388
+    gmtime = MSVCRT_gmtime  @389
+    is_wctype         @390
+    isalnum           @391
+    isalpha           @392
+    iscntrl           @393
+    isdigit           @394
+    isgraph           @395
+    isleadbyte        @396
+    islower           @397
+    isprint           @398
+    ispunct           @399
+    isspace           @400
+    isupper           @401
+    iswalnum          @402
+    iswalpha          @403
+    iswascii          @404
+    iswcntrl          @405
+    iswctype          @406
+    iswdigit          @407
+    iswgraph          @408
+    iswlower          @409
+    iswprint          @410
+    iswpunct          @411
+    iswspace          @412
+    iswupper          @413
+    iswxdigit         @414
+    isxdigit          @415
+    labs              @416
+    ldexp             @417
+    ldiv              @418
+    localeconv        @419
+    localtime         @420
+    log               @421
+    log10             @422
+    longjmp           @423
+    malloc            @424
+    mblen             @425
+    mbstowcs          @426
+    mbtowc            @427
+    memchr            @428
+    memcmp            @429
+    memcpy            @430
+    memmove           @431
+    memset            @432
+    mktime = MSVCRT_mktime   @433
+    modf              @434
+    perror            @435
+    pow               @436
+    printf            @437
+    putc              @438
+    putchar           @439
+    puts              @440
+    qsort             @441
+    raise             @442
+    rand              @443
+    realloc           @444
+    remove            @445
+    rename            @446
+    rewind            @447
+    scanf             @448
+    setbuf            @449
+    setlocale         @450
+    setvbuf           @451
+    signal            @452
+    sin               @453
+    sinh              @454
+    sprintf           @455
+    sqrt              @456
+    srand             @457
+    sscanf            @458
+    strcat            @459
+    strchr            @460
+    strcmp            @461
+    strcoll           @462
+    strcpy            @463
+    strcspn           @464
+    strerror          @465
+    strftime          @466
+    strlen            @467
+    strncat           @468
+    strncmp           @469
+    strncpy           @470
+    strpbrk           @471
+    strrchr           @472
+    strspn            @473
+    strstr            @474
+    strtod            @475
+    strtok            @476
+    strtol            @477
+    strtoul           @478
+    strxfrm           @479
+    swprintf          @480
+    swscanf           @481
+    system            @482
+    tan               @483
+    tanh              @484
+    time              @485
+    tmpfile           @486
+    tmpnam            @487
+    tolower           @488
+    toupper           @489
+    towlower          @490
+    towupper          @491
+    ungetc            @492
+    ungetwc           @493
+    vfprintf          @494
+    vfwprintf         @495
+    vprintf           @496
+    vsprintf          @497
+    vswprintf         @498
+    vwprintf          @499
+    wcscat            @500
+    wcschr            @501
+    wcscmp            @502
+    wcscoll           @503
+    wcscpy            @504
+    wcscspn           @505
+;   wcsftime          @506
+    wcslen            @507
+    wcsncat           @508
+    wcsncmp           @509
+    wcsncpy           @510
+    wcspbrk           @511
+    wcsrchr           @512
+    wcsspn            @513
+    wcsstr            @514
+;   wcstod            @515
+    wcstok            @516
+    wcstol            @517
+    wcstombs          @518
+    wcstoul           @519
+;   wcsxfrm           @520
+    wctomb            @521
+    wprintf           @522
+    wscanf            @523
Index: trunk/src/crtdll/crtdll.spec
===================================================================
--- trunk/src/crtdll/crtdll.spec	(revision 9657)
+++ trunk/src/crtdll/crtdll.spec	(revision 9657)
@@ -0,0 +1,527 @@
+# Old C runtime library. All functions provided by msvcrt
+
+@ forward ??2@YAPAXI@Z msvcrt.??2@YAPAXI@Z
+@ forward ??3@YAXPAX@Z msvcrt.??3@YAXPAX@Z
+@ forward ?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z msvcrt.?_set_new_handler@@YAP6AHI@ZP6AHI@Z@Z
+@ forward _CIacos msvcrt._CIacos
+@ forward _CIasin msvcrt._CIasin
+@ forward _CIatan msvcrt._CIatan
+@ forward _CIatan2 msvcrt._CIatan2
+@ forward _CIcos msvcrt._CIcos
+@ forward _CIcosh msvcrt._CIcosh
+@ forward _CIexp msvcrt._CIexp
+@ forward _CIfmod msvcrt._CIfmod
+@ forward _CIlog msvcrt._CIlog
+@ forward _CIlog10 msvcrt._CIlog10
+@ forward _CIpow msvcrt._CIpow
+@ forward _CIsin msvcrt._CIsin
+@ forward _CIsinh msvcrt._CIsinh
+@ forward _CIsqrt msvcrt._CIsqrt
+@ forward _CItan msvcrt._CItan
+@ forward _CItanh msvcrt._CItanh
+@ forward _HUGE_dll msvcrt._HUGE
+@ forward _XcptFilter msvcrt._XcptFilter
+@ cdecl __GetMainArgs(ptr ptr ptr long) __GetMainArgs
+@ forward __argc_dll msvcrt.__argc
+@ forward __argv_dll msvcrt.__argv
+@ forward __dllonexit msvcrt.__dllonexit
+@ forward __doserrno msvcrt.__doserrno
+@ forward __fpecode msvcrt.__fpecode
+@ forward __isascii msvcrt.__isascii
+@ forward __iscsym msvcrt.__iscsym
+@ forward __iscsymf msvcrt.__iscsymf
+@ forward __mb_cur_max_dll msvcrt.__mb_cur_max
+@ forward __pxcptinfoptrs msvcrt.__pxcptinfoptrs
+@ forward __threadhandle msvcrt.__threadhandle
+@ forward __threadid msvcrt.__threadid
+@ forward __toascii msvcrt.__toascii
+@ forward _abnormal_termination msvcrt._abnormal_termination
+@ forward _access msvcrt._access
+@ forward _acmdln_dll msvcrt._acmdln
+@ forward _aexit_rtn_dll msvcrt._aexit_rtn
+@ forward _amsg_exit msvcrt._amsg_exit
+@ forward _assert msvcrt._assert
+@ extern _basemajor_dll CRTDLL__basemajor_dll
+@ extern _baseminor_dll CRTDLL__basemajor_dll
+@ extern _baseversion_dll CRTDLL__basemajor_dll
+@ forward _beep msvcrt._beep
+@ forward _beginthread msvcrt._beginthread
+@ forward _c_exit msvcrt._c_exit
+@ forward _cabs msvcrt._cabs
+@ forward _cexit msvcrt._cexit
+@ forward _cgets msvcrt._cgets
+@ forward _chdir msvcrt._chdir
+@ forward _chdrive msvcrt._chdrive
+@ forward _chgsign msvcrt._chgsign
+@ forward _chmod msvcrt._chmod
+@ forward _chsize msvcrt._chsize
+@ forward _clearfp msvcrt._clearfp
+@ forward _close msvcrt._close
+@ forward _commit msvcrt._commit
+@ forward _commode_dll msvcrt._commode
+@ forward _control87 msvcrt._control87
+@ forward _controlfp msvcrt._controlfp
+@ forward _copysign msvcrt._copysign
+@ forward _cprintf msvcrt._cprintf
+@ extern _cpumode_dll CRTDLL__cpumode_dll
+@ forward _cputs msvcrt._cputs
+@ forward _creat msvcrt._creat
+@ forward _cscanf msvcrt._cscanf
+@ forward _ctype msvcrt._ctype
+@ forward _cwait msvcrt._cwait
+@ forward _daylight_dll msvcrt._daylight
+@ forward _dup msvcrt._dup
+@ forward _dup2 msvcrt._dup2
+@ forward _ecvt msvcrt._ecvt
+@ forward _endthread msvcrt._endthread
+@ forward _environ_dll msvcrt._environ
+@ forward _eof msvcrt._eof
+@ forward _errno msvcrt._errno
+@ forward _except_handler2 msvcrt._except_handler2
+@ forward _execl msvcrt._execl
+@ forward _execle msvcrt._execle
+@ forward _execlp msvcrt._execlp
+@ forward _execlpe msvcrt._execlpe
+@ forward _execv msvcrt._execv
+@ forward _execve msvcrt._execve
+@ forward _execvp msvcrt._execvp
+@ forward _execvpe msvcrt._execvpe
+@ forward _exit msvcrt._exit
+@ forward _expand msvcrt._expand
+@ forward _fcloseall msvcrt._fcloseall
+@ forward _fcvt msvcrt._fcvt
+@ forward _fdopen msvcrt._fdopen
+@ forward _fgetchar msvcrt._fgetchar
+@ forward _fgetwchar msvcrt._fgetwchar
+@ forward _filbuf msvcrt._filbuf
+@ forward _fileinfo_dll msvcrt._fileinfo
+@ forward _filelength msvcrt._filelength
+@ forward _fileno msvcrt._fileno
+@ forward _findclose msvcrt._findclose
+@ forward _findfirst msvcrt._findfirst
+@ forward _findnext msvcrt._findnext
+@ forward _finite msvcrt._finite
+@ forward _flsbuf msvcrt._flsbuf
+@ forward _flushall msvcrt._flushall
+@ forward _fmode_dll msvcrt._fmode
+@ forward _fpclass msvcrt._fpclass
+@ forward _fpieee_flt msvcrt._fpieee_flt
+@ forward _fpreset msvcrt._fpreset
+@ forward _fputchar msvcrt._fputchar
+@ forward _fputwchar msvcrt._fputwchar
+@ forward _fsopen msvcrt._fsopen
+@ cdecl _fstat(long ptr) CRTDLL__fstat
+@ forward _ftime msvcrt._ftime
+@ forward _ftol msvcrt._ftol
+@ forward _fullpath msvcrt._fullpath
+@ forward _futime msvcrt._futime
+@ forward _gcvt msvcrt._gcvt
+@ forward _get_osfhandle msvcrt._get_osfhandle
+@ forward _getch msvcrt._getch
+@ forward _getche msvcrt._getche
+@ forward _getcwd msvcrt._getcwd
+@ forward _getdcwd msvcrt._getdcwd
+@ forward _getdiskfree msvcrt._getdiskfree
+@ forward _getdllprocaddr msvcrt._getdllprocaddr
+@ forward _getdrive msvcrt._getdrive
+@ forward _getdrives msvcrt._getdrives
+@ forward _getpid msvcrt._getpid
+@ forward _getsystime msvcrt._getsystime
+@ forward _getw msvcrt._getw
+@ forward _global_unwind2 msvcrt._global_unwind2
+@ forward _heapchk msvcrt._heapchk
+@ forward _heapmin msvcrt._heapmin
+@ forward _heapset msvcrt._heapset
+@ forward _heapwalk msvcrt._heapwalk
+@ forward _hypot msvcrt._hypot
+@ forward _initterm msvcrt._initterm
+@ forward _iob msvcrt._iob
+@ forward _isatty msvcrt._isatty
+@ forward _isctype msvcrt._isctype
+@ forward _ismbbalnum msvcrt._ismbbalnum
+@ forward _ismbbalpha msvcrt._ismbbalpha
+@ forward _ismbbgraph msvcrt._ismbbgraph
+@ forward _ismbbkalnum msvcrt._ismbbkalnum
+@ forward _ismbbkana msvcrt._ismbbkana
+@ forward _ismbbkpunct msvcrt._ismbbkpunct
+@ forward _ismbblead msvcrt._ismbblead
+@ forward _ismbbprint msvcrt._ismbbprint
+@ forward _ismbbpunct msvcrt._ismbbpunct
+@ forward _ismbbtrail msvcrt._ismbbtrail
+@ forward _ismbcalpha msvcrt._ismbcalpha
+@ forward _ismbcdigit msvcrt._ismbcdigit
+@ forward _ismbchira msvcrt._ismbchira
+@ forward _ismbckata msvcrt._ismbckata
+@ forward _ismbcl0 msvcrt._ismbcl0
+@ forward _ismbcl1 msvcrt._ismbcl1
+@ forward _ismbcl2 msvcrt._ismbcl2
+@ forward _ismbclegal msvcrt._ismbclegal
+@ forward _ismbclower msvcrt._ismbclower
+@ forward _ismbcprint msvcrt._ismbcprint
+@ forward _ismbcspace msvcrt._ismbcspace
+@ forward _ismbcsymbol msvcrt._ismbcsymbol
+@ forward _ismbcupper msvcrt._ismbcupper
+@ forward _ismbslead msvcrt._ismbslead
+@ forward _ismbstrail msvcrt._ismbstrail
+@ forward _isnan msvcrt._isnan
+@ forward _itoa msvcrt._itoa
+@ forward _j0 msvcrt._j0
+@ forward _j1 msvcrt._j1
+@ forward _jn msvcrt._jn
+@ forward _kbhit msvcrt._kbhit
+@ forward _lfind msvcrt._lfind
+@ forward _loaddll msvcrt._loaddll
+@ forward _local_unwind2 msvcrt._local_unwind2
+@ forward _locking msvcrt._locking
+@ forward _logb msvcrt._logb
+@ forward _lrotl msvcrt._lrotl
+@ forward _lrotr msvcrt._lrotr
+@ forward _lsearch msvcrt._lsearch
+@ forward _lseek msvcrt._lseek
+@ forward _ltoa msvcrt._ltoa
+@ forward _makepath msvcrt._makepath
+@ forward _matherr msvcrt._matherr
+@ forward _mbbtombc msvcrt._mbbtombc
+@ forward _mbbtype msvcrt._mbbtype
+@ forward _mbccpy msvcrt._mbccpy
+@ forward _mbcjistojms msvcrt._mbcjistojms
+@ forward _mbcjmstojis msvcrt._mbcjmstojis
+@ forward _mbclen msvcrt._mbclen
+@ forward _mbctohira msvcrt._mbctohira
+@ forward _mbctokata msvcrt._mbctokata
+@ forward _mbctolower msvcrt._mbctolower
+@ forward _mbctombb msvcrt._mbctombb
+@ forward _mbctoupper msvcrt._mbctoupper
+@ forward _mbctype msvcrt._mbctype
+@ forward _mbsbtype msvcrt._mbsbtype
+@ forward _mbscat msvcrt._mbscat
+@ forward _mbschr msvcrt._mbschr
+@ forward _mbscmp msvcrt._mbscmp
+@ forward _mbscpy msvcrt._mbscpy
+@ forward _mbscspn msvcrt._mbscspn
+@ forward _mbsdec msvcrt._mbsdec
+@ forward _mbsdup msvcrt._mbsdup
+@ forward _mbsicmp msvcrt._mbsicmp
+@ forward _mbsinc msvcrt._mbsinc
+@ forward _mbslen msvcrt._mbslen
+@ forward _mbslwr msvcrt._mbslwr
+@ forward _mbsnbcat msvcrt._mbsnbcat
+@ forward _mbsnbcmp msvcrt._mbsnbcmp
+@ forward _mbsnbcnt msvcrt._mbsnbcnt
+@ forward _mbsnbcpy msvcrt._mbsnbcpy
+@ forward _mbsnbicmp msvcrt._mbsnbicmp
+@ forward _mbsnbset msvcrt._mbsnbset
+@ forward _mbsncat msvcrt._mbsncat
+@ forward _mbsnccnt msvcrt._mbsnccnt
+@ forward _mbsncmp msvcrt._mbsncmp
+@ forward _mbsncpy msvcrt._mbsncpy
+@ forward _mbsnextc msvcrt._mbsnextc
+@ forward _mbsnicmp msvcrt._mbsnicmp
+@ forward _mbsninc msvcrt._mbsninc
+@ forward _mbsnset msvcrt._mbsnset
+@ forward _mbspbrk msvcrt._mbspbrk
+@ forward _mbsrchr msvcrt._mbsrchr
+@ forward _mbsrev msvcrt._mbsrev
+@ forward _mbsset msvcrt._mbsset
+@ forward _mbsspn msvcrt._mbsspn
+@ forward _mbsspnp msvcrt._mbsspnp
+@ forward _mbsstr msvcrt._mbsstr
+@ forward _mbstok msvcrt._mbstok
+@ forward _mbstrlen msvcrt._mbstrlen
+@ forward _mbsupr msvcrt._mbsupr
+@ forward _memccpy msvcrt._memccpy
+@ forward _memicmp msvcrt._memicmp
+@ forward _mkdir msvcrt._mkdir
+@ forward _mktemp msvcrt._mktemp
+@ forward _msize msvcrt._msize
+@ forward _nextafter msvcrt._nextafter
+@ forward _onexit msvcrt._onexit
+@ forward _open msvcrt._open
+@ forward _open_osfhandle msvcrt._open_osfhandle
+@ extern _osmajor_dll CRTDLL__osmajor_dll
+@ extern _osminor_dll CRTDLL__osminor_dll
+@ extern _osmode_dll CRTDLL__osmode_dll
+@ forward _osver_dll msvcrt._osver
+@ extern _osversion_dll CRTDLL__osversion_dll
+@ forward _pclose msvcrt._pclose
+@ forward _pctype_dll msvcrt._pctype
+@ forward _pgmptr_dll msvcrt._pgmptr
+@ forward _pipe msvcrt._pipe
+@ forward _popen msvcrt._popen
+@ forward _purecall msvcrt._purecall
+@ forward _putch msvcrt._putch
+@ forward _putenv msvcrt._putenv
+@ forward _putw msvcrt._putw
+@ forward _pwctype_dll msvcrt._pwctype
+@ forward _read msvcrt._read
+@ forward _rmdir msvcrt._rmdir
+@ forward _rmtmp msvcrt._rmtmp
+@ forward _rotl msvcrt._rotl
+@ forward _rotr msvcrt._rotr
+@ forward _scalb msvcrt._scalb
+@ forward _searchenv msvcrt._searchenv
+@ forward _seterrormode msvcrt._seterrormode
+@ forward _setjmp msvcrt._setjmp
+@ forward _setmode msvcrt._setmode
+@ forward _setsystime msvcrt._setsystime
+@ forward _sleep msvcrt._sleep
+@ forward _snprintf msvcrt._snprintf
+@ forward _snwprintf msvcrt._snwprintf
+@ forward _sopen msvcrt._sopen
+@ forward _spawnl msvcrt._spawnl
+@ forward _spawnle msvcrt._spawnle
+@ forward _spawnlp msvcrt._spawnlp
+@ forward _spawnlpe msvcrt._spawnlpe
+@ forward _spawnv msvcrt._spawnv
+@ forward _spawnve msvcrt._spawnve
+@ forward _spawnvp msvcrt._spawnvp
+@ forward _spawnvpe msvcrt._spawnvpe
+@ forward _splitpath msvcrt._splitpath
+@ cdecl _stat(str ptr) CRTDLL__stat
+@ forward _statusfp msvcrt._statusfp
+@ forward _strcmpi msvcrt._strcmpi
+@ forward _strdate msvcrt._strdate
+@ cdecl _strdec(str str) _strdec
+@ forward _strdup msvcrt._strdup
+@ forward _strerror msvcrt._strerror
+@ forward _stricmp msvcrt._stricmp
+@ forward _stricoll msvcrt._stricoll
+@ cdecl _strinc(str) _strinc
+@ forward _strlwr msvcrt._strlwr
+@ cdecl _strncnt(str long) _strncnt
+@ cdecl _strnextc(str) _strnextc
+@ forward _strnicmp msvcrt._strnicmp
+@ cdecl _strninc(str long) _strninc
+@ forward _strnset msvcrt._strnset
+@ forward _strrev msvcrt._strrev
+@ forward _strset msvcrt._strset
+@ cdecl _strspnp(str str) _strspnp
+@ forward _strtime msvcrt._strtime
+@ forward _strupr msvcrt._strupr
+@ forward _swab msvcrt._swab
+@ forward _sys_errlist msvcrt._sys_errlist
+@ forward _sys_nerr_dll msvcrt._sys_nerr
+@ forward _tell msvcrt._tell
+@ forward _tempnam msvcrt._tempnam
+@ forward _timezone_dll msvcrt._timezone
+@ forward _tolower msvcrt._tolower
+@ forward _toupper msvcrt._toupper
+@ forward _tzname msvcrt._tzname
+@ forward _tzset msvcrt._tzset
+@ forward _ultoa msvcrt._ultoa
+@ forward _umask msvcrt._umask
+@ forward _ungetch msvcrt._ungetch
+@ forward _unlink msvcrt._unlink
+@ forward _unloaddll msvcrt._unloaddll
+@ forward _utime msvcrt._utime
+@ forward _vsnprintf msvcrt._vsnprintf
+@ forward _vsnwprintf msvcrt._vsnwprintf
+@ forward _wcsdup msvcrt._wcsdup
+@ forward _wcsicmp msvcrt._wcsicmp
+@ forward _wcsicoll msvcrt._wcsicoll
+@ forward _wcslwr msvcrt._wcslwr
+@ forward _wcsnicmp msvcrt._wcsnicmp
+@ forward _wcsnset msvcrt._wcsnset
+@ forward _wcsrev msvcrt._wcsrev
+@ forward _wcsset msvcrt._wcsset
+@ forward _wcsupr msvcrt._wcsupr
+@ forward _winmajor_dll msvcrt._winmajor
+@ forward _winminor_dll msvcrt._winminor
+@ forward _winver_dll msvcrt._winver
+@ forward _write msvcrt._write
+@ forward _wtoi msvcrt._wtoi
+@ forward _wtol msvcrt._wtol
+@ forward _y0 msvcrt._y0
+@ forward _y1 msvcrt._y1
+@ forward _yn msvcrt._yn
+@ forward abort msvcrt.abort
+@ forward abs msvcrt.abs
+@ forward acos msvcrt.acos
+@ forward asctime msvcrt.asctime
+@ forward asin msvcrt.asin
+@ forward atan msvcrt.atan
+@ forward atan2 msvcrt.atan2
+@ forward atexit msvcrt.atexit
+@ forward atof msvcrt.atof
+@ forward atoi msvcrt.atoi
+@ forward atol msvcrt.atol
+@ forward bsearch msvcrt.bsearch
+@ forward calloc msvcrt.calloc
+@ forward ceil msvcrt.ceil
+@ forward clearerr msvcrt.clearerr
+@ forward clock msvcrt.clock
+@ forward cos msvcrt.cos
+@ forward cosh msvcrt.cosh
+@ forward ctime msvcrt.ctime
+@ forward difftime msvcrt.difftime
+@ forward div msvcrt.div
+@ forward exit msvcrt.exit
+@ forward exp msvcrt.exp
+@ forward fabs msvcrt.fabs
+@ forward fclose msvcrt.fclose
+@ forward feof msvcrt.feof
+@ forward ferror msvcrt.ferror
+@ forward fflush msvcrt.fflush
+@ forward fgetc msvcrt.fgetc
+@ forward fgetpos msvcrt.fgetpos
+@ forward fgets msvcrt.fgets
+@ forward fgetwc msvcrt.fgetwc
+@ forward floor msvcrt.floor
+@ forward fmod msvcrt.fmod
+@ forward fopen msvcrt.fopen
+@ forward fprintf msvcrt.fprintf
+@ forward fputc msvcrt.fputc
+@ forward fputs msvcrt.fputs
+@ forward fputwc msvcrt.fputwc
+@ forward fread msvcrt.fread
+@ forward free msvcrt.free
+@ forward freopen msvcrt.freopen
+@ forward frexp msvcrt.frexp
+@ forward fscanf msvcrt.fscanf
+@ forward fseek msvcrt.fseek
+@ forward fsetpos msvcrt.fsetpos
+@ forward ftell msvcrt.ftell
+@ forward fwprintf msvcrt.fwprintf
+@ forward fwrite msvcrt.fwrite
+@ forward fwscanf msvcrt.fwscanf
+@ forward getc msvcrt.getc
+@ forward getchar msvcrt.getchar
+@ forward getenv msvcrt.getenv
+@ forward gets msvcrt.gets
+@ forward gmtime msvcrt.gmtime
+@ forward is_wctype msvcrt.is_wctype
+@ forward isalnum msvcrt.isalnum
+@ forward isalpha msvcrt.isalpha
+@ forward iscntrl msvcrt.iscntrl
+@ forward isdigit msvcrt.isdigit
+@ forward isgraph msvcrt.isgraph
+@ forward isleadbyte msvcrt.isleadbyte
+@ forward islower msvcrt.islower
+@ forward isprint msvcrt.isprint
+@ forward ispunct msvcrt.ispunct
+@ forward isspace msvcrt.isspace
+@ forward isupper msvcrt.isupper
+@ forward iswalnum msvcrt.iswalnum
+@ forward iswalpha msvcrt.iswalpha
+@ forward iswascii msvcrt.iswascii
+@ forward iswcntrl msvcrt.iswcntrl
+@ forward iswctype msvcrt.iswctype
+@ forward iswdigit msvcrt.iswdigit
+@ forward iswgraph msvcrt.iswgraph
+@ forward iswlower msvcrt.iswlower
+@ forward iswprint msvcrt.iswprint
+@ forward iswpunct msvcrt.iswpunct
+@ forward iswspace msvcrt.iswspace
+@ forward iswupper msvcrt.iswupper
+@ forward iswxdigit msvcrt.iswxdigit
+@ forward isxdigit msvcrt.isxdigit
+@ forward labs msvcrt.labs
+@ forward ldexp msvcrt.ldexp
+@ forward ldiv msvcrt.ldiv
+@ forward localeconv msvcrt.localeconv
+@ forward localtime msvcrt.localtime
+@ forward log msvcrt.log
+@ forward log10 msvcrt.log10
+@ forward longjmp msvcrt.longjmp
+@ forward malloc msvcrt.malloc
+@ forward mblen msvcrt.mblen
+@ forward mbstowcs msvcrt.mbstowcs
+@ forward mbtowc msvcrt.mbtowc
+@ forward memchr msvcrt.memchr
+@ forward memcmp msvcrt.memcmp
+@ forward memcpy msvcrt.memcpy
+@ forward memmove msvcrt.memmove
+@ forward memset msvcrt.memset
+@ forward mktime msvcrt.mktime
+@ forward modf msvcrt.modf
+@ forward perror msvcrt.perror
+@ forward pow msvcrt.pow
+@ forward printf msvcrt.printf
+@ forward putc msvcrt.putc
+@ forward putchar msvcrt.putchar
+@ forward puts msvcrt.puts
+@ forward qsort msvcrt.qsort
+@ forward raise msvcrt.raise
+@ forward rand msvcrt.rand
+@ forward realloc msvcrt.realloc
+@ forward remove msvcrt.remove
+@ forward rename msvcrt.rename
+@ forward rewind msvcrt.rewind
+@ forward scanf msvcrt.scanf
+@ forward setbuf msvcrt.setbuf
+@ forward setlocale msvcrt.setlocale
+@ forward setvbuf msvcrt.setvbuf
+@ forward signal msvcrt.signal
+@ forward sin msvcrt.sin
+@ forward sinh msvcrt.sinh
+@ forward sprintf msvcrt.sprintf
+@ forward sqrt msvcrt.sqrt
+@ forward srand msvcrt.srand
+@ forward sscanf msvcrt.sscanf
+@ forward strcat msvcrt.strcat
+@ forward strchr msvcrt.strchr
+@ forward strcmp msvcrt.strcmp
+@ forward strcoll msvcrt.strcoll
+@ forward strcpy msvcrt.strcpy
+@ forward strcspn msvcrt.strcspn
+@ forward strerror msvcrt.strerror
+@ forward strftime msvcrt.strftime
+@ forward strlen msvcrt.strlen
+@ forward strncat msvcrt.strncat
+@ forward strncmp msvcrt.strncmp
+@ forward strncpy msvcrt.strncpy
+@ forward strpbrk msvcrt.strpbrk
+@ forward strrchr msvcrt.strrchr
+@ forward strspn msvcrt.strspn
+@ forward strstr msvcrt.strstr
+@ forward strtod msvcrt.strtod
+@ forward strtok msvcrt.strtok
+@ forward strtol msvcrt.strtol
+@ forward strtoul msvcrt.strtoul
+@ forward strxfrm msvcrt.strxfrm
+@ forward swprintf msvcrt.swprintf
+@ forward swscanf msvcrt.swscanf
+@ forward system msvcrt.system
+@ forward tan msvcrt.tan
+@ forward tanh msvcrt.tanh
+@ forward time msvcrt.time
+@ forward tmpfile msvcrt.tmpfile
+@ forward tmpnam msvcrt.tmpnam
+@ forward tolower msvcrt.tolower
+@ forward toupper msvcrt.toupper
+@ forward towlower msvcrt.towlower
+@ forward towupper msvcrt.towupper
+@ forward ungetc msvcrt.ungetc
+@ forward ungetwc msvcrt.ungetwc
+@ forward vfprintf msvcrt.vfprintf
+@ forward vfwprintf msvcrt.vfwprintf
+@ forward vprintf msvcrt.vprintf
+@ forward vsprintf msvcrt.vsprintf
+@ forward vswprintf msvcrt.vswprintf
+@ forward vwprintf msvcrt.vwprintf
+@ forward wcscat msvcrt.wcscat
+@ forward wcschr msvcrt.wcschr
+@ forward wcscmp msvcrt.wcscmp
+@ forward wcscoll msvcrt.wcscoll
+@ forward wcscpy msvcrt.wcscpy
+@ forward wcscspn msvcrt.wcscspn
+@ forward wcsftime msvcrt.wcsftime
+@ forward wcslen msvcrt.wcslen
+@ forward wcsncat msvcrt.wcsncat
+@ forward wcsncmp msvcrt.wcsncmp
+@ forward wcsncpy msvcrt.wcsncpy
+@ forward wcspbrk msvcrt.wcspbrk
+@ forward wcsrchr msvcrt.wcsrchr
+@ forward wcsspn msvcrt.wcsspn
+@ forward wcsstr msvcrt.wcsstr
+@ forward wcstod msvcrt.wcstod
+@ forward wcstok msvcrt.wcstok
+@ forward wcstol msvcrt.wcstol
+@ forward wcstombs msvcrt.wcstombs
+@ forward wcstoul msvcrt.wcstoul
+@ forward wcsxfrm msvcrt.wcsxfrm
+@ forward wctomb msvcrt.wctomb
+@ forward wprintf msvcrt.wprintf
+@ forward wscanf msvcrt.wscanf
+@ forward _itow msvcrt._itow
+@ forward _ltow msvcrt._ltow
Index: trunk/src/crtdll/crtdll_main.c
===================================================================
--- trunk/src/crtdll/crtdll_main.c	(revision 9657)
+++ trunk/src/crtdll/crtdll_main.c	(revision 9657)
@@ -0,0 +1,193 @@
+/*
+ * Old C RunTime DLL - All functionality is provided by msvcrt.
+ *
+ * Copyright 2000 Jon Griffiths
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+
+#include "config.h"
+#include "windef.h"
+#include "winbase.h"
+#define USE_MSVCRT_PREFIX
+#include "msvcrt/sys/stat.h"
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(crtdll);
+
+/* from msvcrt */
+extern void __getmainargs( int *argc, char ***argv, char ***envp,
+                           int expand_wildcards, int *new_mode );
+
+/* The following data items are not exported from msvcrt */
+unsigned int CRTDLL__basemajor_dll;
+unsigned int CRTDLL__baseminor_dll;
+unsigned int CRTDLL__baseversion_dll;
+unsigned int CRTDLL__cpumode_dll;
+unsigned int CRTDLL__osmajor_dll;
+unsigned int CRTDLL__osminor_dll;
+unsigned int CRTDLL__osmode_dll;
+unsigned int CRTDLL__osversion_dll;
+
+/* dev_t is a short in crtdll but an unsigned int in msvcrt */
+typedef short crtdll_dev_t;
+
+struct crtdll_stat
+{
+  crtdll_dev_t   st_dev;
+  _ino_t         st_ino;
+  unsigned short st_mode;
+  short          st_nlink;
+  short          st_uid;
+  short          st_gid;
+  crtdll_dev_t   st_rdev;
+  MSVCRT(_off_t) st_size;
+  MSVCRT(time_t) st_atime;
+  MSVCRT(time_t) st_mtime;
+  MSVCRT(time_t) st_ctime;
+};
+
+/* convert struct _stat from crtdll format to msvcrt format */
+static void convert_struct_stat( struct crtdll_stat *dst, const struct _stat *src )
+{
+    dst->st_dev   = src->st_dev;
+    dst->st_ino   = src->st_ino;
+    dst->st_mode  = src->st_mode;
+    dst->st_nlink = src->st_nlink;
+    dst->st_uid   = src->st_uid;
+    dst->st_gid   = src->st_gid;
+    dst->st_rdev  = src->st_rdev;
+    dst->st_size  = src->st_size;
+    dst->st_atime = src->st_atime;
+    dst->st_mtime = src->st_mtime;
+    dst->st_ctime = src->st_ctime;
+}
+
+
+/*********************************************************************
+ *                  DllMain  (CRTDLL.init)
+ */
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+{
+  TRACE("CRTDLL32(%p,%ld,%p)\n",hinstDLL,fdwReason,lpvReserved);
+
+  if (fdwReason == DLL_PROCESS_ATTACH)
+  {
+    DWORD version;// = GetVersion();
+    CRTDLL__basemajor_dll   = (version >> 24) & 0xFF;
+    CRTDLL__baseminor_dll   = (version >> 16) & 0xFF;
+    CRTDLL__baseversion_dll = (version >> 16);
+    CRTDLL__cpumode_dll     = 1; /* FIXME */
+    CRTDLL__osmajor_dll     = (version>>8) & 0xFF;
+    CRTDLL__osminor_dll     = (version & 0xFF);
+    CRTDLL__osmode_dll      = 1; /* FIXME */
+    CRTDLL__osversion_dll   = (version & 0xFFFF);
+  }
+  return TRUE;
+}
+
+
+/*********************************************************************
+ *                  __GetMainArgs  (CRTDLL.@)
+ */
+void __GetMainArgs( int *argc, char ***argv, char ***envp, int expand_wildcards )
+{
+    int new_mode = 0;
+    __getmainargs( argc, argv, envp, expand_wildcards, &new_mode );
+}
+
+
+/*********************************************************************
+ *		_fstat (CRTDLL.@)
+ */
+int CRTDLL__fstat(int fd, struct crtdll_stat* buf)
+{
+    extern int _fstat(int,struct _stat*);
+    struct _stat st;
+    int ret;
+
+    if (!(ret = _fstat( fd, &st ))) convert_struct_stat( buf, &st );
+    return ret;
+}
+
+
+/*********************************************************************
+ *		_stat (CRTDLL.@)
+ */
+int CRTDLL__stat(const char* path, struct crtdll_stat * buf)
+{
+    extern int _stat(const char*,struct _stat*);
+    struct _stat st;
+    int ret;
+
+    if (!(ret = _stat( path, &st ))) convert_struct_stat( buf, &st );
+    return ret;
+}
+
+
+/*********************************************************************
+ *		_strdec (CRTDLL.@)
+ */
+char *_strdec(const char *str1, const char *str2)
+{
+    return (char *)(str2 - 1);
+}
+
+
+/*********************************************************************
+ *		_strinc (CRTDLL.@)
+ */
+char *_strinc(const char *str)
+{
+    return (char *)(str + 1);
+}
+
+
+/*********************************************************************
+ *		_strncnt (CRTDLL.@)
+ */
+size_t _strncnt(const char *str, size_t maxlen)
+{
+    size_t len = strlen(str);
+    return (len > maxlen) ? maxlen : len;
+}
+
+
+/*********************************************************************
+ *		_strnextc (CRTDLL.@)
+ */
+unsigned int _strnextc(const char *str)
+{
+    return (unsigned int)str[0];
+}
+
+
+/*********************************************************************
+ *		_strninc (CRTDLL.@)
+ */
+char *_strninc(const char *str, size_t len)
+{
+    return (char *)(str + len);
+}
+
+
+/*********************************************************************
+ *		_strspnp (CRTDLL.@)
+ */
+char *_strspnp( const char *str1, const char *str2)
+{
+    str1 += strspn( str1, str2 );
+    return *str1 ? (char*)str1 : NULL;
+}
Index: trunk/src/crtdll/crtdllrsrc.orc
===================================================================
--- trunk/src/crtdll/crtdllrsrc.orc	(revision 9656)
+++ trunk/src/crtdll/crtdllrsrc.orc	(revision 9657)
@@ -1,3 +1,3 @@
-/* $Id: crtdllrsrc.orc,v 1.1 2000-03-06 23:38:31 bird Exp $ */
+/* $Id: crtdllrsrc.orc,v 1.2 2003-01-10 13:14:56 sandervl Exp $ */
 
 #include "winuser.h"
Index: trunk/src/crtdll/maincrtdll.c
===================================================================
--- trunk/src/crtdll/maincrtdll.c	(revision 9657)
+++ trunk/src/crtdll/maincrtdll.c	(revision 9657)
@@ -0,0 +1,73 @@
+/*
+ * msvcrt.dll initialisation functions
+ *
+ * Copyright 2000 Jon Griffiths
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#define TLS_OUT_OF_INDEXES ((DWORD)0xFFFFFFFF)
+
+#include "wine/debug.h"
+
+WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
+
+
+int _CRT_init (void);
+void _CRT_term (void);
+void __ctordtorInit (void);
+void __ctordtorTerm (void);
+
+static HMODULE dllHandle = 0;
+
+BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved);
+
+
+unsigned long _DLL_InitTerm (unsigned long mod_handle,
+                                unsigned long flag)
+{
+  switch (flag)
+    {
+       case 0:
+         if (_CRT_init () != 0)
+           return 0;
+         __ctordtorInit ();
+
+         dllHandle = RegisterLxDll(mod_handle, CRTDLL_Init, 0,0,0,0);
+
+        return 1;
+       case 1:
+         __ctordtorTerm ();
+         _CRT_term ();
+
+         if(dllHandle) {
+             UnregisterLxDll(dllHandle);
+         }
+
+         return 1;
+       default:
+         return 0;
+       }
+     return 1;
+   }
+
+/*********************************************************************
+ *                  Init
+ */
+BOOL WINAPI CRTDLL_Init(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
+{
+ return DllMain(hinstDLL,fdwReason,lpvReserved);
+}
+ 
+
Index: trunk/src/crtdll/makefile
===================================================================
--- trunk/src/crtdll/makefile	(revision 9657)
+++ trunk/src/crtdll/makefile	(revision 9657)
@@ -0,0 +1,52 @@
+# $Id: makefile,v 1.19 2003-01-10 13:14:56 sandervl Exp $
+
+#
+# Odin32 API
+#
+#       crtdll.dll makefile
+#
+
+
+CCENV = EMX
+NOTEXPDEF = 1
+
+#
+# Compiler, tools, and interference rules.
+#
+!include ../../makefile.inc
+
+
+#
+# Object files. Prefix with OBJDIR and one space before the '\'.
+#
+OBJS = \
+$(OBJDIR)\crtdll_main.obj \
+$(OBJDIR)\crtdllrsrc.obj \
+$(OBJDIR)\maincrtdll.obj 
+
+#
+# Target name - name of the dll without extention and path.
+# Original target
+#
+TARGET      = crtdll32
+ORGTARGET   = crtdll
+
+all: $(OBJDIR) $(OBJDIR)\$(TARGET).dll $(ORGTARGET).lib
+
+$(OBJDIR)\$(TARGET).dll: $(OBJS) $(ORGTARGET).def
+    $(LD) $(LDFLAGS) -L$(ODIN32_LIB_)\Release -Zso -Zsys $(OBJS) $(ORGTARGET).def -L.\libs -lm\
+      -liberty_s -lmsvcrt -o $(OBJDIR)\$(TARGET).dll
+    touch $(OBJDIR)\$(TARGET).map
+    @echo "Illegal Sym File for EMX" > $(OBJDIR)\$(TARGET).sym
+
+# Includes the common rules.
+#
+!include $(ODIN32_POST_INC)
+
+$(ORGTARGET).lib: 
+    implib $(OBJDIR)\$(ORGTARGET).lib crtdll.def
+    @copy $(OBJDIR)\$(ORGTARGET).lib $(ODIN32_LIB_)\Release > nul:
+    @copy $(OBJDIR)\$(ORGTARGET).lib $(ODIN32_LIB_)\Debug  > nul:
+
+
+
