mirror of
https://github.com/reactos/reactos.git
synced 2025-07-09 03:18:06 +00:00
Create a branch for network fixes.
svn path=/branches/aicom-network-fixes/; revision=34994
This commit is contained in:
parent
0e213bbc00
commit
c501d8112c
18148 changed files with 0 additions and 860488 deletions
41
lib/sdk/crt/stdio/lnx_vsprintf.c
Normal file
41
lib/sdk/crt/stdio/lnx_vsprintf.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <precomp.h>
|
||||
#include <tchar.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
lnx__vstprintf(_TCHAR *str, const _TCHAR *fmt, va_list ap)
|
||||
{
|
||||
FILE f = {0};
|
||||
int len;
|
||||
|
||||
f._flag = _IOWRT|_IOSTRG|_IOBINARY;
|
||||
f._ptr = (char*)str;
|
||||
f._cnt = INT_MAX;
|
||||
f._file = -1;
|
||||
len = lnx_vftprintf(&f,fmt, ap);
|
||||
*(_TCHAR*)f._ptr = 0;
|
||||
return len;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
lnx__vsntprintf(_TCHAR *str, size_t maxlen, const _TCHAR *fmt, va_list ap)
|
||||
{
|
||||
FILE f = {0};
|
||||
int len;
|
||||
|
||||
f._flag = _IOWRT|_IOSTRG|_IOBINARY;
|
||||
f._ptr = (char*)str;
|
||||
f._cnt = maxlen * sizeof(_TCHAR);
|
||||
f._file = -1;
|
||||
len = lnx_vftprintf(&f,fmt, ap);
|
||||
// what if the buffer is full ??
|
||||
*(_TCHAR *)f._ptr = 0;
|
||||
return len;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue