|
发表于 2020-7-8 21:45:01
|
显示全部楼层
#ifndef _COUNT_
int __cdecl sprintf_s (
char *string,
size_t sizeInBytes,
const char *format,
...
)
{
va_list arglist;
va_start(arglist, format);
return _vsprintf_s_l(string, sizeInBytes, format, NULL, arglist);
}
int __cdecl _sprintf_s_l (
char *string,
size_t sizeInBytes,
const char *format,
_locale_t plocinfo,
...
)
{
va_list arglist;
va_start(arglist, plocinfo);
return _vsprintf_s_l(string, sizeInBytes, format, plocinfo, arglist);
}
int __cdecl _snprintf_s (
char *string,
size_t sizeInBytes,
size_t count,
const char *format,
...
)
{
va_list arglist;
va_start(arglist, format);
return _vsnprintf_s_l(string, sizeInBytes, count, format, NULL, arglist);
}
int __cdecl _snprintf_s_l (
char *string,
size_t sizeInBytes,
size_t count,
const char *format,
_locale_t plocinfo,
...
)
{
va_list arglist;
va_start(arglist, plocinfo);
return _vsnprintf_s_l(string, sizeInBytes, count, format, plocinfo, arglist);
}
int __cdecl _sprintf_p (
char *string,
size_t count,
const char *format,
...
)
{
va_list arglist;
va_start(arglist, format);
return _vsprintf_p_l(string, count, format, NULL, arglist);
}
int __cdecl _sprintf_p_l (
char *string,
size_t count,
const char *format,
_locale_t plocinfo,
...
)
{
va_list arglist;
va_start(arglist, plocinfo);
return _vsprintf_p_l(string, count, format, plocinfo, arglist);
}
#endif /* _COUNT_ */
/***
* _scprintf() - counts the number of character needed to print the formatted
* data
*
*Purpose:
* Counts the number of characters in the fotmatted data.
*
*Entry:
* char *format - format string to control data format/number
* of arguments followed by list of arguments, number and type
* controlled by format string
*
*Exit:
* returns number of characters needed to print formatted data.
*
*Exceptions:
*
*******************************************************************************/
#ifndef _COUNT_
int __cdecl _scprintf (
const char *format,
...
)
{
va_list arglist;
va_start(arglist, format);
return _vscprintf(format, arglist);
}
int __cdecl _scprintf_p (
const char *format,
...
)
{
va_list arglist;
va_start(arglist, format);
return _vscprintf_p(format, arglist);
}
int __cdecl _scprintf_l (
const char *format,
_locale_t plocinfo,
...
)
{
va_list arglist;
va_start(arglist, plocinfo);
return _vscprintf_l(format, plocinfo, arglist);
}
int __cdecl _scprintf_p_l (
const char *format,
_locale_t plocinfo,
...
)
{
va_list arglist;
va_start(arglist, plocinfo);
return _vscprintf_p_l(format, plocinfo, arglist);
}
#endif /* _COUNT_ */
|
|