Nikolay Sivov : msvcrt: Add _snprintf_s implementation.

Alexandre Julliard julliard at winehq.org
Fri Jun 11 09:58:32 CDT 2010


Module: wine
Branch: master
Commit: 59bddde594a9bca91de4f09914c092c37efe6200
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=59bddde594a9bca91de4f09914c092c37efe6200

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Thu Jun 10 23:12:20 2010 +0400

msvcrt: Add _snprintf_s implementation.

---

 dlls/msvcr100/msvcr100.spec |    2 +-
 dlls/msvcr80/msvcr80.spec   |    2 +-
 dlls/msvcr90/msvcr90.spec   |    2 +-
 dlls/msvcrt/msvcrt.spec     |    2 +-
 dlls/msvcrt/wcs.c           |   14 ++++++++++++++
 5 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec
index 2117c05..e6524d6 100644
--- a/dlls/msvcr100/msvcr100.spec
+++ b/dlls/msvcr100/msvcr100.spec
@@ -1044,7 +1044,7 @@
 @ stub _snprintf_c
 @ stub _snprintf_c_l
 @ stub _snprintf_l
-@ stub _snprintf_s
+@ varargs _snprintf_s(ptr long long str) msvcrt._snprintf_s
 @ stub _snprintf_s_l
 @ stub _snscanf
 @ stub _snscanf_l
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index 0249277..db65318 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -891,7 +891,7 @@
 @ stub _snprintf_c
 @ stub _snprintf_c_l
 @ stub _snprintf_l
-@ stub _snprintf_s
+@ varargs _snprintf_s(ptr long long str) msvcrt._snprintf_s
 @ stub _snprintf_s_l
 @ stub _snscanf
 @ stub _snscanf_l
diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec
index 6592e7c..1da6e82 100644
--- a/dlls/msvcr90/msvcr90.spec
+++ b/dlls/msvcr90/msvcr90.spec
@@ -877,7 +877,7 @@
 @ stub _snprintf_c
 @ stub _snprintf_c_l
 @ stub _snprintf_l
-@ stub _snprintf_s
+@ varargs _snprintf_s(ptr long long str) msvcrt._snprintf_s
 @ stub _snprintf_s_l
 @ stub _snscanf
 @ stub _snscanf_l
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 604a5ce..ff19519 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -830,7 +830,7 @@
 # stub _snprintf_c
 # stub _snprintf_c_l
 # stub _snprintf_l
-# stub _snprintf_s
+@ varargs _snprintf_s(ptr long long str) MSVCRT__snprintf_s
 # stub _snprintf_s_l
 # stub _snscanf
 # stub _snscanf_l
diff --git a/dlls/msvcrt/wcs.c b/dlls/msvcrt/wcs.c
index 78e42b2..9571928 100644
--- a/dlls/msvcrt/wcs.c
+++ b/dlls/msvcrt/wcs.c
@@ -1103,6 +1103,20 @@ int CDECL MSVCRT__snprintf(char *str, unsigned int len, const char *format, ...)
 }
 
 /*********************************************************************
+ *		_snprintf_s (MSVCRT.@)
+ */
+int CDECL MSVCRT__snprintf_s(char *str, unsigned int len, unsigned int count,
+    const char *format, ...)
+{
+    int retval;
+    __ms_va_list valist;
+    __ms_va_start(valist, format);
+    retval = MSVCRT_vsnprintf_s_l(str, len, count, format, NULL, valist);
+    __ms_va_end(valist);
+    return retval;
+}
+
+/*********************************************************************
  * vsnwprintf_internal (INTERNAL)
  */
 static inline int vsnwprintf_internal(MSVCRT_wchar_t *str, MSVCRT_size_t len,




More information about the wine-cvs mailing list