libport: Move the non-inline version of the string functions to libwine.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0e03ad249c
commit
1fdbf850ee
|
@ -40,7 +40,7 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
#ifndef WINE_UNICODE_INLINE
|
||||
#define WINE_UNICODE_INLINE static inline
|
||||
#define WINE_UNICODE_INLINE static FORCEINLINE
|
||||
#endif
|
||||
|
||||
/* code page info common to SBCS and DBCS */
|
||||
|
@ -79,11 +79,6 @@ union cptable
|
|||
struct dbcs_table dbcs;
|
||||
};
|
||||
|
||||
extern int sprintfW( WCHAR *str, const WCHAR *format, ... );
|
||||
extern int snprintfW( WCHAR *str, size_t len, const WCHAR *format, ... );
|
||||
extern int vsprintfW( WCHAR *str, const WCHAR *format, va_list valist );
|
||||
extern int vsnprintfW( WCHAR *str, size_t len, const WCHAR *format, va_list valist );
|
||||
|
||||
WINE_UNICODE_INLINE WCHAR tolowerW( WCHAR ch )
|
||||
{
|
||||
extern const WCHAR wine_casemap_lower[];
|
||||
|
@ -401,6 +396,28 @@ WINE_UNICODE_INLINE int atoiW( const WCHAR *str )
|
|||
return (int)atolW( str );
|
||||
}
|
||||
|
||||
NTSYSAPI int __cdecl _vsnwprintf(WCHAR*,size_t,const WCHAR*,__ms_va_list);
|
||||
|
||||
static inline int WINAPIV snprintfW( WCHAR *str, size_t len, const WCHAR *format, ...)
|
||||
{
|
||||
int retval;
|
||||
__ms_va_list valist;
|
||||
__ms_va_start(valist, format);
|
||||
retval = _vsnwprintf(str, len, format, valist);
|
||||
__ms_va_end(valist);
|
||||
return retval;
|
||||
}
|
||||
|
||||
static inline int WINAPIV sprintfW( WCHAR *str, const WCHAR *format, ...)
|
||||
{
|
||||
int retval;
|
||||
__ms_va_list valist;
|
||||
__ms_va_start(valist, format);
|
||||
retval = _vsnwprintf(str, MAXLONG, format, valist);
|
||||
__ms_va_end(valist);
|
||||
return retval;
|
||||
}
|
||||
|
||||
#undef WINE_UNICODE_INLINE
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -17,7 +17,6 @@ C_SRCS = \
|
|||
rint.c \
|
||||
spawn.c \
|
||||
statvfs.c \
|
||||
string.c \
|
||||
strnlen.c \
|
||||
symlink.c \
|
||||
usleep.c \
|
||||
|
|
|
@ -81,6 +81,7 @@ C_SRCS = \
|
|||
mmap.c \
|
||||
port.c \
|
||||
sortkey.c \
|
||||
string.c \
|
||||
utf8.c \
|
||||
wctomb.c
|
||||
|
||||
|
|
|
@ -27,16 +27,8 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "wine/unicode.h"
|
||||
|
||||
/* functions from libwine_port that are also exported from libwine for backwards compatibility,
|
||||
* on platforms that require it */
|
||||
const void *libwine_port_functions[] =
|
||||
{
|
||||
strtolW,
|
||||
vsnprintfW,
|
||||
};
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
|
||||
/* no longer used, for backwards compatibility only */
|
||||
struct wine_pthread_functions;
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
|
||||
#include "wine/asm.h"
|
||||
|
||||
#ifdef __ASM_OBSOLETE
|
||||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
|
@ -711,3 +715,5 @@ int sprintfW( WCHAR *str, const WCHAR *format, ...)
|
|||
va_end(valist);
|
||||
return retval;
|
||||
}
|
||||
|
||||
#endif /* __ASM_OBSOLETE */
|
Loading…
Reference in New Issue