mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 02:25:17 +00:00
[CRT] Reduce diff to wine by adjusting white space
This commit is contained in:
parent
d5999c6b66
commit
8fa0886fb9
3 changed files with 46 additions and 46 deletions
|
@ -651,8 +651,8 @@ DWORD CDECL cxx_frame_handler( PEXCEPTION_RECORD rec, cxx_exception_frame* frame
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
* __CxxFrameHandler (MSVCRT.@)
|
* __CxxFrameHandler (MSVCRT.@)
|
||||||
*/
|
*/
|
||||||
extern DWORD CDECL __CxxFrameHandler(PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
|
extern DWORD CDECL __CxxFrameHandler( PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
|
||||||
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch);
|
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch );
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
DWORD _declspec(naked) __CxxFrameHandler(PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
|
DWORD _declspec(naked) __CxxFrameHandler(PEXCEPTION_RECORD rec, EXCEPTION_REGISTRATION_RECORD* frame,
|
||||||
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch)
|
PCONTEXT context, EXCEPTION_REGISTRATION_RECORD** dispatch)
|
||||||
|
@ -672,25 +672,25 @@ DWORD _declspec(naked) __CxxFrameHandler(PEXCEPTION_RECORD rec, EXCEPTION_REGIST
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
__ASM_GLOBAL_FUNC(__CxxFrameHandler,
|
__ASM_GLOBAL_FUNC( __CxxFrameHandler,
|
||||||
"pushl $0\n\t" /* nested_trylevel */
|
"pushl $0\n\t" /* nested_trylevel */
|
||||||
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
||||||
"pushl $0\n\t" /* nested_frame */
|
"pushl $0\n\t" /* nested_frame */
|
||||||
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
||||||
"pushl %eax\n\t" /* descr */
|
"pushl %eax\n\t" /* descr */
|
||||||
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
||||||
"pushl 28(%esp)\n\t" /* dispatch */
|
"pushl 28(%esp)\n\t" /* dispatch */
|
||||||
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
||||||
"pushl 28(%esp)\n\t" /* context */
|
"pushl 28(%esp)\n\t" /* context */
|
||||||
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
||||||
"pushl 28(%esp)\n\t" /* frame */
|
"pushl 28(%esp)\n\t" /* frame */
|
||||||
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
||||||
"pushl 28(%esp)\n\t" /* rec */
|
"pushl 28(%esp)\n\t" /* rec */
|
||||||
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
__ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
||||||
"call " __ASM_NAME("cxx_frame_handler") "\n\t"
|
"call " __ASM_NAME("cxx_frame_handler") "\n\t"
|
||||||
"add $28,%esp\n\t"
|
"add $28,%esp\n\t"
|
||||||
__ASM_CFI(".cfi_adjust_cfa_offset -28\n\t")
|
__ASM_CFI(".cfi_adjust_cfa_offset -28\n\t")
|
||||||
"ret")
|
"ret" )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
* Other conventions
|
* Other conventions
|
||||||
* - To avoid conflicts with the standard C library,
|
* - To avoid conflicts with the standard C library,
|
||||||
* no msvcrt headers are included in the implementation.
|
* 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.
|
* MSVCRT_, as explained above.
|
||||||
* - To avoid inconsistencies, a test for each symbol is
|
* - To avoid inconsistencies, a test for each symbol is
|
||||||
* added into tests/headers.c. Please always add a
|
* added into tests/headers.c. Please always add a
|
||||||
|
|
|
@ -34,7 +34,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* How data types modifiers are stored:
|
/* 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', 'C' and 'D' as follows
|
||||||
* {<A>}: ""
|
* {<A>}: ""
|
||||||
* {<B>}: "const "
|
* {<B>}: "const "
|
||||||
|
@ -48,7 +48,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(msvcrt);
|
||||||
* in data fields:
|
* in data fields:
|
||||||
* same as for arguments and also the following
|
* same as for arguments and also the following
|
||||||
* ?<M>x {<M>}x
|
* ?<M>x {<M>}x
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct array
|
struct array
|
||||||
|
@ -110,7 +110,7 @@ static void* und_alloc(struct parsed_symbol* sym, unsigned int len)
|
||||||
sym->avail_in_first = 0;
|
sym->avail_in_first = 0;
|
||||||
ptr = (char*)sym->alloc_list + sizeof(void*);
|
ptr = (char*)sym->alloc_list + sizeof(void*);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (len > sym->avail_in_first)
|
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);
|
a->elts[a->num] = und_alloc(sym, len + 1);
|
||||||
assert(a->elts[a->num]);
|
assert(a->elts[a->num]);
|
||||||
memcpy(a->elts[a->num], ptr, len);
|
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;
|
if (++a->num >= a->max) a->max = a->num;
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -217,18 +217,18 @@ static char* str_array_get_ref(struct array* cref, unsigned idx)
|
||||||
assert(cref);
|
assert(cref);
|
||||||
if (cref->start + idx >= cref->max)
|
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);
|
cref, cref->start, idx, cref->max);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
TRACE("Returning %p[%d] => %s\n",
|
TRACE("Returning %p[%d] => %s\n",
|
||||||
cref, idx, debugstr_a(cref->elts[cref->start + idx]));
|
cref, idx, debugstr_a(cref->elts[cref->start + idx]));
|
||||||
return cref->elts[cref->start + idx];
|
return cref->elts[cref->start + idx];
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* str_printf
|
* 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
|
* while dynamically allocating the buffer
|
||||||
*/
|
*/
|
||||||
static char* str_printf(struct parsed_symbol* sym, const char* format, ...)
|
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
|
* Parses a list of function/method arguments, creates a string corresponding
|
||||||
* to the arguments' list.
|
* 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)
|
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 (z_term && *sym->current++ != 'Z') return NULL;
|
||||||
|
|
||||||
if (arg_collect.num == 0 ||
|
if (arg_collect.num == 0 ||
|
||||||
(arg_collect.num == 1 && !strcmp(arg_collect.elts[0], "void")))
|
(arg_collect.num == 1 && !strcmp(arg_collect.elts[0], "void")))
|
||||||
return str_printf(sym, "%cvoid%c", open_char, close_char);
|
return str_printf(sym, "%cvoid%c", open_char, close_char);
|
||||||
for (i = 1; i < arg_collect.num; i++)
|
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];
|
last = args_str ? args_str : arg_collect.elts[0];
|
||||||
if (close_char == '>' && last[strlen(last) - 1] == '>')
|
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);
|
open_char, arg_collect.elts[0], args_str, close_char);
|
||||||
else
|
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);
|
open_char, arg_collect.elts[0], args_str, close_char);
|
||||||
|
|
||||||
return args_str;
|
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)
|
static const char* get_simple_type(char c)
|
||||||
{
|
{
|
||||||
const char* type_string;
|
const char* type_string;
|
||||||
|
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'C': type_string = "signed char"; break;
|
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)
|
static const char* get_extended_type(char c)
|
||||||
{
|
{
|
||||||
const char* type_string;
|
const char* type_string;
|
||||||
|
|
||||||
switch (c)
|
switch (c)
|
||||||
{
|
{
|
||||||
case 'D': type_string = "__int8"; break;
|
case 'D': type_string = "__int8"; break;
|
||||||
|
@ -794,7 +794,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
|
||||||
|
|
||||||
assert(ct);
|
assert(ct);
|
||||||
ct->left = ct->right = NULL;
|
ct->left = ct->right = NULL;
|
||||||
|
|
||||||
switch (dt = *sym->current++)
|
switch (dt = *sym->current++)
|
||||||
{
|
{
|
||||||
case '_':
|
case '_':
|
||||||
|
@ -819,7 +819,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
|
||||||
|
|
||||||
if (!(struct_name = get_class_name(sym)))
|
if (!(struct_name = get_class_name(sym)))
|
||||||
goto done;
|
goto done;
|
||||||
if (!(sym->flags & UNDNAME_NO_COMPLEX_TYPE))
|
if (!(sym->flags & UNDNAME_NO_COMPLEX_TYPE))
|
||||||
{
|
{
|
||||||
switch (dt)
|
switch (dt)
|
||||||
{
|
{
|
||||||
|
@ -908,7 +908,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
|
||||||
sym->current++;
|
sym->current++;
|
||||||
|
|
||||||
if (!get_calling_convention(*sym->current++,
|
if (!get_calling_convention(*sym->current++,
|
||||||
&call_conv, &exported,
|
&call_conv, &exported,
|
||||||
sym->flags & ~UNDNAME_NO_ALLOCATION_LANGUAGE) ||
|
sym->flags & ~UNDNAME_NO_ALLOCATION_LANGUAGE) ||
|
||||||
!demangle_datatype(sym, &sub_ct, pmt_ref, FALSE))
|
!demangle_datatype(sym, &sub_ct, pmt_ref, FALSE))
|
||||||
goto done;
|
goto done;
|
||||||
|
@ -917,7 +917,7 @@ static BOOL demangle_datatype(struct parsed_symbol* sym, struct datatype_t* ct,
|
||||||
if (!args) goto done;
|
if (!args) goto done;
|
||||||
sym->stack.num = mark;
|
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);
|
sub_ct.left, sub_ct.right, call_conv);
|
||||||
ct->right = str_printf(sym, ")%s", args);
|
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;
|
return FALSE;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
|
|
||||||
return ct->left != NULL;
|
return ct->left != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1081,7 +1081,7 @@ static BOOL handle_data(struct parsed_symbol* sym)
|
||||||
case '0': access = "private: "; break;
|
case '0': access = "private: "; break;
|
||||||
case '1': access = "protected: "; break;
|
case '1': access = "protected: "; break;
|
||||||
case '2': access = "public: "; break;
|
case '2': access = "public: "; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(sym->flags & UNDNAME_NO_MEMBER_TYPE))
|
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;
|
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,
|
sym->result = str_printf(sym, "%s%s%s%s%s%s%s%s", access,
|
||||||
member_type, ct.left,
|
member_type, ct.left,
|
||||||
modifier && ct.left ? " " : NULL, modifier,
|
modifier && ct.left ? " " : NULL, modifier,
|
||||||
modifier || ct.left ? " " : NULL, name, ct.right);
|
modifier || ct.left ? " " : NULL, name, ct.right);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
done:
|
done:
|
||||||
|
@ -1604,7 +1604,7 @@ char* CDECL __unDNameEx(char* buffer, const char* mangled, int buflen,
|
||||||
|
|
||||||
TRACE("(%p,%s,%d,%p,%p,%p,%x)\n",
|
TRACE("(%p,%s,%d,%p,%p,%p,%x)\n",
|
||||||
buffer, debugstr_a(mangled), buflen, memget, memfree, unknown, flags);
|
buffer, debugstr_a(mangled), buflen, memget, memfree, unknown, flags);
|
||||||
|
|
||||||
/* The flags details is not documented by MS. However, it looks exactly
|
/* The flags details is not documented by MS. However, it looks exactly
|
||||||
* like the UNDNAME_ manifest constants from imagehlp.h and dbghelp.h
|
* like the UNDNAME_ manifest constants from imagehlp.h and dbghelp.h
|
||||||
* So, we copied those (on top of the file)
|
* So, we copied those (on top of the file)
|
||||||
|
|
Loading…
Reference in a new issue