From 4610a1b0775fcc471c43132aa66444d406a945f8 Mon Sep 17 00:00:00 2001 From: Royce Mitchell III Date: Tue, 15 Jul 2003 19:27:25 +0000 Subject: [PATCH] modified crtdll to forward most of it's CTYPE, STRING and WSTRING entries to NTDLL or MSVCRT. svn path=/trunk/; revision=5132 --- reactos/ChangeLog | 5 + reactos/lib/crtdll/crtdll.def | 134 ++++++------ reactos/lib/crtdll/ctype/ctype.c | 264 ----------------------- reactos/lib/crtdll/ctype/isalnum.c | 29 --- reactos/lib/crtdll/ctype/isalpha.c | 31 --- reactos/lib/crtdll/ctype/isascii.c | 27 --- reactos/lib/crtdll/ctype/iscntrl.c | 21 -- reactos/lib/crtdll/ctype/iscsym.c | 27 --- reactos/lib/crtdll/ctype/isctype.c | 12 ++ reactos/lib/crtdll/ctype/isdigit.c | 21 -- reactos/lib/crtdll/ctype/isgraph.c | 20 -- reactos/lib/crtdll/ctype/islower.c | 20 -- reactos/lib/crtdll/ctype/isprint.c | 19 -- reactos/lib/crtdll/ctype/ispunct.c | 21 -- reactos/lib/crtdll/ctype/isspace.c | 30 --- reactos/lib/crtdll/ctype/isupper.c | 20 -- reactos/lib/crtdll/ctype/isxdigit.c | 22 -- reactos/lib/crtdll/ctype/toascii.c | 12 -- reactos/lib/crtdll/ctype/tolower.c | 45 ---- reactos/lib/crtdll/ctype/toupper.c | 45 ---- reactos/lib/crtdll/makefile | 104 ++++----- reactos/lib/crtdll/stdlib/itoa.c | 12 ++ reactos/lib/crtdll/stdlib/itow.c | 14 +- reactos/lib/crtdll/string/memccpy.c | 12 -- reactos/lib/crtdll/string/memchr.c | 20 -- reactos/lib/crtdll/string/memcmp.c | 18 -- reactos/lib/crtdll/string/memcpy.c | 20 -- reactos/lib/crtdll/string/memcpy.s | 20 -- reactos/lib/crtdll/string/memicmp.c | 23 -- reactos/lib/crtdll/string/memmove.c | 39 ---- reactos/lib/crtdll/string/memmove.s | 33 --- reactos/lib/crtdll/string/memset.c | 17 -- reactos/lib/crtdll/string/memset.s | 51 ----- reactos/lib/crtdll/string/strcat.c | 15 -- reactos/lib/crtdll/string/strchr.c | 22 -- reactos/lib/crtdll/string/strcmp.c | 18 -- reactos/lib/crtdll/string/strcoll.c | 36 ---- reactos/lib/crtdll/string/strcpy.c | 15 -- reactos/lib/crtdll/string/strcspn.c | 22 -- reactos/lib/crtdll/string/strdup.c | 19 -- reactos/lib/crtdll/string/strerror.c | 9 +- reactos/lib/crtdll/string/stricmp.c | 28 --- reactos/lib/crtdll/string/strlen.c | 17 -- reactos/lib/crtdll/string/strlwr.c | 26 --- reactos/lib/crtdll/string/strncat.c | 25 --- reactos/lib/crtdll/string/strncmp.c | 21 -- reactos/lib/crtdll/string/strncpy.c | 24 --- reactos/lib/crtdll/string/strnicmp.c | 20 -- reactos/lib/crtdll/string/strnlen.c | 14 -- reactos/lib/crtdll/string/strpbrk.c | 21 -- reactos/lib/crtdll/string/strrchr.c | 23 -- reactos/lib/crtdll/string/strrev.c | 21 -- reactos/lib/crtdll/string/strset.c | 35 --- reactos/lib/crtdll/string/strspn.c | 19 -- reactos/lib/crtdll/string/strspnp.c | 16 -- reactos/lib/crtdll/string/strstr.c | 25 --- reactos/lib/crtdll/string/strtoul.c | 30 --- reactos/lib/crtdll/string/strupr.c | 27 --- reactos/lib/crtdll/string/strxfrm.c | 20 -- reactos/lib/crtdll/wchar/wtoi.c | 8 + reactos/subsys/system/explorer/startup.c | 3 +- 61 files changed, 181 insertions(+), 1606 deletions(-) delete mode 100644 reactos/lib/crtdll/ctype/ctype.c delete mode 100644 reactos/lib/crtdll/ctype/isalnum.c delete mode 100644 reactos/lib/crtdll/ctype/isalpha.c delete mode 100644 reactos/lib/crtdll/ctype/isascii.c delete mode 100644 reactos/lib/crtdll/ctype/iscntrl.c delete mode 100644 reactos/lib/crtdll/ctype/iscsym.c delete mode 100644 reactos/lib/crtdll/ctype/isdigit.c delete mode 100644 reactos/lib/crtdll/ctype/isgraph.c delete mode 100644 reactos/lib/crtdll/ctype/islower.c delete mode 100644 reactos/lib/crtdll/ctype/isprint.c delete mode 100644 reactos/lib/crtdll/ctype/ispunct.c delete mode 100644 reactos/lib/crtdll/ctype/isspace.c delete mode 100644 reactos/lib/crtdll/ctype/isupper.c delete mode 100644 reactos/lib/crtdll/ctype/isxdigit.c delete mode 100644 reactos/lib/crtdll/ctype/toascii.c delete mode 100644 reactos/lib/crtdll/ctype/tolower.c delete mode 100644 reactos/lib/crtdll/ctype/toupper.c delete mode 100644 reactos/lib/crtdll/string/memccpy.c delete mode 100644 reactos/lib/crtdll/string/memchr.c delete mode 100644 reactos/lib/crtdll/string/memcmp.c delete mode 100644 reactos/lib/crtdll/string/memcpy.c delete mode 100644 reactos/lib/crtdll/string/memcpy.s delete mode 100644 reactos/lib/crtdll/string/memicmp.c delete mode 100644 reactos/lib/crtdll/string/memmove.c delete mode 100644 reactos/lib/crtdll/string/memmove.s delete mode 100644 reactos/lib/crtdll/string/memset.c delete mode 100644 reactos/lib/crtdll/string/memset.s delete mode 100644 reactos/lib/crtdll/string/strcat.c delete mode 100644 reactos/lib/crtdll/string/strchr.c delete mode 100644 reactos/lib/crtdll/string/strcmp.c delete mode 100644 reactos/lib/crtdll/string/strcoll.c delete mode 100644 reactos/lib/crtdll/string/strcpy.c delete mode 100644 reactos/lib/crtdll/string/strcspn.c delete mode 100644 reactos/lib/crtdll/string/strdup.c delete mode 100644 reactos/lib/crtdll/string/stricmp.c delete mode 100644 reactos/lib/crtdll/string/strlen.c delete mode 100644 reactos/lib/crtdll/string/strlwr.c delete mode 100644 reactos/lib/crtdll/string/strncat.c delete mode 100644 reactos/lib/crtdll/string/strncmp.c delete mode 100644 reactos/lib/crtdll/string/strncpy.c delete mode 100644 reactos/lib/crtdll/string/strnicmp.c delete mode 100644 reactos/lib/crtdll/string/strnlen.c delete mode 100644 reactos/lib/crtdll/string/strpbrk.c delete mode 100644 reactos/lib/crtdll/string/strrchr.c delete mode 100644 reactos/lib/crtdll/string/strrev.c delete mode 100644 reactos/lib/crtdll/string/strset.c delete mode 100644 reactos/lib/crtdll/string/strspn.c delete mode 100644 reactos/lib/crtdll/string/strspnp.c delete mode 100644 reactos/lib/crtdll/string/strstr.c delete mode 100644 reactos/lib/crtdll/string/strtoul.c delete mode 100644 reactos/lib/crtdll/string/strupr.c delete mode 100644 reactos/lib/crtdll/string/strxfrm.c diff --git a/reactos/ChangeLog b/reactos/ChangeLog index 8fefe550369..43a60fb5f00 100644 --- a/reactos/ChangeLog +++ b/reactos/ChangeLog @@ -1,3 +1,8 @@ +2003-07-15 Royce Mitchell III + + * modified crtdll to forward most of it's CTYPE, STRING + and WSTRING entries to NTDLL or MSVCRT. + 2003-07-14 James Tabor * lib/gdi32/misc/stubs.c Remove FillRgn. diff --git a/reactos/lib/crtdll/crtdll.def b/reactos/lib/crtdll/crtdll.def index 937bca25bf9..56bda66c408 100644 --- a/reactos/lib/crtdll/crtdll.def +++ b/reactos/lib/crtdll/crtdll.def @@ -19,9 +19,9 @@ ; DISCLAMED. This includes but is not limited to warrenties of ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ; -; $Revision: 1.16 $ -; $Author: hyperion $ -; $Date: 2003/07/06 23:04:19 $ +; $Revision: 1.17 $ +; $Author: royce $ +; $Date: 2003/07/15 19:27:24 $ ; ; These three functions appear to be name mangled in some way, so GCC is ; probably not going to be able to use them in any case. @@ -68,14 +68,14 @@ __argv_dll __dllonexit __doserrno __fpecode -__isascii -__iscsym -__iscsymf +__isascii=NTDLL.__isascii +__iscsym=NTDLL.__iscsym +__iscsymf=NTDLL.__iscsymf __mb_cur_max_dll __pxcptinfoptrs __threadhandle __threadid -__toascii +__toascii=NTDLL.__toascii _abnormal_termination _access _acmdln_dll @@ -178,7 +178,7 @@ _hypot _initterm _iob _isatty -_isctype +_isctype=MSVCRT._isctype _ismbbalnum _ismbbalpha _ismbbgraph @@ -205,8 +205,8 @@ _ismbcupper _ismbslead _ismbstrail _isnan -_itoa -_itow +_itoa=NTDLL._itoa +_itow=NTDLL._itow _j0 _j1 _jn @@ -220,8 +220,8 @@ _lrotl _lrotr _lsearch _lseek -_ltoa -_ltow +_ltoa=NTDLL._ltoa +_ltow=NTDLL._ltow _makepath _matherr _mbbtombc @@ -273,7 +273,7 @@ _mbstok _mbstrlen _mbsupr _memccpy -_memicmp +_memicmp=NTDLL._memicmp _mkdir _mktemp _msize @@ -322,37 +322,37 @@ _spawnvpe _splitpath _stat _statusfp -_strcmpi +_strcmpi=NTDLL._strcmpi _strdate _strdec -_strdup -_strerror -_stricmp -_stricoll +_strdup=MSVCRT._strdup +_strerror=MSVCRT._strerror +_stricmp=NTDLL._stricmp +_stricoll=MSVCRT._stricoll _strinc -_strlwr +_strlwr=NTDLL._strlwr _strncnt _strnextc -_strnicmp +_strnicmp=NTDLL._strnicmp _strninc -_strnset -_strrev -_strset +_strnset=MSVCRT._strnset +_strrev=MSVCRT._strrev +_strset=MSVCRT._strset _strspnp _strtime -_strupr +_strupr=NTDLL._strupr _swab _sys_errlist _sys_nerr_dll _tell _tempnam _timezone_dll -_tolower -_toupper +_tolower=NTDLL._tolower +_toupper=NTDLL._toupper _tzname _tzset -_ultoa -_ultow +_ultoa=NTDLL._ultoa +_ultow=NTDLL._ultow _umask _ungetch _unlink @@ -364,7 +364,7 @@ _wcsdup _wcsicmp _wcsicoll _wcslwr -_wcsnicmp +_wcsnicmp=NTDLL._wcsnicmp _wcsnset _wcsrev _wcsset @@ -373,8 +373,8 @@ _winmajor_dll _winminor_dll _winver_dll _write -_wtoi -_wtol +_wtoi=NTDLL._wtoi +_wtol=NTDLL._wtol _y0 _y1 _yn @@ -433,32 +433,32 @@ getchar getenv gets gmtime -is_wctype -isalnum -isalpha -iscntrl -isdigit -isgraph +is_wctype=MSVCRT.is_wctype +isalnum=NTDLL.isalnum +isalpha=NTDLL.isalpha +iscntrl=NTDLL.iscntrl +isdigit=NTDLL.isdigit +isgraph=NTDLL.isgraph isleadbyte -islower -isprint -ispunct -isspace -isupper -iswalnum -iswalpha -iswascii -iswcntrl -iswctype -iswdigit -iswgraph -iswlower -iswprint -iswpunct -iswspace -iswupper -iswxdigit -isxdigit +islower=NTDLL.islower +isprint=NTDLL.isprint +ispunct=NTDLL.ispunct +isspace=NTDLL.isspace +isupper=NTDLL.isupper +iswalnum=MSVCRT.iswalnum +iswalpha=NTDLL.iswalpha +iswascii=MSVCRT.iswascii +iswcntrl=MSVCRT.iswcntrl +iswctype=MSVCRT.iswctype +iswdigit=MSVCRT.iswdigit +iswgraph=MSVCRT.iswgraph +iswlower=MSVCRT.iswlower +iswprint=MSVCRT.iswprint +iswpunct=MSVCRT.iswpunct +iswspace=NTDLL.iswspace +iswupper=MSVCRT.iswupper +iswxdigit=MSVCRT.iswxdigit +isxdigit=NTDLL.isxdigit labs ldexp ldiv @@ -471,10 +471,10 @@ malloc mblen mbstowcs mbtowc -memchr -memcmp -memcpy -memmove +memchr=NTDLL.memchr +memcmp=NTDLL.memcmp +memcpy=NTDLL.memcpy +memmove=NTDLL.memmove memset mktime modf @@ -505,24 +505,24 @@ sscanf strcat strchr strcmp -strcoll +strcoll=MSVCRT.strcoll strcpy strcspn -strerror +strerror=MSVCRT.strerror strftime strlen strncat strncmp strncpy -strpbrk +strpbrk=NTDLL.strpbrk strrchr strspn -strstr +strstr=NTDLL.strstr strtod strtok strtol strtoul -strxfrm +strxfrm=MSVCRT.strxfrm swprintf swscanf system @@ -531,8 +531,8 @@ tanh time tmpfile tmpnam -tolower -toupper +tolower=NTDLL.tolower +toupper=NTDLL.toupper towlower towupper ungetc diff --git a/reactos/lib/crtdll/ctype/ctype.c b/reactos/lib/crtdll/ctype/ctype.c deleted file mode 100644 index 5861d6d6494..00000000000 --- a/reactos/lib/crtdll/ctype/ctype.c +++ /dev/null @@ -1,264 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - -unsigned short _ctype[] = { - 0, /* , 0xFFFF */ - _CONTROL, /* CTRL+@, 0x00 */ - _CONTROL, /* CTRL+A, 0x01 */ - _CONTROL, /* CTRL+B, 0x02 */ - _CONTROL, /* CTRL+C, 0x03 */ - _CONTROL, /* CTRL+D, 0x04 */ - _CONTROL, /* CTRL+E, 0x05 */ - _CONTROL, /* CTRL+F, 0x06 */ - _CONTROL, /* CTRL+G, 0x07 */ - _CONTROL, /* CTRL+H, 0x08 */ - _CONTROL | _SPACE, /* CTRL+I, 0x09 */ - _CONTROL | _SPACE, /* CTRL+J, 0x0a */ - _CONTROL | _SPACE, /* CTRL+K, 0x0b */ - _CONTROL | _SPACE, /* CTRL+L, 0x0c */ - _CONTROL | _SPACE, /* CTRL+M, 0x0d */ - _CONTROL, /* CTRL+N, 0x0e */ - _CONTROL, /* CTRL+O, 0x0f */ - _CONTROL, /* CTRL+P, 0x10 */ - _CONTROL, /* CTRL+Q, 0x11 */ - _CONTROL, /* CTRL+R, 0x12 */ - _CONTROL, /* CTRL+S, 0x13 */ - _CONTROL, /* CTRL+T, 0x14 */ - _CONTROL, /* CTRL+U, 0x15 */ - _CONTROL, /* CTRL+V, 0x16 */ - _CONTROL, /* CTRL+W, 0x17 */ - _CONTROL, /* CTRL+X, 0x18 */ - _CONTROL, /* CTRL+Y, 0x19 */ - _CONTROL, /* CTRL+Z, 0x1a */ - _CONTROL, /* CTRL+[, 0x1b */ - _CONTROL, /* CTRL+\, 0x1c */ - _CONTROL, /* CTRL+], 0x1d */ - _CONTROL, /* CTRL+^, 0x1e */ - _CONTROL, /* CTRL+_, 0x1f */ - _SPACE | _BLANK, /* ` ', 0x20 */ - _PUNCT, /* `!', 0x21 */ - _PUNCT, /* 0x22 */ - _PUNCT, /* `#', 0x23 */ - _PUNCT, /* `$', 0x24 */ - _PUNCT, /* `%', 0x25 */ - _PUNCT, /* `&', 0x26 */ - _PUNCT, /* 0x27 */ - _PUNCT, /* `(', 0x28 */ - _PUNCT, /* `)', 0x29 */ - _PUNCT, /* `*', 0x2a */ - _PUNCT, /* `+', 0x2b */ - _PUNCT, /* `,', 0x2c */ - _PUNCT, /* `-', 0x2d */ - _PUNCT, /* `.', 0x2e */ - _PUNCT, /* `/', 0x2f */ - _DIGIT | _HEX, /* `0', 0x30 */ - _DIGIT | _HEX, /* `1', 0x31 */ - _DIGIT | _HEX, /* `2', 0x32 */ - _DIGIT | _HEX, /* `3', 0x33 */ - _DIGIT | _HEX, /* `4', 0x34 */ - _DIGIT | _HEX, /* `5', 0x35 */ - _DIGIT | _HEX, /* `6', 0x36 */ - _DIGIT | _HEX, /* `7', 0x37 */ - _DIGIT | _HEX, /* `8', 0x38 */ - _DIGIT | _HEX, /* `9', 0x39 */ - _PUNCT, /* `:', 0x3a */ - _PUNCT, /* `;', 0x3b */ - _PUNCT, /* `<', 0x3c */ - _PUNCT, /* `=', 0x3d */ - _PUNCT, /* `>', 0x3e */ - _PUNCT, /* `?', 0x3f */ - _PUNCT, /* `@', 0x40 */ - _UPPER | _HEX, /* `A', 0x41 */ - _UPPER | _HEX, /* `B', 0x42 */ - _UPPER | _HEX, /* `C', 0x43 */ - _UPPER | _HEX, /* `D', 0x44 */ - _UPPER | _HEX, /* `E', 0x45 */ - _UPPER | _HEX, /* `F', 0x46 */ - _UPPER, /* `G', 0x47 */ - _UPPER, /* `H', 0x48 */ - _UPPER, /* `I', 0x49 */ - _UPPER, /* `J', 0x4a */ - _UPPER, /* `K', 0x4b */ - _UPPER, /* `L', 0x4c */ - _UPPER, /* `M', 0x4d */ - _UPPER, /* `N', 0x4e */ - _UPPER, /* `O', 0x4f */ - _UPPER, /* `P', 0x50 */ - _UPPER, /* `Q', 0x51 */ - _UPPER, /* `R', 0x52 */ - _UPPER, /* `S', 0x53 */ - _UPPER, /* `T', 0x54 */ - _UPPER, /* `U', 0x55 */ - _UPPER, /* `V', 0x56 */ - _UPPER, /* `W', 0x57 */ - _UPPER, /* `X', 0x58 */ - _UPPER, /* `Y', 0x59 */ - _UPPER, /* `Z', 0x5a */ - _PUNCT, /* `[', 0x5b */ - _PUNCT, /* 0x5c */ - _PUNCT, /* `]', 0x5d */ - _PUNCT, /* `^', 0x5e */ - _PUNCT, /* `_', 0x5f */ - _PUNCT, /* 0x60 */ - _LOWER | _HEX, /* `a', 0x61 */ - _LOWER | _HEX, /* `b', 0x62 */ - _LOWER | _HEX, /* `c', 0x63 */ - _LOWER | _HEX, /* `d', 0x64 */ - _LOWER | _HEX, /* `e', 0x65 */ - _LOWER | _HEX, /* `f', 0x66 */ - _LOWER, /* `g', 0x67 */ - _LOWER, /* `h', 0x68 */ - _LOWER, /* `i', 0x69 */ - _LOWER, /* `j', 0x6a */ - _LOWER, /* `k', 0x6b */ - _LOWER, /* `l', 0x6c */ - _LOWER, /* `m', 0x6d */ - _LOWER, /* `n', 0x6e */ - _LOWER, /* `o', 0x6f */ - _LOWER, /* `p', 0x70 */ - _LOWER, /* `q', 0x71 */ - _LOWER, /* `r', 0x72 */ - _LOWER, /* `s', 0x73 */ - _LOWER, /* `t', 0x74 */ - _LOWER, /* `u', 0x75 */ - _LOWER, /* `v', 0x76 */ - _LOWER, /* `w', 0x77 */ - _LOWER, /* `x', 0x78 */ - _LOWER, /* `y', 0x79 */ - _LOWER, /* `z', 0x7a */ - _PUNCT, /* `{', 0x7b */ - _PUNCT, /* `|', 0x7c */ - _PUNCT, /* `}', 0x7d */ - _PUNCT, /* `~', 0x7e */ - _CONTROL, /* 0x7f */ - 0, /* 0x80 */ - 0, /* 0x81 */ - 0, /* 0x82 */ - 0, /* 0x83 */ - 0, /* 0x84 */ - 0, /* 0x85 */ - 0, /* 0x86 */ - 0, /* 0x87 */ - 0, /* 0x88 */ - 0, /* 0x89 */ - 0, /* 0x8a */ - 0, /* 0x8b */ - 0, /* 0x8c */ - 0, /* 0x8d */ - 0, /* 0x8e */ - 0, /* 0x8f */ - 0, /* 0x90 */ - 0, /* 0x91 */ - 0, /* 0x92 */ - 0, /* 0x93 */ - 0, /* 0x94 */ - 0, /* 0x95 */ - 0, /* 0x96 */ - 0, /* 0x97 */ - 0, /* 0x98 */ - 0, /* 0x99 */ - 0, /* 0x9a */ - 0, /* 0x9b */ - 0, /* 0x9c */ - 0, /* 0x9d */ - 0, /* 0x9e */ - 0, /* 0x9f */ - 0, /* 0xa0 */ - 0, /* 0xa1 */ - 0, /* 0xa2 */ - 0, /* 0xa3 */ - 0, /* 0xa4 */ - 0, /* 0xa5 */ - 0, /* 0xa6 */ - 0, /* 0xa7 */ - 0, /* 0xa8 */ - 0, /* 0xa9 */ - 0, /* 0xaa */ - 0, /* 0xab */ - 0, /* 0xac */ - 0, /* 0xad */ - 0, /* 0xae */ - 0, /* 0xaf */ - 0, /* 0xb0 */ - 0, /* 0xb1 */ - 0, /* 0xb2 */ - 0, /* 0xb3 */ - 0, /* 0xb4 */ - 0, /* 0xb5 */ - 0, /* 0xb6 */ - 0, /* 0xb7 */ - 0, /* 0xb8 */ - 0, /* 0xb9 */ - 0, /* 0xba */ - 0, /* 0xbb */ - 0, /* 0xbc */ - 0, /* 0xbd */ - 0, /* 0xbe */ - 0, /* 0xbf */ - 0, /* 0xc0 */ - 0, /* 0xc1 */ - 0, /* 0xc2 */ - 0, /* 0xc3 */ - 0, /* 0xc4 */ - 0, /* 0xc5 */ - 0, /* 0xc6 */ - 0, /* 0xc7 */ - 0, /* 0xc8 */ - 0, /* 0xc9 */ - 0, /* 0xca */ - 0, /* 0xcb */ - 0, /* 0xcc */ - 0, /* 0xcd */ - 0, /* 0xce */ - 0, /* 0xcf */ - 0, /* 0xd0 */ - 0, /* 0xd1 */ - 0, /* 0xd2 */ - 0, /* 0xd3 */ - 0, /* 0xd4 */ - 0, /* 0xd5 */ - 0, /* 0xd6 */ - 0, /* 0xd7 */ - 0, /* 0xd8 */ - 0, /* 0xd9 */ - 0, /* 0xda */ - 0, /* 0xdb */ - 0, /* 0xdc */ - 0, /* 0xdd */ - 0, /* 0xde */ - 0, /* 0xdf */ - 0, /* 0xe0 */ - 0, /* 0xe1 */ - 0, /* 0xe2 */ - 0, /* 0xe3 */ - 0, /* 0xe4 */ - 0, /* 0xe5 */ - 0, /* 0xe6 */ - 0, /* 0xe7 */ - 0, /* 0xe8 */ - 0, /* 0xe9 */ - 0, /* 0xea */ - 0, /* 0xeb */ - 0, /* 0xec */ - 0, /* 0xed */ - 0, /* 0xee */ - 0, /* 0xef */ - 0, /* 0xf0 */ - 0, /* 0xf1 */ - 0, /* 0xf2 */ - 0, /* 0xf3 */ - 0, /* 0xf4 */ - 0, /* 0xf5 */ - 0, /* 0xf6 */ - 0, /* 0xf7 */ - 0, /* 0xf8 */ - 0, /* 0xf9 */ - 0, /* 0xfa */ - 0, /* 0xfb */ - 0, /* 0xfc */ - 0, /* 0xfd */ - 0, /* 0xfe */ - 0 /* 0xff */ -}; - -/* EOF */ diff --git a/reactos/lib/crtdll/ctype/isalnum.c b/reactos/lib/crtdll/ctype/isalnum.c deleted file mode 100644 index 535184e5e17..00000000000 --- a/reactos/lib/crtdll/ctype/isalnum.c +++ /dev/null @@ -1,29 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/ctype/isalnum.c - * PURPOSE: Test for a alpha numeric character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include - - -#undef isalnum -/* - * @implemented - */ -int isalnum(int c) -{ - return _isctype(c, _ALPHA | _DIGIT); -} - -#undef iswalnum -/* - * @implemented - */ -int iswalnum(wint_t c) -{ - return iswctype(c, _ALPHA | _DIGIT); -} diff --git a/reactos/lib/crtdll/ctype/isalpha.c b/reactos/lib/crtdll/ctype/isalpha.c deleted file mode 100644 index ec225e10036..00000000000 --- a/reactos/lib/crtdll/ctype/isalpha.c +++ /dev/null @@ -1,31 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/ctype/isalpha.c - * PURPOSE: Checks if a character is alphanumeric - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include - - -#undef isalpha - -/* - * @implemented - */ -int isalpha(int c) -{ - return _isctype(c, _ALPHA); -} - -#undef iswalpha -/* - * @implemented - */ -int iswalpha(wint_t c) -{ - return iswctype(c, _ALPHA); -} diff --git a/reactos/lib/crtdll/ctype/isascii.c b/reactos/lib/crtdll/ctype/isascii.c deleted file mode 100644 index 069a5f6d783..00000000000 --- a/reactos/lib/crtdll/ctype/isascii.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/ctype/isascii.c - * PURPOSE: Checks if a character is ascii - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include - -/* - * @implemented - */ -int __isascii(int c) -{ - return (!((c)&(~0x7f))); -} - -/* - * @implemented - */ -int iswascii(wint_t c) -{ - return __isascii(c); -} diff --git a/reactos/lib/crtdll/ctype/iscntrl.c b/reactos/lib/crtdll/ctype/iscntrl.c deleted file mode 100644 index 164eb520a87..00000000000 --- a/reactos/lib/crtdll/ctype/iscntrl.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - - -#undef iscntrl -/* - * @implemented - */ -int iscntrl(int c) -{ - return _isctype(c, _CONTROL); -} - -#undef iswcntrl -/* - * @implemented - */ -int iswcntrl(wint_t c) -{ - return iswctype(c, _CONTROL); -} diff --git a/reactos/lib/crtdll/ctype/iscsym.c b/reactos/lib/crtdll/ctype/iscsym.c deleted file mode 100644 index e2a07c8d5a3..00000000000 --- a/reactos/lib/crtdll/ctype/iscsym.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/ctype/iscsym.c - * PURPOSE: Check for a valid characters in a c symbol - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ -#include - - -/* - * @implemented - */ -int __iscsymf(int c) -{ - return (isalpha(c) || ( c == '_' )) ; -} - -/* - * @implemented - */ -int __iscsym(int c) -{ - return (isalnum(c) || ( c == '_' )) ; -} diff --git a/reactos/lib/crtdll/ctype/isctype.c b/reactos/lib/crtdll/ctype/isctype.c index fab8bf538d9..948889ef842 100644 --- a/reactos/lib/crtdll/ctype/isctype.c +++ b/reactos/lib/crtdll/ctype/isctype.c @@ -10,27 +10,39 @@ unsigned short *_pwctype_dll = _ctype + 1; /* * @implemented + * + * this function is now forwarded to MSVCRT._isctype to reduce code duplication */ +#if 0 int _isctype(unsigned int c, int ctypeFlags) { return (_pctype_dll[(unsigned char)(c & 0xFF)] & ctypeFlags); } +#endif /* * @implemented + * + * this function is now forwarded to MSVCRT.iswctype to reduce code duplication */ +#if 0 int iswctype(wint_t wc, wctype_t wctypeFlags) { return (_pwctype_dll[(unsigned char)(wc & 0xFF)] & wctypeFlags); } +#endif // obsolete /* * @implemented + * + * this function is now forwarded to MSVCRT.is_wctype to reduce code duplication */ +#if 0 int is_wctype(wint_t wc, wctype_t wctypeFlags) { return (_pwctype_dll[(unsigned char)(wc & 0xFF)] & wctypeFlags); } +#endif /* EOF */ diff --git a/reactos/lib/crtdll/ctype/isdigit.c b/reactos/lib/crtdll/ctype/isdigit.c deleted file mode 100644 index 9b1b7039e34..00000000000 --- a/reactos/lib/crtdll/ctype/isdigit.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - - -#undef isdigit -/* - * @implemented - */ -int isdigit(int c) -{ - return _isctype(c, _DIGIT); -} - -#undef iswdigit -/* - * @implemented - */ -int iswdigit(wint_t c) -{ - return iswctype(c, _DIGIT); -} diff --git a/reactos/lib/crtdll/ctype/isgraph.c b/reactos/lib/crtdll/ctype/isgraph.c deleted file mode 100644 index 282cdd67820..00000000000 --- a/reactos/lib/crtdll/ctype/isgraph.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - -#undef isgraph -/* - * @implemented - */ -int isgraph(int c) -{ - return _isctype(c,_PUNCT | _ALPHA | _DIGIT); -} - -#undef iswgraph -/* - * @implemented - */ -int iswgraph(wint_t c) -{ - return iswctype(c,_PUNCT | _ALPHA | _DIGIT); -} diff --git a/reactos/lib/crtdll/ctype/islower.c b/reactos/lib/crtdll/ctype/islower.c deleted file mode 100644 index 8c1766b535c..00000000000 --- a/reactos/lib/crtdll/ctype/islower.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - - -#undef islower -/* - * @implemented - */ -int islower(int c) -{ - return _isctype(c, _LOWER); -} - -/* - * @implemented - */ -int iswlower(wint_t c) -{ - return iswctype(c, _LOWER); -} diff --git a/reactos/lib/crtdll/ctype/isprint.c b/reactos/lib/crtdll/ctype/isprint.c deleted file mode 100644 index 022d25dfa7a..00000000000 --- a/reactos/lib/crtdll/ctype/isprint.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - -#undef isprint -/* - * @implemented - */ -int isprint(int c) -{ - return _isctype(c,_BLANK | _PUNCT | _ALPHA | _DIGIT); -} - -/* - * @implemented - */ -int iswprint(wint_t c) -{ - return iswctype((unsigned short)c,_BLANK | _PUNCT | _ALPHA | _DIGIT); -} diff --git a/reactos/lib/crtdll/ctype/ispunct.c b/reactos/lib/crtdll/ctype/ispunct.c deleted file mode 100644 index 8d8a3188195..00000000000 --- a/reactos/lib/crtdll/ctype/ispunct.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - - -#undef ispunct -/* - * @implemented - */ -int ispunct(int c) -{ - return _isctype(c, _PUNCT); -} - -#undef iswpunct -/* - * @implemented - */ -int iswpunct(wint_t c) -{ - return iswctype(c, _PUNCT); -} diff --git a/reactos/lib/crtdll/ctype/isspace.c b/reactos/lib/crtdll/ctype/isspace.c deleted file mode 100644 index ae8e8c6c6c6..00000000000 --- a/reactos/lib/crtdll/ctype/isspace.c +++ /dev/null @@ -1,30 +0,0 @@ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * FILE: lib/crtdll/ctype/isspace.c - * PURPOSE: Test for a space character - * PROGRAMER: Boudewijn Dekker - * UPDATE HISTORY: - * 28/12/98: Created - */ - -#include - - -#undef isspace -/* - * @implemented - */ -int isspace(int c) -{ - return _isctype(c,_SPACE); -} - -#undef iswspace -/* - * @implemented - */ -int iswspace(wint_t c) -{ - return iswctype(c,_SPACE); -} diff --git a/reactos/lib/crtdll/ctype/isupper.c b/reactos/lib/crtdll/ctype/isupper.c deleted file mode 100644 index bf23386208f..00000000000 --- a/reactos/lib/crtdll/ctype/isupper.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - - -#undef isupper -/* - * @implemented - */ -int isupper(int c) -{ - return _isctype(c, _UPPER); -} - -/* - * @implemented - */ -int iswupper(wint_t c) -{ - return iswctype(c, _UPPER); -} diff --git a/reactos/lib/crtdll/ctype/isxdigit.c b/reactos/lib/crtdll/ctype/isxdigit.c deleted file mode 100644 index dbe269d4ee8..00000000000 --- a/reactos/lib/crtdll/ctype/isxdigit.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - - -#undef isxdigit -/* - * @implemented - */ -int isxdigit(int c) -{ - return _isctype(c, _HEX); -} - -#undef iswxdigit -/* - * @implemented - */ -int iswxdigit(wint_t c) -{ - return iswctype(c, _HEX); -} - diff --git a/reactos/lib/crtdll/ctype/toascii.c b/reactos/lib/crtdll/ctype/toascii.c deleted file mode 100644 index 9330cf73890..00000000000 --- a/reactos/lib/crtdll/ctype/toascii.c +++ /dev/null @@ -1,12 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - -#include - - -/* - * @implemented - */ -int __toascii(int c) -{ - return((unsigned)(c) & 0x7F); -} diff --git a/reactos/lib/crtdll/ctype/tolower.c b/reactos/lib/crtdll/ctype/tolower.c deleted file mode 100644 index 0971967a94d..00000000000 --- a/reactos/lib/crtdll/ctype/tolower.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - -#undef tolower -/* - * @implemented - */ -int tolower(int c) -{ - if (_isctype (c, _UPPER)) - return (c - ('A' - 'a')); - return(c); -} - -#undef towlower -/* - * @implemented - */ -wchar_t towlower(wchar_t c) -{ - if (iswctype (c, _UPPER)) - return (c - (L'A' - L'a')); - return(c); -} - -/* - * @implemented - */ -int _tolower(int c) -{ - if (_isctype (c, _UPPER)) - return (c - ('A' - 'a')); - return(c); -} - -/* -wchar_t _towlower(wchar_t c) -{ - if (iswctype (c, _UPPER)) - return (c - (L'A' - L'a')); - return(c); -} -*/ - - diff --git a/reactos/lib/crtdll/ctype/toupper.c b/reactos/lib/crtdll/ctype/toupper.c deleted file mode 100644 index bc82e06dd77..00000000000 --- a/reactos/lib/crtdll/ctype/toupper.c +++ /dev/null @@ -1,45 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - - -#undef toupper -/* - * @implemented - */ -int toupper(int c) -{ - if (_isctype (c, _LOWER)) - return (c + ('A' - 'a')); - return(c); -} - -#undef towupper -/* - * @implemented - */ -wchar_t towupper(wchar_t c) -{ - if (iswctype (c, _LOWER)) - return (c + (L'A' - L'a')); - return(c); -} - -/* - * @implemented - */ -int _toupper(int c) -{ - if (_isctype (c, _LOWER)) - return (c + ('A' - 'a')); - return(c); -} - -/* -wchar_t _towupper(wchar_t c) -{ - if (iswctype (c, _LOWER)) - return (c + (L'A' - L'a')); - return(c); -} -*/ - diff --git a/reactos/lib/crtdll/makefile b/reactos/lib/crtdll/makefile index 914196714c9..d41905f4c07 100644 --- a/reactos/lib/crtdll/makefile +++ b/reactos/lib/crtdll/makefile @@ -1,4 +1,4 @@ -# $Id: makefile,v 1.56 2003/06/09 20:23:06 hbirr Exp $ +# $Id: makefile,v 1.57 2003/07/15 19:27:24 royce Exp $ PATH_TO_TOP = ../.. @@ -66,24 +66,26 @@ CONIO_OBJECTS = \ CTYPE_OBJECTS = \ $(PATH_TO_MSVCRT)/ctype/ctype.o \ - $(PATH_TO_MSVCRT)/ctype/isalnum.o \ - $(PATH_TO_MSVCRT)/ctype/isalpha.o \ - $(PATH_TO_MSVCRT)/ctype/isascii.o \ - $(PATH_TO_MSVCRT)/ctype/iscntrl.o \ - $(PATH_TO_MSVCRT)/ctype/isdigit.o \ - $(PATH_TO_MSVCRT)/ctype/isgraph.o \ - $(PATH_TO_MSVCRT)/ctype/islower.o \ - $(PATH_TO_MSVCRT)/ctype/isprint.o \ - $(PATH_TO_MSVCRT)/ctype/ispunct.o \ - $(PATH_TO_MSVCRT)/ctype/isspace.o \ - $(PATH_TO_MSVCRT)/ctype/isupper.o \ - $(PATH_TO_MSVCRT)/ctype/isxdigit.o \ - $(PATH_TO_MSVCRT)/ctype/toascii.o \ - $(PATH_TO_MSVCRT)/ctype/tolower.o \ - $(PATH_TO_MSVCRT)/ctype/toupper.o \ - $(PATH_TO_MSVCRT)/ctype/iscsym.o \ ctype/isctype.o +# REMOVED CTYPE ENTRIES: +# $(PATH_TO_MSVCRT)/ctype/isalnum.o \ +# $(PATH_TO_MSVCRT)/ctype/isalpha.o \ +# $(PATH_TO_MSVCRT)/ctype/isascii.o \ +# $(PATH_TO_MSVCRT)/ctype/iscntrl.o \ +# $(PATH_TO_MSVCRT)/ctype/iscsym.o \ +# $(PATH_TO_MSVCRT)/ctype/isdigit.o \ +# $(PATH_TO_MSVCRT)/ctype/isgraph.o \ +# $(PATH_TO_MSVCRT)/ctype/islower.o \ +# $(PATH_TO_MSVCRT)/ctype/isprint.o \ +# $(PATH_TO_MSVCRT)/ctype/ispunct.o \ +# $(PATH_TO_MSVCRT)/ctype/isspace.o \ +# $(PATH_TO_MSVCRT)/ctype/isupper.o \ +# $(PATH_TO_MSVCRT)/ctype/isxdigit.o \ +# $(PATH_TO_MSVCRT)/ctype/toascii.o \ +# $(PATH_TO_MSVCRT)/ctype/tolower.o \ +# $(PATH_TO_MSVCRT)/ctype/toupper.o \ + DIRECT_OBJECTS = \ $(PATH_TO_MSVCRT)/direct/chdir.o \ $(PATH_TO_MSVCRT)/direct/chdrive.o \ @@ -396,21 +398,22 @@ STDLIB_OBJECTS = \ $(PATH_TO_MSVCRT)/stdlib/wcstomb.o \ STRING_OBJECTS = \ - $(PATH_TO_MSVCRT)/string/memicmp.o \ - $(PATH_TO_MSVCRT)/string/strcoll.o \ - $(PATH_TO_MSVCRT)/string/strdup.o \ - string/strerror.o \ - $(PATH_TO_MSVCRT)/string/stricmp.o \ - $(PATH_TO_MSVCRT)/string/strlwr.o \ - $(PATH_TO_MSVCRT)/string/strnicmp.o \ - $(PATH_TO_MSVCRT)/string/strpbrk.o \ - $(PATH_TO_MSVCRT)/string/strrev.o \ - $(PATH_TO_MSVCRT)/string/strset.o \ - $(PATH_TO_MSVCRT)/string/strstr.o \ string/strtok.o \ - $(PATH_TO_MSVCRT)/string/strupr.o \ string/str_old.o \ - $(PATH_TO_MSVCRT)/string/strxfrm.o + string/strerror.o \ + +# $(PATH_TO_MSVCRT)/string/memicmp.o \ +# $(PATH_TO_MSVCRT)/string/strcoll.o \ +# $(PATH_TO_MSVCRT)/string/strdup.o \ +# $(PATH_TO_MSVCRT)/string/stricmp.o \ +# $(PATH_TO_MSVCRT)/string/strlwr.o \ +# $(PATH_TO_MSVCRT)/string/strnicmp.o \ +# $(PATH_TO_MSVCRT)/string/strpbrk.o \ +# $(PATH_TO_MSVCRT)/string/strrev.o \ +# $(PATH_TO_MSVCRT)/string/strset.o \ +# $(PATH_TO_MSVCRT)/string/strstr.o \ +# $(PATH_TO_MSVCRT)/string/strupr.o \ +# $(PATH_TO_MSVCRT)/string/strxfrm.o SYS_STAT_OBJECTS = \ sys_stat/fstat.o \ @@ -428,34 +431,35 @@ TCHAR_OBJECTS = \ tchar/strspnp.o TIME_OBJECTS = \ + $(PATH_TO_MSVCRT)/time/time.o \ $(PATH_TO_MSVCRT)/time/clock.o \ $(PATH_TO_MSVCRT)/time/ctime.o \ $(PATH_TO_MSVCRT)/time/difftime.o \ $(PATH_TO_MSVCRT)/time/strdate.o \ $(PATH_TO_MSVCRT)/time/strftime.o \ $(PATH_TO_MSVCRT)/time/strtime.o \ - $(PATH_TO_MSVCRT)/time/time.o \ time/tz_vars.o \ -WSTRING_OBJECTS = \ - wchar/wcscoll.o \ - $(PATH_TO_MSVCRT)/wstring/wcscspn.o \ - $(PATH_TO_MSVCRT)/wstring/wcsdup.o \ - $(PATH_TO_MSVCRT)/wstring/wcsicmp.o \ - $(PATH_TO_MSVCRT)/wstring/wcslwr.o \ - $(PATH_TO_MSVCRT)/wstring/wcspbrk.o \ - $(PATH_TO_MSVCRT)/wstring/wcsrev.o \ - $(PATH_TO_MSVCRT)/wstring/wcsset.o \ - $(PATH_TO_MSVCRT)/wstring/wcsspn.o \ - $(PATH_TO_MSVCRT)/wstring/wcsstr.o \ - wchar/wcstod.o \ - wchar/wcstok.o \ - wchar/wcstol.o \ - $(PATH_TO_MSVCRT)/wstring/wcsupr.o \ - $(PATH_TO_MSVCRT)/wstring/wcsxfrm.o \ - wchar/wtoi.o \ - wchar/wcstombs.o \ - $(PATH_TO_MSVCRT)/wstring/wcsnicmp.o +WSTRING_OBJECTS = + +# wchar/wcscoll.o \ +# wchar/wcstod.o \ +# wchar/wcstok.o \ +# wchar/wcstol.o \ +# wchar/wtoi.o \ +# $(PATH_TO_MSVCRT)/wstring/wcscspn.o \ +# $(PATH_TO_MSVCRT)/wstring/wcsdup.o \ +# $(PATH_TO_MSVCRT)/wstring/wcsicmp.o \ +# $(PATH_TO_MSVCRT)/wstring/wcslwr.o \ +# $(PATH_TO_MSVCRT)/wstring/wcspbrk.o \ +# $(PATH_TO_MSVCRT)/wstring/wcsrev.o \ +# $(PATH_TO_MSVCRT)/wstring/wcsset.o \ +# $(PATH_TO_MSVCRT)/wstring/wcsspn.o \ +# $(PATH_TO_MSVCRT)/wstring/wcsstr.o \ +# $(PATH_TO_MSVCRT)/wstring/wcsupr.o \ +# $(PATH_TO_MSVCRT)/wstring/wcsxfrm.o \ +# wchar/wcstombs.o \ +# $(PATH_TO_MSVCRT)/wstring/wcsnicmp.o OBJECTS = \ diff --git a/reactos/lib/crtdll/stdlib/itoa.c b/reactos/lib/crtdll/stdlib/itoa.c index 1903584f1fb..245cbbeaa83 100644 --- a/reactos/lib/crtdll/stdlib/itoa.c +++ b/reactos/lib/crtdll/stdlib/itoa.c @@ -17,7 +17,10 @@ /* * @implemented + * + * this function is now forwarded to NTDLL._itoa to reduce code duplication */ +#if 0 char* _itoa(int value, char* string, int radix) { char tmp[33]; @@ -59,10 +62,14 @@ char* _itoa(int value, char* string, int radix) *sp = 0; return string; } +#endif /* * @implemented + * + * this function is now forwarded to NTDLL._ltoa to reduce code duplication */ +#if 0 char* _ltoa(long value, char* string, int radix) { char tmp[33]; @@ -104,10 +111,14 @@ char* _ltoa(long value, char* string, int radix) *sp = 0; return string; } +#endif /* * @implemented + * + * this function is now forwarded to NTDLL._ultoa to reduce code duplication */ +#if 0 char* _ultoa(unsigned long value, char* string, int radix) { char tmp[33]; @@ -141,3 +152,4 @@ char* _ultoa(unsigned long value, char* string, int radix) *sp = 0; return string; } +#endif diff --git a/reactos/lib/crtdll/stdlib/itow.c b/reactos/lib/crtdll/stdlib/itow.c index 29b5b31a0eb..dcbf122c747 100644 --- a/reactos/lib/crtdll/stdlib/itow.c +++ b/reactos/lib/crtdll/stdlib/itow.c @@ -1,4 +1,4 @@ -/* $Id: itow.c,v 1.4 2003/07/11 17:25:32 royce Exp $ +/* $Id: itow.c,v 1.5 2003/07/15 19:27:25 royce Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries @@ -19,7 +19,10 @@ /* * @implemented + * + * this function is now forwarded to NTDLL._itow to reduce code duplication */ +#if 0 wchar_t* _itow(int value, wchar_t* string, int radix) { wchar_t tmp [33]; @@ -65,10 +68,14 @@ wchar_t* _itow(int value, wchar_t* string, int radix) *sp = (wchar_t) 0; return string; } +#endif /* * @implemented + * + * this function is now forwarded to NTDLL._ltow to reduce code duplication */ +#if 0 wchar_t* _ltow(long value, wchar_t* string, int radix) { wchar_t tmp [33]; @@ -113,10 +120,14 @@ wchar_t* _ltow(long value, wchar_t* string, int radix) *sp = (wchar_t) 0; return string; } +#endif /* * @implemented + * + * this function is now forwarded to NTDLL._ultow to reduce code duplication */ +#if 0 wchar_t* _ultow(unsigned long value, wchar_t* string, int radix) { wchar_t tmp [33]; @@ -154,3 +165,4 @@ wchar_t* _ultow(unsigned long value, wchar_t* string, int radix) *sp = (wchar_t) 0; return string; } +#endif diff --git a/reactos/lib/crtdll/string/memccpy.c b/reactos/lib/crtdll/string/memccpy.c deleted file mode 100644 index fb7e39ad226..00000000000 --- a/reactos/lib/crtdll/string/memccpy.c +++ /dev/null @@ -1,12 +0,0 @@ -#include - - -/* - * @implemented - */ -void * -_memccpy (void *to, const void *from,int c,size_t count) -{ - memcpy(to,from,count); - return memchr(to,c,count); -} diff --git a/reactos/lib/crtdll/string/memchr.c b/reactos/lib/crtdll/string/memchr.c deleted file mode 100644 index 31eb46c4641..00000000000 --- a/reactos/lib/crtdll/string/memchr.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -void * -memchr(const void *s, int c, size_t n) -{ - if (n) - { - const char *p = s; - do { - if (*p++ == c) - return (void *)(p-1); - } while (--n != 0); - } - return 0; -} diff --git a/reactos/lib/crtdll/string/memcmp.c b/reactos/lib/crtdll/string/memcmp.c deleted file mode 100644 index a76bf262e05..00000000000 --- a/reactos/lib/crtdll/string/memcmp.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -int memcmp(const void *s1, const void *s2, size_t n) -{ - if (n != 0) { - const unsigned char *p1 = s1, *p2 = s2; - do { - if (*p1++ != *p2++) - return (*--p1 - *--p2); - } while (--n != 0); - } - return 0; -} diff --git a/reactos/lib/crtdll/string/memcpy.c b/reactos/lib/crtdll/string/memcpy.c deleted file mode 100644 index 06f1a062af7..00000000000 --- a/reactos/lib/crtdll/string/memcpy.c +++ /dev/null @@ -1,20 +0,0 @@ -#include - - -/* - * This is the most reliable way to avoid incompatibilities - * in available built-in functions on various systems. - * - * @implemented - */ -void* memcpy(void* to, const void* from, size_t count) -{ - register char* f = (char*)from; - register char* t = (char*)to; - register int i = count; - - while (i-- > 0) - *t++ = *f++; - - return to; -} diff --git a/reactos/lib/crtdll/string/memcpy.s b/reactos/lib/crtdll/string/memcpy.s deleted file mode 100644 index 21448368a5f..00000000000 --- a/reactos/lib/crtdll/string/memcpy.s +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - .file "memcpy.s" - .text - .align 4 - .globl _memcpy -_memcpy: - pushl %ebp - movl %esp,%ebp - pushl %esi - pushl %edi - movl 8(%ebp),%edi - movl 12(%ebp),%esi - movl 16(%ebp),%ecx - call ___dj_movedata - popl %edi - popl %esi - movl 8(%ebp),%eax - leave - ret - diff --git a/reactos/lib/crtdll/string/memicmp.c b/reactos/lib/crtdll/string/memicmp.c deleted file mode 100644 index 3cbff006c09..00000000000 --- a/reactos/lib/crtdll/string/memicmp.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int -_memicmp(const void *s1, const void *s2, size_t n) -{ - if (n != 0) - { - const unsigned char *p1 = s1, *p2 = s2; - - do { - if (toupper(*p1) != toupper(*p2)) - return (*p1 - *p2); - p1++; - p2++; - } while (--n != 0); - } - return 0; -} diff --git a/reactos/lib/crtdll/string/memmove.c b/reactos/lib/crtdll/string/memmove.c deleted file mode 100644 index 44c15385010..00000000000 --- a/reactos/lib/crtdll/string/memmove.c +++ /dev/null @@ -1,39 +0,0 @@ -#include - - -/* - * @implemented - */ -void * memmove(void *dest,const void *src,size_t count) -{ - char *char_dest = (char *)dest; - char *char_src = (char *)src; - - if ((char_dest <= char_src) || (char_dest >= (char_src+count))) - { - /* non-overlapping buffers */ - while(count > 0) - { - *char_dest = *char_src; - char_dest++; - char_src++; - count--; - } - } - else - { - /* overlaping buffers */ - char_dest = (char *)dest + count - 1; - char_src = (char *)src + count - 1; - - while(count > 0) - { - *char_dest = *char_src; - char_dest--; - char_src--; - count--; - } - } - - return dest; -} diff --git a/reactos/lib/crtdll/string/memmove.s b/reactos/lib/crtdll/string/memmove.s deleted file mode 100644 index a667bbcb345..00000000000 --- a/reactos/lib/crtdll/string/memmove.s +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - .file "memmove.s" - .globl _memmove -_memmove: - pushl %ebp - movl %esp,%ebp - pushl %esi - pushl %edi - movl 8(%ebp),%edi - movl 12(%ebp),%esi - movl 16(%ebp),%ecx - jecxz L2 - cld - cmpl %esi,%edi - jb L3 - - std - addl %ecx,%esi - addl %ecx,%edi - decl %esi - decl %edi -L3: - rep - movsb - -L2: - cld - popl %edi - popl %esi - movl 8(%ebp),%eax - leave - ret - diff --git a/reactos/lib/crtdll/string/memset.c b/reactos/lib/crtdll/string/memset.c deleted file mode 100644 index d6244c99a09..00000000000 --- a/reactos/lib/crtdll/string/memset.c +++ /dev/null @@ -1,17 +0,0 @@ -#include - - -/* - * @implemented - */ -void* memset(void* src, int val, size_t count) -{ - char* char_src = (char*)src; - - while (count>0) { - *char_src = val; - char_src++; - count--; - } - return src; -} diff --git a/reactos/lib/crtdll/string/memset.s b/reactos/lib/crtdll/string/memset.s deleted file mode 100644 index 97d8c999ccf..00000000000 --- a/reactos/lib/crtdll/string/memset.s +++ /dev/null @@ -1,51 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ - .file "memset.s" - .text - .align 4 - .globl _memset -_memset: - pushl %ebp - movl %esp,%ebp - pushl %edi - movl 8(%ebp),%edi - movl 12(%ebp),%eax - movl 16(%ebp),%ecx - cld - - # We will handle memsets of <= 15 bytes one byte at a time. - # This avoids some extra overhead for small memsets, and - # knowing we are setting > 15 bytes eliminates some annoying - # checks in the "long move" case. - cmpl $15,%ecx - jle L3 - - # Otherwise, tile the byte value out into %eax. - # 0x41 -> 0x41414141, etc. - movb %al,%ah - movl %eax,%edx - sall $16,%eax - movw %dx,%ax - jmp L2 - - # Handle any cruft necessary to get %edi long-aligned. -L1: stosb - decl %ecx -L2: testl $3,%edi - jnz L1 - - # Now slam out all of the longs. - movl %ecx,%edx - shrl $2,%ecx - rep - stosl - - # Finally, handle any trailing cruft. We know the high three bytes - # of %ecx must be zero, so just put the "slop count" in the low byte. - movb %dl,%cl - andb $3,%cl -L3: rep - stosb - popl %edi - movl 8(%ebp),%eax - leave - ret diff --git a/reactos/lib/crtdll/string/strcat.c b/reactos/lib/crtdll/string/strcat.c deleted file mode 100644 index 20d7c1c1b3a..00000000000 --- a/reactos/lib/crtdll/string/strcat.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -char* strcat(char* s, const char* append) -{ - char* save = s; - - for (; *s; ++s); - while ((*s++ = *append++)); - return save; -} diff --git a/reactos/lib/crtdll/string/strchr.c b/reactos/lib/crtdll/string/strchr.c deleted file mode 100644 index c2dcbe3eab4..00000000000 --- a/reactos/lib/crtdll/string/strchr.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -char *strchr(const char *s, int c) -{ - char cc = c; - while (*s) - { - if (*s == cc) - return (char *)s; - s++; - } - if (cc == 0) - return (char *)s; - return 0; -} - diff --git a/reactos/lib/crtdll/string/strcmp.c b/reactos/lib/crtdll/string/strcmp.c deleted file mode 100644 index 27dfa45c067..00000000000 --- a/reactos/lib/crtdll/string/strcmp.c +++ /dev/null @@ -1,18 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -int strcmp(const char* s1, const char* s2) -{ - while (*s1 == *s2) - { - if (*s1 == 0) - return 0; - s1++; - s2++; - } - return *(unsigned const char*)s1 - *(unsigned const char*)(s2); -} diff --git a/reactos/lib/crtdll/string/strcoll.c b/reactos/lib/crtdll/string/strcoll.c deleted file mode 100644 index e01e732b27e..00000000000 --- a/reactos/lib/crtdll/string/strcoll.c +++ /dev/null @@ -1,36 +0,0 @@ -#include -#include - -/* Compare S1 and S2, returning less than, equal to or - greater than zero if the collated form of S1 is lexicographically - less than, equal to or greater than the collated form of S2. */ - -#if 1 -/* - * @unimplemented - */ -int strcoll(const char* s1, const char* s2) -{ - return strcmp(s1, s2); -} - -/* - * @unimplemented - */ -int _stricoll(const char* s1, const char* s2) -{ - return _stricmp(s1, s2); -} - -#else -int strcoll (const char* s1,const char* s2) -{ - int ret; - ret = CompareStringA(LOCALE_USER_DEFAULT,0,s1,strlen(s1),s2,strlen(s2)); - if (ret == 0) - return 0; - else - return ret - 2; - return 0; -} -#endif diff --git a/reactos/lib/crtdll/string/strcpy.c b/reactos/lib/crtdll/string/strcpy.c deleted file mode 100644 index 0e263ba4c10..00000000000 --- a/reactos/lib/crtdll/string/strcpy.c +++ /dev/null @@ -1,15 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -#pragma function(strcpy) - -/* - * @implemented - */ -char* strcpy(char *to, const char *from) -{ - char *save = to; - - for (; (*to = *from); ++from, ++to); - return save; -} diff --git a/reactos/lib/crtdll/string/strcspn.c b/reactos/lib/crtdll/string/strcspn.c deleted file mode 100644 index 45aabdf2933..00000000000 --- a/reactos/lib/crtdll/string/strcspn.c +++ /dev/null @@ -1,22 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -size_t strcspn(const char *s1, const char *s2) -{ - const char *p, *spanp; - char c, sc; - - for (p = s1;;) - { - c = *p++; - spanp = s2; - do { - if ((sc = *spanp++) == c) - return p - 1 - s1; - } while (sc != 0); - } - /* NOTREACHED */ -} diff --git a/reactos/lib/crtdll/string/strdup.c b/reactos/lib/crtdll/string/strdup.c deleted file mode 100644 index c728585819b..00000000000 --- a/reactos/lib/crtdll/string/strdup.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include -#include - - -/* - * @implemented - */ -char *_strdup(const char *_s) -{ - char *rv; - if (_s == 0) - return 0; - rv = (char *)malloc(strlen(_s) + 1); - if (rv == 0) - return 0; - strcpy(rv, _s); - return rv; -} diff --git a/reactos/lib/crtdll/string/strerror.c b/reactos/lib/crtdll/string/strerror.c index a19a2d20fde..b4cc6a7e904 100644 --- a/reactos/lib/crtdll/string/strerror.c +++ b/reactos/lib/crtdll/string/strerror.c @@ -62,7 +62,10 @@ int* _sys_nerr_dll = &__sys_nerr; /* * @implemented + * + * this function is now forwarded to MSVCRT.strerror to reduce code duplication */ +#if 0 char *strerror(int errnum) { static char ebuf[40]; /* 64-bit number + slop */ @@ -93,11 +96,14 @@ char *strerror(int errnum) return ebuf; } - +#endif /* * @implemented + * + * this function is now forwarded to MSVCRT._strerror to reduce code duplication */ +#if 0 char *_strerror(const char *s) { if ( s == NULL ) @@ -105,3 +111,4 @@ char *_strerror(const char *s) return strerror(atoi(s)); } +#endif diff --git a/reactos/lib/crtdll/string/stricmp.c b/reactos/lib/crtdll/string/stricmp.c deleted file mode 100644 index cfecfb81931..00000000000 --- a/reactos/lib/crtdll/string/stricmp.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int -_stricmp(const char *s1, const char *s2) -{ - while (toupper(*s1) == toupper(*s2)) - { - if (*s1 == 0) - return 0; - s1++; - s2++; - } - return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)(s2)); -} - -/* - * @implemented - */ -int -_strcmpi(const char *s1, const char *s2) -{ - return _stricmp(s1,s2); -} diff --git a/reactos/lib/crtdll/string/strlen.c b/reactos/lib/crtdll/string/strlen.c deleted file mode 100644 index 3c304642b2d..00000000000 --- a/reactos/lib/crtdll/string/strlen.c +++ /dev/null @@ -1,17 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -size_t strlen(const char* str) -{ - const char* s; - - if (str == 0) - return 0; - for (s = str; *s; ++s); - return s-str; -} - diff --git a/reactos/lib/crtdll/string/strlwr.c b/reactos/lib/crtdll/string/strlwr.c deleted file mode 100644 index 6ddba9c7a2a..00000000000 --- a/reactos/lib/crtdll/string/strlwr.c +++ /dev/null @@ -1,26 +0,0 @@ -/* - * The C RunTime DLL - * - * Implements C run-time functionality as known from UNIX. - * - * Copyright 1996,1998 Marcus Meissner - * Copyright 1996 Jukka Iivonen - * Copyright 1997 Uwe Bonnes - */ - -#include -#include - -/* - * @implemented - */ -char * _strlwr(char *x) -{ - char *y=x; - - while (*y) { - *y=tolower(*y); - y++; - } - return x; -} diff --git a/reactos/lib/crtdll/string/strncat.c b/reactos/lib/crtdll/string/strncat.c deleted file mode 100644 index b357e68aa56..00000000000 --- a/reactos/lib/crtdll/string/strncat.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -char * -strncat(char *dst, const char *src, size_t n) -{ - if (n != 0) - { - char *d = dst; - const char *s = src; - - while (*d != 0) - d++; - do { - if ((*d = *s++) == 0) - break; - d++; - } while (--n != 0); - *d = 0; - } - return dst; -} diff --git a/reactos/lib/crtdll/string/strncmp.c b/reactos/lib/crtdll/string/strncmp.c deleted file mode 100644 index 444f721bc22..00000000000 --- a/reactos/lib/crtdll/string/strncmp.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -int -strncmp(const char *s1, const char *s2, size_t n) -{ - - if (n == 0) - return 0; - do { - if (*s1 != *s2++) - return *(unsigned const char *)s1 - *(unsigned const char *)--s2; - if (*s1++ == 0) - break; - } while (--n != 0); - return 0; -} diff --git a/reactos/lib/crtdll/string/strncpy.c b/reactos/lib/crtdll/string/strncpy.c deleted file mode 100644 index e84c68d6eef..00000000000 --- a/reactos/lib/crtdll/string/strncpy.c +++ /dev/null @@ -1,24 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -char * -strncpy(char *dst, const char *src, size_t n) -{ - if (n != 0) { - char *d = dst; - const char *s = src; - - do { - if ((*d++ = *s++) == 0) - { - while (--n != 0) - *d++ = 0; - break; - } - } while (--n != 0); - } - return dst; -} diff --git a/reactos/lib/crtdll/string/strnicmp.c b/reactos/lib/crtdll/string/strnicmp.c deleted file mode 100644 index d6ff2c0d2d1..00000000000 --- a/reactos/lib/crtdll/string/strnicmp.c +++ /dev/null @@ -1,20 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include -#include - -/* - * @implemented - */ -int _strnicmp(const char *s1, const char *s2, size_t n) -{ - - if (n == 0) - return 0; - do { - if (toupper(*s1) != toupper(*s2++)) - return toupper(*(unsigned const char *)s1) - toupper(*(unsigned const char *)--s2); - if (*s1++ == 0) - break; - } while (--n != 0); - return 0; -} diff --git a/reactos/lib/crtdll/string/strnlen.c b/reactos/lib/crtdll/string/strnlen.c deleted file mode 100644 index ba113d00e14..00000000000 --- a/reactos/lib/crtdll/string/strnlen.c +++ /dev/null @@ -1,14 +0,0 @@ -/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ -#include - -size_t -strnlen(const char *str, size_t count) -{ - const char *s; - - if (str == 0) - return 0; - for (s = str; *s && count; ++s, count--); - return s-str; -} - diff --git a/reactos/lib/crtdll/string/strpbrk.c b/reactos/lib/crtdll/string/strpbrk.c deleted file mode 100644 index 72079d0aa8a..00000000000 --- a/reactos/lib/crtdll/string/strpbrk.c +++ /dev/null @@ -1,21 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -char * -strpbrk(const char *s1, const char *s2) -{ - const char *scanp; - int c, sc; - - while ((c = *s1++) != 0) - { - for (scanp = s2; (sc = *scanp++) != 0;) - if (sc == c) - return (char *)(s1 - 1); - } - return 0; -} diff --git a/reactos/lib/crtdll/string/strrchr.c b/reactos/lib/crtdll/string/strrchr.c deleted file mode 100644 index bfa8c1cf6ce..00000000000 --- a/reactos/lib/crtdll/string/strrchr.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -char * -strrchr(const char *s, int c) -{ - char cc = c; - const char *sp=(char *)0; - while (*s) - { - if (*s == cc) - sp = s; - s++; - } - if (cc == 0) - sp = s; - return (char *)sp; -} - diff --git a/reactos/lib/crtdll/string/strrev.c b/reactos/lib/crtdll/string/strrev.c deleted file mode 100644 index ed673c07d3e..00000000000 --- a/reactos/lib/crtdll/string/strrev.c +++ /dev/null @@ -1,21 +0,0 @@ -#include - -/* - * @implemented - */ -char * _strrev(char *s) -{ - char *e; - char a; - e=s; - while (*e) - e++; - while (s -#include -#include - -/* - * @implemented - */ -char* _strnset (char* szToFill, int szFill, size_t sizeMaxFill) -{ - char *t = szToFill; - int i = 0; - while( *szToFill != 0 && i < sizeMaxFill) - { - *szToFill = szFill; - szToFill++; - i++; - - } - return t; -} - -/* - * @implemented - */ -char* _strset (char* szToFill, int szFill) -{ - char *t = szToFill; - while( *szToFill != 0 ) - { - *szToFill = szFill; - szToFill++; - - } - return t; -} diff --git a/reactos/lib/crtdll/string/strspn.c b/reactos/lib/crtdll/string/strspn.c deleted file mode 100644 index e6bbb995458..00000000000 --- a/reactos/lib/crtdll/string/strspn.c +++ /dev/null @@ -1,19 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -/* - * @implemented - */ -size_t -strspn(const char *s1, const char *s2) -{ - const char *p = s1, *spanp; - char c, sc; - - cont: - c = *p++; - for (spanp = s2; (sc = *spanp++) != 0;) - if (sc == c) - goto cont; - return (p - 1 - s1); -} diff --git a/reactos/lib/crtdll/string/strspnp.c b/reactos/lib/crtdll/string/strspnp.c deleted file mode 100644 index 41f8be6d1d0..00000000000 --- a/reactos/lib/crtdll/string/strspnp.c +++ /dev/null @@ -1,16 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - -char * -strspnp(const char *s1, const char *s2) -{ - const char *p = s1, *spanp; - char c, sc; - - cont: - c = *p++; - for (spanp = s2; (sc = *spanp++) != 0;) - if (sc == c) - goto cont; - return p; -} diff --git a/reactos/lib/crtdll/string/strstr.c b/reactos/lib/crtdll/string/strstr.c deleted file mode 100644 index 430358fd196..00000000000 --- a/reactos/lib/crtdll/string/strstr.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ -#include - - -/* - * @implemented - */ -char *strstr(const char *s, const char *find) -{ - char c, sc; - size_t len; - - if ((c = *find++) != 0) - { - len = strlen(find); - do { - do { - if ((sc = *s++) == 0) - return 0; - } while (sc != c); - } while (strncmp(s, find, len) != 0); - s--; - } - return (char *)s; -} diff --git a/reactos/lib/crtdll/string/strtoul.c b/reactos/lib/crtdll/string/strtoul.c deleted file mode 100644 index 9af4337791d..00000000000 --- a/reactos/lib/crtdll/string/strtoul.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include - -/* - * @implemented - */ -unsigned long strtoul(const char *cp,char **endp,unsigned int base) -{ - unsigned long result = 0,value; - - if (!base) { - base = 10; - if (*cp == '0') { - base = 8; - cp++; - if ((*cp == 'x') && isxdigit(cp[1])) { - cp++; - base = 16; - } - } - } - while (isxdigit(*cp) && (value = isdigit(*cp) ? *cp-'0' : (islower(*cp) - ? toupper(*cp) : *cp)-'A'+10) < base) { - result = result*base + value; - cp++; - } - if (endp) - *endp = (char *)cp; - return result; -} diff --git a/reactos/lib/crtdll/string/strupr.c b/reactos/lib/crtdll/string/strupr.c deleted file mode 100644 index 413f585b21a..00000000000 --- a/reactos/lib/crtdll/string/strupr.c +++ /dev/null @@ -1,27 +0,0 @@ -/* - * The C RunTime DLL - * - * Implements C run-time functionality as known from UNIX. - * - * Copyright 1996,1998 Marcus Meissner - * Copyright 1996 Jukka Iivonen - * Copyright 1997 Uwe Bonnes - */ - - -#include -#include - -/* - * @implemented - */ -char *_strupr(char *x) -{ - char *y=x; - - while (*y) { - *y=toupper(*y); - y++; - } - return x; -} diff --git a/reactos/lib/crtdll/string/strxfrm.c b/reactos/lib/crtdll/string/strxfrm.c deleted file mode 100644 index 4d699c8c2bd..00000000000 --- a/reactos/lib/crtdll/string/strxfrm.c +++ /dev/null @@ -1,20 +0,0 @@ -#include -#include - -/* - * @unimplemented - */ -size_t strxfrm( char *dest, const char *src, size_t n ) -{ -#if 1 - strncpy(dest, src, n); - return (strlen(dest)); -#else - int ret = LCMapStringA(LOCALE_USER_DEFAULT,LCMAP_LOWERCASE, - src, strlen(src), dest, strlen(dest)); - - if ( ret == 0 ) - return -1; - return ret; -#endif -} diff --git a/reactos/lib/crtdll/wchar/wtoi.c b/reactos/lib/crtdll/wchar/wtoi.c index e5466f9887a..40eadcbaaac 100644 --- a/reactos/lib/crtdll/wchar/wtoi.c +++ b/reactos/lib/crtdll/wchar/wtoi.c @@ -3,16 +3,24 @@ /* * @implemented + * + * this function is now forwarded to NTDLL._wtoi to reduce code duplication */ +#if 0 int _wtoi(const wchar_t* str) { return (int)wcstol(str, 0, 10); } +#endif /* * @implemented + * + * this function is now forwarded to NTDLL._wtol to reduce code duplication */ +#if 0 long _wtol(const wchar_t* str) { return (int)wcstol(str, 0, 10); } +#endif diff --git a/reactos/subsys/system/explorer/startup.c b/reactos/subsys/system/explorer/startup.c index 17148bb65c6..d246081d1e3 100644 --- a/reactos/subsys/system/explorer/startup.c +++ b/reactos/subsys/system/explorer/startup.c @@ -209,7 +209,8 @@ static BOOL pendingRename() } else { /* Delete the file or directory */ - if( (res=GetFileAttributesW(src))!=INVALID_FILE_ATTRIBUTES ) + res = GetFileAttributesW ( src ); + if ( res != (DWORD)-1 ) { if( (res&FILE_ATTRIBUTE_DIRECTORY)==0 ) {