mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:22:58 +00:00
[REACTOS] Use standard conforming names
- Use _alloca instead of non-standard alloca - Use _TCHAR instead of non-standard TCHAR - Use _off_t instead of deprecated off_t - Use _O_BINARY instead of O_BINARY
This commit is contained in:
parent
1de09c477c
commit
b707be90a1
10 changed files with 41 additions and 40 deletions
|
@ -22,7 +22,7 @@
|
|||
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
int __cdecl _tstreamout(FILE *stream, const TCHAR *format, va_list argptr);
|
||||
int __cdecl _tstreamout(FILE *stream, const _TCHAR *format, va_list argptr);
|
||||
|
||||
int
|
||||
#if defined(USER32_WSPRINTF) && defined(_M_IX86)
|
||||
|
@ -31,14 +31,14 @@ __stdcall
|
|||
__cdecl
|
||||
#endif
|
||||
_sxprintf(
|
||||
TCHAR *buffer,
|
||||
_TCHAR *buffer,
|
||||
#if IS_SECAPI
|
||||
size_t sizeOfBuffer,
|
||||
#endif
|
||||
#if USE_COUNT
|
||||
size_t count,
|
||||
#endif
|
||||
const TCHAR *format,
|
||||
const _TCHAR *format,
|
||||
#if USE_VARARGS
|
||||
va_list argptr)
|
||||
#else
|
||||
|
@ -74,7 +74,7 @@ _sxprintf(
|
|||
stream._base = (char*)buffer;
|
||||
stream._ptr = stream._base;
|
||||
stream._charbuf = 0;
|
||||
stream._cnt = (int)(sizeOfBuffer * sizeof(TCHAR));
|
||||
stream._cnt = (int)(sizeOfBuffer * sizeof(_TCHAR));
|
||||
stream._bufsiz = 0;
|
||||
stream._flag = _IOSTRG | _IOWRT;
|
||||
stream._tmpfname = 0;
|
||||
|
@ -112,8 +112,8 @@ _sxprintf(
|
|||
buffer[result] = _T('\0');
|
||||
#else
|
||||
/* Only zero terminate if there is enough space left */
|
||||
if ((stream._cnt >= sizeof(TCHAR)) && (stream._ptr))
|
||||
*(TCHAR*)stream._ptr = _T('\0');
|
||||
if ((stream._cnt >= sizeof(_TCHAR)) && (stream._ptr))
|
||||
*(_TCHAR*)stream._ptr = _T('\0');
|
||||
#endif
|
||||
|
||||
return result;
|
||||
|
|
|
@ -80,18 +80,18 @@ void
|
|||
__declspec(noinline)
|
||||
#endif
|
||||
format_float(
|
||||
TCHAR chr,
|
||||
_TCHAR chr,
|
||||
unsigned int flags,
|
||||
int precision,
|
||||
TCHAR **string,
|
||||
const TCHAR **prefix,
|
||||
_TCHAR **string,
|
||||
const _TCHAR **prefix,
|
||||
va_list *argptr)
|
||||
{
|
||||
static const TCHAR digits_l[] = _T("0123456789abcdef0x");
|
||||
static const TCHAR digits_u[] = _T("0123456789ABCDEF0X");
|
||||
static const TCHAR _nan[] = _T("#QNAN");
|
||||
static const TCHAR _infinity[] = _T("#INF");
|
||||
const TCHAR *digits = digits_l;
|
||||
static const _TCHAR digits_l[] = _T("0123456789abcdef0x");
|
||||
static const _TCHAR digits_u[] = _T("0123456789ABCDEF0X");
|
||||
static const _TCHAR _nan[] = _T("#QNAN");
|
||||
static const _TCHAR _infinity[] = _T("#INF");
|
||||
const _TCHAR *digits = digits_l;
|
||||
int exponent = 0, sign;
|
||||
long double fpval, fpval2;
|
||||
int padding = 0, num_digits, val32, base = 10;
|
||||
|
@ -186,13 +186,13 @@ format_float(
|
|||
/* Handle special cases first */
|
||||
if (_isnan(fpval))
|
||||
{
|
||||
(*string) -= sizeof(_nan) / sizeof(TCHAR) - 1;
|
||||
(*string) -= sizeof(_nan) / sizeof(_TCHAR) - 1;
|
||||
_tcscpy((*string), _nan);
|
||||
fpval2 = 1;
|
||||
}
|
||||
else if (!_finite(fpval))
|
||||
{
|
||||
(*string) -= sizeof(_infinity) / sizeof(TCHAR) - 1;
|
||||
(*string) -= sizeof(_infinity) / sizeof(_TCHAR) - 1;
|
||||
_tcscpy((*string), _infinity);
|
||||
fpval2 = 1;
|
||||
}
|
||||
|
@ -234,16 +234,16 @@ streamout_char(FILE *stream, int chr)
|
|||
#endif
|
||||
#if defined(_USER32_WSPRINTF) || defined(_LIBCNT_)
|
||||
/* Check if the buffer is full */
|
||||
if (stream->_cnt < sizeof(TCHAR))
|
||||
if (stream->_cnt < sizeof(_TCHAR))
|
||||
return 0;
|
||||
|
||||
*(TCHAR*)stream->_ptr = chr;
|
||||
stream->_ptr += sizeof(TCHAR);
|
||||
stream->_cnt -= sizeof(TCHAR);
|
||||
*(_TCHAR*)stream->_ptr = chr;
|
||||
stream->_ptr += sizeof(_TCHAR);
|
||||
stream->_cnt -= sizeof(_TCHAR);
|
||||
|
||||
return 1;
|
||||
#else
|
||||
return _fputtc((TCHAR)chr, stream) != _TEOF;
|
||||
return _fputtc((_TCHAR)chr, stream) != _TEOF;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -251,7 +251,7 @@ static
|
|||
int
|
||||
streamout_astring(FILE *stream, const char *string, size_t count)
|
||||
{
|
||||
TCHAR chr;
|
||||
_TCHAR chr;
|
||||
int written = 0;
|
||||
|
||||
#if !defined(_USER32_WSPRINTF)
|
||||
|
@ -323,15 +323,15 @@ streamout_wstring(FILE *stream, const wchar_t *string, size_t count)
|
|||
|
||||
int
|
||||
__cdecl
|
||||
streamout(FILE *stream, const TCHAR *format, va_list argptr)
|
||||
streamout(FILE *stream, const _TCHAR *format, va_list argptr)
|
||||
{
|
||||
static const TCHAR digits_l[] = _T("0123456789abcdef0x");
|
||||
static const TCHAR digits_u[] = _T("0123456789ABCDEF0X");
|
||||
static const _TCHAR digits_l[] = _T("0123456789abcdef0x");
|
||||
static const _TCHAR digits_u[] = _T("0123456789ABCDEF0X");
|
||||
static const char *_nullstring = "(null)";
|
||||
TCHAR buffer[BUFFER_SIZE + 1];
|
||||
TCHAR chr, *string;
|
||||
_TCHAR buffer[BUFFER_SIZE + 1];
|
||||
_TCHAR chr, *string;
|
||||
STRING *nt_string;
|
||||
const TCHAR *digits, *prefix;
|
||||
const _TCHAR *digits, *prefix;
|
||||
int base, fieldwidth, precision, padding;
|
||||
size_t prefixlen, len;
|
||||
int written = 1, written_all = 0;
|
||||
|
@ -534,7 +534,7 @@ streamout(FILE *stream, const TCHAR *format, va_list argptr)
|
|||
case_string:
|
||||
if (!string)
|
||||
{
|
||||
string = (TCHAR*)_nullstring;
|
||||
string = (_TCHAR*)_nullstring;
|
||||
flags &= ~FLAG_WIDECHAR;
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ __tmainCRTStartup (void)
|
|||
/* We need to make sure that this function is build with frame-pointer
|
||||
and that we align the stack to 16 bytes for the sake of SSE ops in main
|
||||
or in functions inlined into main. */
|
||||
lpszCommandLine = (_TCHAR *) alloca (32);
|
||||
lpszCommandLine = (_TCHAR *) _alloca (32);
|
||||
memset (lpszCommandLine, 0xcc, 32);
|
||||
#ifdef __GNUC__
|
||||
asm __volatile__ ("andl $-16, %%esp" : : : "%esp");
|
||||
|
|
|
@ -464,7 +464,7 @@ _pei386_runtime_relocator (void)
|
|||
++was_init;
|
||||
#ifdef __MINGW64_VERSION_MAJOR
|
||||
mSecs = __mingw_GetSectionCount ();
|
||||
the_secs = (sSecInfo *) alloca (sizeof (sSecInfo) * (size_t) mSecs);
|
||||
the_secs = (sSecInfo *) _alloca (sizeof (sSecInfo) * (size_t) mSecs);
|
||||
maxSections = 0;
|
||||
#endif /* __MINGW64_VERSION_MAJOR */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue