#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "shlwapi.h"
#include "wine/debug.h"
Go to the source code of this file.
|
| WINE_DEFAULT_DEBUG_CHANNEL (string) |
|
static INT | WPRINTF_ParseFormatA (LPCSTR format, WPRINTF_FORMAT *res) |
|
static INT | WPRINTF_ParseFormatW (LPCWSTR format, WPRINTF_FORMAT *res) |
|
static UINT | WPRINTF_GetLen (WPRINTF_FORMAT *format, WPRINTF_DATA *arg, LPSTR number, UINT maxlen) |
|
INT WINAPI | wvnsprintfA (LPSTR buffer, INT maxlen, LPCSTR spec, __ms_va_list args) |
|
INT WINAPI | wvnsprintfW (LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list args) |
|
int WINAPIV | wnsprintfA (LPSTR lpOut, int cchLimitIn, LPCSTR lpFmt,...) |
|
int WINAPIV | wnsprintfW (LPWSTR lpOut, int cchLimitIn, LPCWSTR lpFmt,...) |
|
◆ NO_SHLWAPI_REG
◆ WPRINTF_I64
#define WPRINTF_I64 0x0100 /* 64-bit arg ('I64' prefix) */ |
◆ WPRINTF_INTPTR
#define WPRINTF_INTPTR 0x0080 /* Pointer-size arg ('I' prefix) */ |
◆ WPRINTF_LEFTALIGN
#define WPRINTF_LEFTALIGN 0x0001 /* Align output on the left ('-' prefix) */ |
◆ WPRINTF_LONG
#define WPRINTF_LONG 0x0008 /* Long arg ('l' prefix) */ |
◆ WPRINTF_PREFIX_HEX
#define WPRINTF_PREFIX_HEX 0x0002 /* Prefix hex with 0x ('#' prefix) */ |
◆ WPRINTF_SHORT
#define WPRINTF_SHORT 0x0010 /* Short arg ('h' prefix) */ |
◆ WPRINTF_UPPER_HEX
#define WPRINTF_UPPER_HEX 0x0020 /* Upper-case hex ('X' specifier) */ |
◆ WPRINTF_WIDE
#define WPRINTF_WIDE 0x0040 /* Wide arg ('w' prefix) */ |
◆ WPRINTF_ZEROPAD
#define WPRINTF_ZEROPAD 0x0004 /* Pad with zeros ('0' prefix) */ |
◆ WPRINTF_TYPE
Enumerator |
---|
WPR_UNKNOWN | |
WPR_CHAR | |
WPR_WCHAR | |
WPR_STRING | |
WPR_WSTRING | |
WPR_SIGNED | |
WPR_UNSIGNED | |
WPR_HEXA | |
Definition at line 49 of file wsprintf.c.
◆ WINE_DEFAULT_DEBUG_CHANNEL()
WINE_DEFAULT_DEBUG_CHANNEL |
( |
string |
| ) |
|
◆ wnsprintfA()
Definition at line 547 of file wsprintf.c.
static static const char __ms_va_list
#define __ms_va_end(list)
#define __ms_va_start(list, arg)
static __ms_va_list valist
INT WINAPI wvnsprintfA(LPSTR buffer, INT maxlen, LPCSTR spec, __ms_va_list args)
◆ wnsprintfW()
Definition at line 564 of file wsprintf.c.
static static const char __ms_va_list
INT WINAPI wvnsprintfW(LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list args)
#define __ms_va_end(list)
#define __ms_va_start(list, arg)
static __ms_va_list valist
Referenced by confirm_delete_list().
◆ WPRINTF_GetLen()
Definition at line 247 of file wsprintf.c.
258 return (
format->precision = 1);
262 if (!*(
arg->lpcstr_view +
len))
break;
263 if (
len > maxlen)
len = maxlen;
268 if (!*(
arg->lpcwstr_view +
len))
break;
269 if (
len > maxlen)
len = maxlen;
301 if (
len > maxlen)
len = maxlen;
303 if (
format->precision > maxlen)
format->precision = maxlen;
unsigned __int3264 UINT_PTR
#define WPRINTF_PREFIX_HEX
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
static size_t double number
#define WPRINTF_LEFTALIGN
static const WCHAR null_stringW[]
static const CHAR null_stringA[]
#define WPRINTF_UPPER_HEX
static const int digits[]
Referenced by wvnsprintfA(), and wvnsprintfW().
◆ WPRINTF_ParseFormatA()
Definition at line 89 of file wsprintf.c.
99 while ((*
p >=
'0') && (*
p <=
'9'))
101 res->width =
res->width * 10 + *
p -
'0';
107 while ((*
p >=
'0') && (*
p <=
'9'))
109 res->precision =
res->precision * 10 + *
p -
'0';
119 else if (
p[1] ==
'3' &&
p[2] ==
'2')
p += 3;
144 res->width = 2 *
sizeof(
void *);
#define WPRINTF_PREFIX_HEX
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define WPRINTF_LEFTALIGN
#define WPRINTF_UPPER_HEX
Referenced by wvnsprintfA().
◆ WPRINTF_ParseFormatW()
Definition at line 171 of file wsprintf.c.
181 while ((*
p >=
'0') && (*
p <=
'9'))
183 res->width =
res->width * 10 + *
p -
'0';
189 while ((*
p >=
'0') && (*
p <=
'9'))
191 res->precision =
res->precision * 10 + *
p -
'0';
201 else if (
p[1] ==
'3' &&
p[2] ==
'2')
p += 3;
226 res->width = 2 *
sizeof(
void *);
#define WPRINTF_PREFIX_HEX
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define WPRINTF_LEFTALIGN
#define WPRINTF_UPPER_HEX
Referenced by wvnsprintfW().
◆ wvnsprintfA()
Definition at line 325 of file wsprintf.c.
335 while (*spec && (maxlen > 1))
337 if (*spec !=
'%') { *
p++ = *spec++; maxlen--;
continue; }
339 if (*spec ==
'%') { *
p++ = *spec++; maxlen--;
continue; }
409 for (
i =
len;
i <
format.precision;
i++, maxlen--) *
p++ =
'0';
static size_t double int int int * sign
static INT WPRINTF_ParseFormatA(LPCSTR format, WPRINTF_FORMAT *res)
#define WPRINTF_PREFIX_HEX
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
static size_t double number
#define WPRINTF_LEFTALIGN
#define memcpy(s1, s2, n)
#define WPRINTF_UPPER_HEX
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static UINT WPRINTF_GetLen(WPRINTF_FORMAT *format, WPRINTF_DATA *arg, LPSTR number, UINT maxlen)
Referenced by wnsprintfA().
◆ wvnsprintfW()
Definition at line 432 of file wsprintf.c.
442 while (*spec && (maxlen > 1))
444 if (*spec !=
'%') { *
p++ = *spec++; maxlen--;
continue; }
446 if (*spec ==
'%') { *
p++ = *spec++; maxlen--;
continue; }
516 for (
i =
len;
i <
format.precision;
i++, maxlen--) *
p++ =
'0';
static size_t double int int int * sign
static INT WPRINTF_ParseFormatW(LPCWSTR format, WPRINTF_FORMAT *res)
#define WPRINTF_PREFIX_HEX
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
static size_t double number
#define WPRINTF_LEFTALIGN
#define memcpy(s1, s2, n)
#define WPRINTF_UPPER_HEX
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
static UINT WPRINTF_GetLen(WPRINTF_FORMAT *format, WPRINTF_DATA *arg, LPSTR number, UINT maxlen)
Referenced by wnsprintfW().
◆ null_stringA
◆ null_stringW