mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
modified crtdll to forward most of it's CTYPE, STRING and WSTRING entries to NTDLL or MSVCRT.
svn path=/trunk/; revision=5132
This commit is contained in:
parent
8ff4e97a06
commit
4610a1b077
61 changed files with 181 additions and 1606 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-07-15 Royce Mitchell III <royce3@ev1.net>
|
||||
|
||||
* modified crtdll to forward most of it's CTYPE, STRING
|
||||
and WSTRING entries to NTDLL or MSVCRT.
|
||||
|
||||
2003-07-14 James Tabor <jimtabor@adsl-64-217-116-74.dsl.hstntx.swbell.net>
|
||||
|
||||
* lib/gdi32/misc/stubs.c Remove FillRgn.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,264 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
unsigned short _ctype[] = {
|
||||
0, /* <EOF>, 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 */
|
|
@ -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 <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#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);
|
||||
}
|
|
@ -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 <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isalpha
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int isalpha(int c)
|
||||
{
|
||||
return _isctype(c, _ALPHA);
|
||||
}
|
||||
|
||||
#undef iswalpha
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iswalpha(wint_t c)
|
||||
{
|
||||
return iswctype(c, _ALPHA);
|
||||
}
|
|
@ -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 <msvcrt/ctype.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int __isascii(int c)
|
||||
{
|
||||
return (!((c)&(~0x7f)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iswascii(wint_t c)
|
||||
{
|
||||
return __isascii(c);
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef iscntrl
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iscntrl(int c)
|
||||
{
|
||||
return _isctype(c, _CONTROL);
|
||||
}
|
||||
|
||||
#undef iswcntrl
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iswcntrl(wint_t c)
|
||||
{
|
||||
return iswctype(c, _CONTROL);
|
||||
}
|
|
@ -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 <msvcrt/ctype.h>
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int __iscsymf(int c)
|
||||
{
|
||||
return (isalpha(c) || ( c == '_' )) ;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int __iscsym(int c)
|
||||
{
|
||||
return (isalnum(c) || ( 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 */
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isdigit
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int isdigit(int c)
|
||||
{
|
||||
return _isctype(c, _DIGIT);
|
||||
}
|
||||
|
||||
#undef iswdigit
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iswdigit(wint_t c)
|
||||
{
|
||||
return iswctype(c, _DIGIT);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
#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);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef islower
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int islower(int c)
|
||||
{
|
||||
return _isctype(c, _LOWER);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iswlower(wint_t c)
|
||||
{
|
||||
return iswctype(c, _LOWER);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
#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);
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef ispunct
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int ispunct(int c)
|
||||
{
|
||||
return _isctype(c, _PUNCT);
|
||||
}
|
||||
|
||||
#undef iswpunct
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iswpunct(wint_t c)
|
||||
{
|
||||
return iswctype(c, _PUNCT);
|
||||
}
|
|
@ -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 <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isspace
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int isspace(int c)
|
||||
{
|
||||
return _isctype(c,_SPACE);
|
||||
}
|
||||
|
||||
#undef iswspace
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iswspace(wint_t c)
|
||||
{
|
||||
return iswctype(c,_SPACE);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isupper
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int isupper(int c)
|
||||
{
|
||||
return _isctype(c, _UPPER);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iswupper(wint_t c)
|
||||
{
|
||||
return iswctype(c, _UPPER);
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#undef isxdigit
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int isxdigit(int c)
|
||||
{
|
||||
return _isctype(c, _HEX);
|
||||
}
|
||||
|
||||
#undef iswxdigit
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int iswxdigit(wint_t c)
|
||||
{
|
||||
return iswctype(c, _HEX);
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int __toascii(int c)
|
||||
{
|
||||
return((unsigned)(c) & 0x7F);
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
*/
|
||||
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
|
||||
#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);
|
||||
}
|
||||
*/
|
||||
|
|
@ -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 = \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void *
|
||||
_memccpy (void *to, const void *from,int c,size_t count)
|
||||
{
|
||||
memcpy(to,from,count);
|
||||
return memchr(to,c,count);
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* 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;
|
||||
}
|
|
@ -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
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/ctype.h>
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -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
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -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
|
|
@ -1,15 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
char* strcat(char* s, const char* append)
|
||||
{
|
||||
char* save = s;
|
||||
|
||||
for (; *s; ++s);
|
||||
while ((*s++ = *append++));
|
||||
return save;
|
||||
}
|
|
@ -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 <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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);
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
#include <windows.h>
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
/* 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
|
|
@ -1,15 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
#pragma function(strcpy)
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
char* strcpy(char *to, const char *from)
|
||||
{
|
||||
char *save = to;
|
||||
|
||||
for (; (*to = *from); ++from, ++to);
|
||||
return save;
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
/*
|
||||
* @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 */
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
#include <msvcrt/stdlib.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -1,28 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
/*
|
||||
* @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);
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
size_t strlen(const char* str)
|
||||
{
|
||||
const char* s;
|
||||
|
||||
if (str == 0)
|
||||
return 0;
|
||||
for (s = str; *s; ++s);
|
||||
return s-str;
|
||||
}
|
||||
|
|
@ -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 <msvcrt/string.h>
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
char * _strlwr(char *x)
|
||||
{
|
||||
char *y=x;
|
||||
|
||||
while (*y) {
|
||||
*y=tolower(*y);
|
||||
y++;
|
||||
}
|
||||
return x;
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -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 <msvcrt/string.h>
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#include <msvcrt/string.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
char * _strrev(char *s)
|
||||
{
|
||||
char *e;
|
||||
char a;
|
||||
e=s;
|
||||
while (*e)
|
||||
e++;
|
||||
while (s<e) {
|
||||
a=*s;
|
||||
*s=*e;
|
||||
*e=a;
|
||||
s++;
|
||||
e--;
|
||||
}
|
||||
return s;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
#include <msvcrt/string.h>
|
||||
#include <msvcrt/stdlib.h>
|
||||
#include <msvcrt/crttypes.h>
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
/*
|
||||
* @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);
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
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;
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -1,30 +0,0 @@
|
|||
#include <msvcrt/string.h>
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
/*
|
||||
* @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;
|
||||
}
|
|
@ -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 <msvcrt/string.h>
|
||||
#include <msvcrt/ctype.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
char *_strupr(char *x)
|
||||
{
|
||||
char *y=x;
|
||||
|
||||
while (*y) {
|
||||
*y=toupper(*y);
|
||||
y++;
|
||||
}
|
||||
return x;
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
#include <windows.h>
|
||||
#include <msvcrt/string.h>
|
||||
|
||||
/*
|
||||
* @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
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue