[PATCH 1/3] [Msvcrt*]: implemented _ltoa_s

Eric Pouech eric.pouech at orange.fr
Mon Nov 15 14:59:55 CST 2010




A+
---

 dlls/msvcr100/msvcr100.spec |    4 ++--
 dlls/msvcr80/msvcr80.spec   |    4 ++--
 dlls/msvcr90/msvcr90.spec   |    4 ++--
 dlls/msvcrt/msvcrt.spec     |    4 ++--
 dlls/msvcrt/string.c        |   30 ++++++++++++++++++++++++------
 5 files changed, 32 insertions(+), 14 deletions(-)


diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index f172f7b..ce8cb93 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -862,9 +862,9 @@
 @ cdecl _lseek(long long long) msvcrt._lseek
 @ cdecl -ret64 _lseeki64(long int64 long) msvcrt._lseeki64
 @ cdecl _ltoa(long ptr long) msvcrt._ltoa
-@ stub _ltoa_s
+@ cdecl _ltoa_s(long ptr long long) msvcrt._ltoa_s
 @ cdecl _ltow(long ptr long) msvcrt._ltow
-@ stub _ltow_s
+@ cdecl _ltow_s(long ptr long long) msvcrt._ltow_s
 @ cdecl _makepath(ptr str str str str) msvcrt._makepath
 @ cdecl _makepath_s(ptr long str str str str) msvcrt._makepath_s
 @ cdecl _malloc_crt(long) msvcrt.malloc
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index f939329..b3f41be 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -708,9 +708,9 @@
 @ cdecl _lseek(long long long) msvcrt._lseek
 @ cdecl -ret64 _lseeki64(long int64 long) msvcrt._lseeki64
 @ cdecl _ltoa(long ptr long) msvcrt._ltoa
-@ stub _ltoa_s
+@ cdecl _ltoa_s(long ptr long long) msvcrt._ltoa_s
 @ cdecl _ltow(long ptr long) msvcrt._ltow
-@ stub _ltow_s
+@ cdecl _ltow_s(long ptr long long) msvcrt._ltow_s
 @ cdecl _makepath(ptr str str str str) msvcrt._makepath
 @ cdecl _makepath_s(ptr long str str str str) msvcrt._makepath_s
 @ cdecl _malloc_crt(long) msvcrt.malloc
diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec
index 99e81fd..3dc1dcd 100644
--- a/dlls/msvcr90/msvcr90.spec
+++ b/dlls/msvcr90/msvcr90.spec
@@ -696,9 +696,9 @@
 @ cdecl _lseek(long long long) msvcrt._lseek
 @ cdecl -ret64 _lseeki64(long int64 long) msvcrt._lseeki64
 @ cdecl _ltoa(long ptr long) msvcrt._ltoa
-@ stub _ltoa_s
+@ cdecl _ltoa_s(long ptr long long) msvcrt._ltoa_s
 @ cdecl _ltow(long ptr long) msvcrt._ltow
-@ stub _ltow_s
+@ cdecl _ltow_s(long ptr long long) msvcrt._ltow_s
 @ cdecl _makepath(ptr str str str str) msvcrt._makepath
 @ cdecl _makepath_s(ptr long str str str str) msvcrt._makepath_s
 @ cdecl _malloc_crt(long) msvcrt.malloc
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 4a531f4..379746f 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -639,9 +639,9 @@
 @ cdecl _lseek(long long long) MSVCRT__lseek
 @ cdecl -ret64 _lseeki64(long int64 long) MSVCRT__lseeki64
 @ cdecl _ltoa(long ptr long) ntdll._ltoa
-# stub _ltoa_s
+@ cdecl _ltoa_s(long ptr long long) ntdll._ltoa_s
 @ cdecl _ltow(long ptr long) ntdll._ltow
-# stub _ltow_s
+@ cdecl _ltow_s(long ptr long long) ntdll._ltow_s
 @ cdecl _makepath(ptr str str str str)
 @ cdecl _makepath_s(ptr long str str str str)
 # stub _malloc_dbg
diff --git a/dlls/msvcrt/string.c b/dlls/msvcrt/string.c
index ea3ca1b..1f685db 100644
--- a/dlls/msvcrt/string.c
+++ b/dlls/msvcrt/string.c
@@ -671,11 +671,12 @@ unsigned __int64 CDECL MSVCRT_strtoui64(const char *nptr, char **endptr, int bas
 }
 
 /*********************************************************************
- *  _itoa_s (MSVCRT.@)
+ *  _ltoa_s (MSVCRT.@)
  */
-int CDECL _itoa_s(int value, char *str, MSVCRT_size_t size, int radix)
+int CDECL _ltoa_s(MSVCRT_long value, char *str, MSVCRT_size_t size, int radix)
 {
-    unsigned int val, digit;
+    MSVCRT_ulong val;
+    unsigned int digit;
     int is_negative;
     char buffer[33], *pos;
     size_t len;
@@ -748,11 +749,12 @@ int CDECL _itoa_s(int value, char *str, MSVCRT_size_t size, int radix)
 }
 
 /*********************************************************************
- *  _itow_s (MSVCRT.@)
+ *  _ltow_s (MSVCRT.@)
  */
-int CDECL _itow_s(int value, MSVCRT_wchar_t *str, MSVCRT_size_t size, int radix)
+int CDECL _ltow_s(MSVCRT_long value, MSVCRT_wchar_t *str, MSVCRT_size_t size, int radix)
 {
-    unsigned int val, digit;
+    MSVCRT_ulong val;
+    unsigned int digit;
     int is_negative;
     MSVCRT_wchar_t buffer[33], *pos;
     size_t len;
@@ -825,6 +827,22 @@ int CDECL _itow_s(int value, MSVCRT_wchar_t *str, MSVCRT_size_t size, int radix)
 }
 
 /*********************************************************************
+ *  _itoa_s (MSVCRT.@)
+ */
+int CDECL _itoa_s(int value, char *str, MSVCRT_size_t size, int radix)
+{
+    return _ltoa_s(value, str, size, radix);
+}
+
+/*********************************************************************
+ *  _itow_s (MSVCRT.@)
+ */
+int CDECL _itow_s(int value, MSVCRT_wchar_t *str, MSVCRT_size_t size, int radix)
+{
+    return _ltow_s(value, str, size, radix);
+}
+
+/*********************************************************************
  *  _ui64toa_s (MSVCRT.@)
  */
 int CDECL MSVCRT__ui64toa_s(unsigned __int64 value, char *str,




More information about the wine-patches mailing list