[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces

This commit is contained in:
Victor Perevertkin 2021-06-11 15:29:21 +03:00
parent 4b4ffa92f5
commit 34593d933b
No known key found for this signature in database
GPG key ID: C750B7222E9C7830
952 changed files with 12942 additions and 12942 deletions

View file

@ -5,8 +5,8 @@ extern void * __pInvalidArgHandler;
void _invalid_parameter(
const wchar_t * expression,
const wchar_t * function,
const wchar_t * file,
const wchar_t * function,
const wchar_t * file,
unsigned int line,
uintptr_t pReserved);

View file

@ -26,7 +26,7 @@
* Other conventions
* - To avoid conflicts with the standard C library,
* no msvcrt headers are included in the implementation.
* - Instead, symbols are duplicated here, prefixed with
* - Instead, symbols are duplicated here, prefixed with
* MSVCRT_, as explained above.
* - To avoid inconsistencies, a test for each symbol is
* added into tests/headers.c. Please always add a

View file

@ -3,7 +3,7 @@
* Public domain.
*
* Changes for long double by Ulrich Drepper <drepper@cygnus.com>
*
*
* Removed header file dependency for use in libmingwex.a by
* Danny Smith <dannysmith@users.sourceforge.net>
*/

View file

@ -3,7 +3,7 @@
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/mbstring/ismbaln.c
* PURPOSE:
* PROGRAMER:
* PROGRAMER:
* UPDATE HISTORY:
* 05/30/08: Samuel Serapion adapted from PROJECT C Library
*

View file

@ -3,7 +3,7 @@
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/mbstring/ismbc.c
* PURPOSE:
* PROGRAMER:
* PROGRAMER:
* UPDATE HISTORY:
* 05/30/08: Samuel Serapion adapted from PROJECT C Library
*

View file

@ -3,7 +3,7 @@
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/mbstring/ismbpun.c
* PURPOSE:
* PROGRAMER:
* PROGRAMER:
* UPDATE HISTORY:
* 05/30/08: Samuel Serapion adapted from PROJECT C Library
*

View file

@ -3,7 +3,7 @@
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/mbstring/mbbtype.c
* PURPOSE: Determines the type of a multibyte character
* PROGRAMERS:
* PROGRAMERS:
* Copyright 1999 Ariadne
* Copyright 1999 Alexandre Julliard
* Copyright 2000 Jon Griffths

View file

@ -3,7 +3,7 @@
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/mbstring/mbscspn.c
* PURPOSE:
* PROGRAMER:
* PROGRAMER:
* UPDATE HISTORY:
* 05/30/08: Samuel Serapion adapted from PROJECT C Library
*

View file

@ -38,13 +38,13 @@ unsigned char * _mbslwr(unsigned char *x)
return NULL;
}
while (*y)
while (*y)
{
if (!_ismbblead(*y))
if (!_ismbblead(*y))
{
*y = tolower(*y);
y++;
}
}
else
{
*y = _mbctolower(*(unsigned short *)y);

View file

@ -2,8 +2,8 @@
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/mbstring/mbsninc.c
* PURPOSE:
* PROGRAMERS:
* PURPOSE:
* PROGRAMERS:
* Copyright 1999 Alexandre Julliard
* Copyright 2000 Jon Griffths
*

View file

@ -3,7 +3,7 @@
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/mbstring/mbsspn.c
* PURPOSE:
* PROGRAMER:
* PROGRAMER:
* UPDATE HISTORY:
* 05/30/08: Samuel Serapion adapted from PROJECT C Library
*

View file

@ -32,7 +32,7 @@ static int _CrtModeOutputFormat[_CRT_ERRCNT] =
_CRTDBG_MODE_WNDW,
};
// Caption per type
static const wchar_t* _CrtModeMessages[_CRT_ERRCNT] =
static const wchar_t* _CrtModeMessages[_CRT_ERRCNT] =
{
L"Warning",
L"Error",

View file

@ -215,7 +215,7 @@ void __getmainargs(int* argc, char*** argv, char*** env, int expand_wildcards, i
if (i >= len || ((_acmdln[i] == ' ' || _acmdln[i] == '\t') && !inQuotes))
{
// Handle the case when empty spaces are in the end of the cmdline
if (anyLetter)
if (anyLetter)
{
aexpand(strndup(buffer, bufferIndex), doexpand);
}

View file

@ -1,4 +1,4 @@
/*
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS system libraries
* FILE: lib/sdk/crt/process/_system.c

View file

@ -56,7 +56,7 @@ __mingw_init_ehandler (void)
size_t e = 0;
PIMAGE_SECTION_HEADER pSec;
PBYTE _ImageBase = _GetPEImageBase ();
if (was_here || !_ImageBase)
return was_here;
was_here = 1;
@ -66,7 +66,7 @@ __mingw_init_ehandler (void)
/* Allocate # of e tables and entries. */
memset (emu_pdata, 0, sizeof (RUNTIME_FUNCTION) * MAX_PDATA_ENTRIES);
memset (emu_xdata, 0, sizeof (UNWIND_INFO) * MAX_PDATA_ENTRIES);
e = 0;
/* Fill tables and entries. */
while (e < MAX_PDATA_ENTRIES && (pSec = _FindPESectionExec (e)) != NULL)

View file

@ -69,7 +69,7 @@ _matherr (struct _exception *pexcept)
break;
}
__mingw_fprintf (stderr, "_matherr(): %s in %s(%g, %g) (retval=%g)\n",
__mingw_fprintf (stderr, "_matherr(): %s in %s(%g, %g) (retval=%g)\n",
type, pexcept->name, pexcept->arg1, pexcept->arg2, pexcept->retval);
return 0;
}

View file

@ -205,7 +205,7 @@ __mingw_enum_import_library_names (int i)
return NULL;
pNTHeader = (PIMAGE_NT_HEADERS) (pImageBase + ((PIMAGE_DOS_HEADER) pImageBase)->e_lfanew);
importsStartRVA = pNTHeader->OptionalHeader.DataDirectory[IMAGE_DIRECTORY_ENTRY_IMPORT].VirtualAddress;
if (!importsStartRVA)
return NULL;
@ -217,7 +217,7 @@ __mingw_enum_import_library_names (int i)
importDesc = (PIMAGE_IMPORT_DESCRIPTOR) (pImageBase + importsStartRVA);
if (!importDesc)
return NULL;
for (;;)
{
if (importDesc->TimeDateStamp == 0 && importDesc->Name == 0)

View file

@ -10,4 +10,4 @@
/* Is this correct? Default value of _fmode in msvcrt.dll is 0. */
int _fmode = _O_TEXT;
int _fmode = _O_TEXT;

View file

@ -39,7 +39,7 @@ void exit(int exitcode)
#endif
WARN("exit(%d) called\n",exitcode);
_cexit();
#if 0
#if 0
hmscoree = GetModuleHandleW(mscoreeW);
if (hmscoree)

View file

@ -19,7 +19,7 @@ _ecvt (double value, int ndigits, int *decpt, int *sign)
char *cvtbuf, *s, *d;
if (ndigits < 0) ndigits = 0;
s = cvtbuf = (char*)malloc(ndigits + NUMBER_EFMT);
s = cvtbuf = (char*)malloc(ndigits + NUMBER_EFMT);
d = ecvtbuf;
*sign = 0;
@ -40,7 +40,7 @@ _ecvt (double value, int ndigits, int *decpt, int *sign)
{
memcpy(ecvtbuf, s, 5);
}
else
else
{
/* Set the sign */
if (*s && *s == '-')

View file

@ -611,7 +611,7 @@ int __cdecl _isctype_l(int c, int type, _locale_t locale)
}
int __cdecl _isctype (int c, int ctypeFlags)
{
{
return _isctype_l(c, ctypeFlags, NULL);
}

View file

@ -29,7 +29,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <precomp.h>

View file

@ -104,7 +104,7 @@ __int64 CDECL _wcstoi64_l(const wchar_t *nptr,
ret = _I64_MIN;
#ifndef _LIBCNT_
*_errno() = ERANGE;
#endif
#endif
} else
ret = ret*base + v;
}

View file

@ -16,11 +16,11 @@
static const _TCHAR wday_name[DAYSPERWEEK][5] =
{
_T("Sun "), _T("Mon "), _T("Tue "), _T("Wed "),
_T("Sun "), _T("Mon "), _T("Tue "), _T("Wed "),
_T("Thu "), _T("Fri "), _T("Sat ")
};
static const _TCHAR mon_name[MONSPERYEAR][5] =
static const _TCHAR mon_name[MONSPERYEAR][5] =
{
_T("Jan "), _T("Feb "), _T("Mar "), _T("Apr "), _T("May "), _T("Jun "),
_T("Jul "), _T("Aug "), _T("Sep "), _T("Oct "), _T("Nov "), _T("Dec ")
@ -77,7 +77,7 @@ static __inline
void
FillBuf(timebuf_t *buf, const struct tm *ptm)
{
/* Format looks like this:
/* Format looks like this:
* "Sun Mar 01 12:34:56 1902\n\0" */
buf->WeekDay = *(_TCHAR4*)wday_name[ptm->tm_wday];
buf->Month = *(_TCHAR4*)mon_name[ptm->tm_mon];
@ -102,8 +102,8 @@ FillBuf(timebuf_t *buf, const struct tm *ptm)
* \param numberOfElements Size of the buffer in characters.
* \param time Pointer to the UTC time.
*/
errno_t
_tasctime_s(
errno_t
_tasctime_s(
_TCHAR* buffer,
size_t numberOfElements,
const struct tm *ptm)

View file

@ -23,9 +23,9 @@ localtime_s(struct tm* _tm, const time_t *ptime)
{
if(_tm) memset(_tm, 0xFF, sizeof(struct tm));
_invalid_parameter(NULL,
0,//__FUNCTION__,
_CRT_WIDE(__FILE__),
__LINE__,
0,//__FUNCTION__,
_CRT_WIDE(__FILE__),
__LINE__,
0);
_set_errno(EINVAL);
return EINVAL;

View file

@ -16,7 +16,7 @@ char* _strtime(char* time)
{
static const char format[] = "HH':'mm':'ss";
GetTimeFormatA(LOCALE_NEUTRAL, 0, NULL, format, time, 9);
GetTimeFormatA(LOCALE_NEUTRAL, 0, NULL, format, time, 9);
return time;
}

View file

@ -2,8 +2,8 @@
* COPYRIGHT: LGPL, See LGPL.txt in the top level directory
* PROJECT: ReactOS CRT library
* FILE: lib/sdk/crt/time/time32.c
* PURPOSE:
* PROGRAMER:
* PURPOSE:
* PROGRAMER:
*/
#define _USE_EXPLICIT_32BIT_TIME

View file

@ -2,8 +2,8 @@
* COPYRIGHT: LGPL, See LGPL.txt in the top level directory
* PROJECT: ReactOS CRT library
* FILE: lib/sdk/crt/time/time64.c
* PURPOSE:
* PROGRAMER:
* PURPOSE:
* PROGRAMER:
*/
#define _USE_EXPLICIT_64BIT_TIME

View file

@ -26,7 +26,7 @@
* Other conventions
* - To avoid conflicts with the standard C library,
* no msvcrt headers are included in the implementation.
* - Instead, symbols are duplicated here, prefixed with
* - Instead, symbols are duplicated here, prefixed with
* MSVCRT_, as explained above.
* - To avoid inconsistencies, a test for each symbol is
* added into tests/headers.c. Please always add a

View file

@ -34,7 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
*/
/* How data types modifiers are stored:
* M (in the following definitions) is defined for
* M (in the following definitions) is defined for
* 'A', 'B', 'C' and 'D' as follows
* {<A>}: ""
* {<B>}: "const "
@ -48,7 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
* in data fields:
* same as for arguments and also the following
* ?<M>x {<M>}x
*
*
*/
struct array
@ -110,7 +110,7 @@ static void* und_alloc(struct parsed_symbol* sym, unsigned int len)
sym->avail_in_first = 0;
ptr = (char*)sym->alloc_list + sizeof(void*);
}
else
else
{
if (len > sym->avail_in_first)
{
@ -188,7 +188,7 @@ static BOOL str_array_push(struct parsed_symbol* sym, const char* ptr, int len,
a->elts[a->num] = und_alloc(sym, len + 1);
assert(a->elts[a->num]);
memcpy(a->elts[a->num], ptr, len);
a->elts[a->num][len] = '\0';
a->elts[a->num][len] = '\0';
if (++a->num >= a->max) a->max = a->num;
{
int i;
@ -217,18 +217,18 @@ static char* str_array_get_ref(struct array* cref, unsigned idx)
assert(cref);
if (cref->start + idx >= cref->max)
{
WARN("Out of bounds: %p %d + %d >= %d\n",
WARN("Out of bounds: %p %d + %d >= %d\n",
cref, cref->start, idx, cref->max);
return NULL;
}
TRACE("Returning %p[%d] => %s\n",
TRACE("Returning %p[%d] => %s\n",
cref, idx, debugstr_a(cref->elts[cref->start + idx]));
return cref->elts[cref->start + idx];
}
/******************************************************************
* str_printf
* Helper for printf type of command (only %s and %c are implemented)
* Helper for printf type of command (only %s and %c are implemented)
* while dynamically allocating the buffer
*/
static char* str_printf(struct parsed_symbol* sym, const char* format, ...)
@ -341,7 +341,7 @@ static const char* get_number(struct parsed_symbol* sym)
* Parses a list of function/method arguments, creates a string corresponding
* to the arguments' list.
*/
static char* get_args(struct parsed_symbol* sym, struct array* pmt_ref, BOOL z_term,
static char* get_args(struct parsed_symbol* sym, struct array* pmt_ref, BOOL z_term,
char open_char, char close_char)
{
@ -376,8 +376,8 @@ static char* get_args(struct parsed_symbol* sym, struct array* pmt_ref, BOOL z_t
*/
if (z_term && *sym->current++ != 'Z') return NULL;
if (arg_collect.num == 0 ||
(arg_collect.num == 1 && !strcmp(arg_collect.elts[0], "void")))
if (arg_collect.num == 0 ||
(arg_collect.num == 1 && !strcmp(arg_collect.elts[0], "void")))
return str_printf(sym, "%cvoid%c", open_char, close_char);
for (i = 1; i < arg_collect.num; i++)
{
@ -386,12 +386,12 @@ static char* get_args(struct parsed_symbol* sym, struct array* pmt_ref, BOOL z_t
last = args_str ? args_str : arg_collect.elts[0];
if (close_char == '>' && last[strlen(last) - 1] == '>')
args_str = str_printf(sym, "%c%s%s %c",
args_str = str_printf(sym, "%c%s%s %c",
open_char, arg_collect.elts[0], args_str, close_char);
else
args_str = str_printf(sym, "%c%s%s%c",
args_str = str_printf(sym, "%c%s%s%c",
open_char, arg_collect.elts[0], args_str, close_char);
return args_str;
}
@ -730,7 +730,7 @@ static BOOL get_calling_convention(char ch, const char** call_conv,
static const char* get_simple_type(char c)
{
const char* type_string;
switch (c)
{
case 'C': type_string = "signed char"; break;
@ -759,7 +759,7 @@ static const char* get_simple_type(char c)
static const char* get_extended_type(char c)
{
const char* type_string;
switch (c)
{
case 'D': type_string = "__int8"; break;
@ -794,7 +794,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
assert(ct);
ct->left = ct->right = NULL;
switch (dt = *sym->current++)
{
case '_':
@ -819,7 +819,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
if (!(struct_name = get_class_name(sym)))
goto done;
if (!(sym->flags & UNDNAME_NO_COMPLEX_TYPE))
if (!(sym->flags & UNDNAME_NO_COMPLEX_TYPE))
{
switch (dt)
{
@ -908,7 +908,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
sym->current++;
if (!get_calling_convention(*sym->current++,
&call_conv, &exported,
&call_conv, &exported,
sym->flags & ~UNDNAME_NO_ALLOCATION_LANGUAGE) ||
!demangle_datatype(sym, &sub_ct, pmt_ref, FALSE))
goto done;
@ -917,7 +917,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
if (!args) goto done;
sym->stack.num = mark;
ct->left = str_printf(sym, "%s%s (%s*",
ct->left = str_printf(sym, "%s%s (%s*",
sub_ct.left, sub_ct.right, call_conv);
ct->right = str_printf(sym, ")%s", args);
}
@ -1044,7 +1044,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
return FALSE;
}
done:
return ct->left != NULL;
}
@ -1081,7 +1081,7 @@ static BOOL handle_data(struct parsed_symbol* sym)
case '0': access = "private: "; break;
case '1': access = "protected: "; break;
case '2': access = "public: "; break;
}
}
}
if (!(sym->flags & UNDNAME_NO_MEMBER_TYPE))
@ -1131,8 +1131,8 @@ static BOOL handle_data(struct parsed_symbol* sym)
if (sym->flags & UNDNAME_NAME_ONLY) ct.left = ct.right = modifier = NULL;
sym->result = str_printf(sym, "%s%s%s%s%s%s%s%s", access,
member_type, ct.left,
modifier && ct.left ? " " : NULL, modifier,
member_type, ct.left,
modifier && ct.left ? " " : NULL, modifier,
modifier || ct.left ? " " : NULL, name, ct.right);
ret = TRUE;
done:
@ -1604,7 +1604,7 @@ char* CDECL __unDNameEx(char* buffer, const char* mangled, int buflen,
TRACE("(%p,%s,%d,%p,%p,%p,%x)\n",
buffer, debugstr_a(mangled), buflen, memget, memfree, unknown, flags);
/* The flags details is not documented by MS. However, it looks exactly
* like the UNDNAME_ manifest constants from imagehlp.h and dbghelp.h
* So, we copied those (on top of the file)