Alexandre Julliard : ntdll: Copy some missing string functions from msvcrt.
Alexandre Julliard
julliard at winehq.org
Thu Mar 14 14:55:06 CDT 2013
Module: wine
Branch: master
Commit: e3f9f7b38861b9f524bdd5210ffba439f629557b
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e3f9f7b38861b9f524bdd5210ffba439f629557b
Author: Alexandre Julliard <julliard at winehq.org>
Date: Thu Mar 14 13:53:46 2013 +0100
ntdll: Copy some missing string functions from msvcrt.
---
dlls/ntdll/ntdll.spec | 12 +++++-----
dlls/ntdll/string.c | 54 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 60 insertions(+), 6 deletions(-)
diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec
index d144986..83e9260 100644
--- a/dlls/ntdll/ntdll.spec
+++ b/dlls/ntdll/ntdll.spec
@@ -1247,10 +1247,10 @@
@ cdecl -private -arch=i386 _CIsqrt() NTDLL__CIsqrt
@ stdcall -arch=x86_64 __C_specific_handler(ptr long ptr ptr)
@ stdcall -private -arch=x86_64 -norelay __chkstk()
-# @ stub __isascii
-# @ stub __iscsym
-# @ stub __iscsymf
-# @ stub __toascii
+@ cdecl -private __isascii(long) NTDLL___isascii
+@ cdecl -private __iscsym(long) NTDLL___iscsym
+@ cdecl -private __iscsymf(long) NTDLL___iscsymf
+@ cdecl -private __toascii(long) NTDLL___toascii
@ stdcall -private -arch=i386 -ret64 _alldiv(int64 int64)
# @ stub _alldvrm
@ stdcall -private -arch=i386 -ret64 _allmul(int64 int64)
@@ -1284,8 +1284,8 @@
@ cdecl -private _strlwr(str)
@ cdecl -private _strnicmp(str str long)
@ cdecl -private _strupr(str)
-# @ stub -private _tolower
-# @ stub -private _toupper
+@ cdecl -private _tolower(long) NTDLL__tolower
+@ cdecl -private _toupper(long) NTDLL__toupper
@ cdecl -private _ui64toa(int64 ptr long)
@ cdecl -private _ui64tow(int64 ptr long)
@ cdecl -private _ultoa(long ptr long)
diff --git a/dlls/ntdll/string.c b/dlls/ntdll/string.c
index 699adb5..e7a1a61 100644
--- a/dlls/ntdll/string.c
+++ b/dlls/ntdll/string.c
@@ -415,6 +415,60 @@ int __cdecl NTDLL_isxdigit( int c )
/*********************************************************************
+ * __isascii (NTDLL.@)
+ */
+int CDECL NTDLL___isascii(int c)
+{
+ return (unsigned)c < 0x80;
+}
+
+
+/*********************************************************************
+ * __toascii (NTDLL.@)
+ */
+int CDECL NTDLL___toascii(int c)
+{
+ return (unsigned)c & 0x7f;
+}
+
+
+/*********************************************************************
+ * __iscsym (NTDLL.@)
+ */
+int CDECL NTDLL___iscsym(int c)
+{
+ return (c < 127 && (isalnum(c) || c == '_'));
+}
+
+
+/*********************************************************************
+ * __iscsymf (NTDLL.@)
+ */
+int CDECL NTDLL___iscsymf(int c)
+{
+ return (c < 127 && (isalpha(c) || c == '_'));
+}
+
+
+/*********************************************************************
+ * _toupper (NTDLL.@)
+ */
+int CDECL NTDLL__toupper(int c)
+{
+ return c - 0x20; /* sic */
+}
+
+
+/*********************************************************************
+ * _tolower (NTDLL.@)
+ */
+int CDECL NTDLL__tolower(int c)
+{
+ return c + 0x20; /* sic */
+}
+
+
+/*********************************************************************
* strtol (NTDLL.@)
*/
LONG __cdecl NTDLL_strtol( const char *nptr, char **endptr, int base )
More information about the wine-cvs
mailing list