Commit df6fa302 authored by Alexandre Julliard's avatar Alexandre Julliard

Duplicated wsprintf implementation in shlwapi.

parent a5589d56
......@@ -17,7 +17,8 @@ C_SRCS = \
regstream.c \
shlwapi_main.c \
string.c \
url.c
url.c \
wsprintf.c
EXTRASUBDIRS = tests
......
......@@ -680,8 +680,8 @@ init SHLWAPI_LibMain
@ stdcall UrlUnescapeW(wstr ptr ptr long) UrlUnescapeW
@ varargs wnsprintfA(ptr long str) wnsprintfA
@ varargs wnsprintfW(ptr long wstr) wnsprintfW
@ forward wvnsprintfA user32.wvsnprintfA
@ forward wvnsprintfW user32.wvsnprintfW
@ stdcall wvnsprintfA(ptr long str ptr) wvnsprintfA
@ stdcall wvnsprintfW(ptr long wstr ptr) wvnsprintfW
# exported in later versions
......
......@@ -634,31 +634,3 @@ BOOL WINAPI StrTrimA(LPSTR pszSource, LPCSTR pszTrimChars)
TRACE("<- '%s'\n", pszSource);
return trimmed;
}
/*************************************************************************
* wnsprintfA [SHLWAPI.@]
*/
int WINAPIV wnsprintfA(LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt, ...)
{
va_list valist;
INT res;
va_start( valist, lpFmt );
res = wvsnprintfA( lpOut, cchLimitIn, lpFmt, valist );
va_end( valist );
return res;
}
/*************************************************************************
* wnsprintfW [SHLWAPI.@]
*/
int WINAPIV wnsprintfW(LPWSTR lpOut, int cchLimitIn, LPCWSTR lpFmt, ...)
{
va_list valist;
INT res;
va_start( valist, lpFmt );
res = wvsnprintfW( lpOut, cchLimitIn, lpFmt, valist );
va_end( valist );
return res;
}
......@@ -671,9 +671,3 @@ init UserClientDllInitialize
@ stdcall SendDriverMessage16(long long long long) SendDriverMessage16
@ stdcall SetWindowsHookEx16(long long long long) SetWindowsHookEx16
@ stdcall UserYield16() UserYield16
################################################################
# Wine extensions: extra useful functions not exported under Windows
#
@ stdcall wvsnprintfA(ptr long str ptr) wvsnprintfA
@ stdcall wvsnprintfW(ptr long wstr ptr) wvsnprintfW
......@@ -16,6 +16,10 @@
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* NOTE:
* This code is duplicated in shlwapi. If you change something here make sure
* to change it in shlwapi too.
*/
#include <stdarg.h>
......@@ -373,9 +377,9 @@ static INT16 wvsnprintf16( LPSTR buffer, UINT16 maxlen, LPCSTR spec,
/***********************************************************************
* wvsnprintfA (USER32.@) (Not a Windows API, but we export it from USER32 anyway)
* wvsnprintfA (internal)
*/
INT WINAPI wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, va_list args )
static INT wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, va_list args )
{
WPRINTF_FORMAT format;
LPSTR p = buffer;
......@@ -476,9 +480,9 @@ INT WINAPI wvsnprintfA( LPSTR buffer, UINT maxlen, LPCSTR spec, va_list args )
/***********************************************************************
* wvsnprintfW (USER32.@) (Not a Windows API, but we export it from USER32 anyway)
* wvsnprintfW (internal)
*/
INT WINAPI wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, va_list args )
static INT wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, va_list args )
{
WPRINTF_FORMAT format;
LPWSTR p = buffer;
......
......@@ -4241,12 +4241,6 @@ WORD WINAPI SYSTEM_KillSystemTimer( WORD );
HRESULT WINAPI PrivateExtractIconsA(LPCSTR,INT,DWORD,DWORD,HICON*,DWORD,UINT,DWORD);
HRESULT WINAPI PrivateExtractIconsW(LPCWSTR,INT,DWORD,DWORD,HICON*,DWORD,UINT,DWORD);
/* Extra functions that don't exist in the Windows API */
INT WINAPI wvsnprintfA(LPSTR,UINT,LPCSTR,va_list);
INT WINAPI wvsnprintfW(LPWSTR,UINT,LPCWSTR,va_list);
#define wvsnprintf WINELIB_NAME_AW(wvsnprintf)
#ifdef __cplusplus
}
#endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment