Convert libiberty to use ISO C prototype style 3/n
Gabriel Dos Reis
gdr@integrable-solutions.net
Sun Mar 27 06:09:00 GMT 2005
this third converts a few more of libiberty. Like previous patches,
it has been bootstrapped on an i686-pc-linux-gnu.
(Side note: I'm amazed at how many demanglers there are out there in
libiberty. Do we need all of those?)
-- Gaby
2005-03-27 Gabriel Dos Reis <gdr@integrable-solutions.net>
Convert libiberty to use ISO C prototype style 3/n.
* cplus-dem.c (set_cplus_marker_for_demangling, consume_count,
consume_count_with_underscores, code_for_qualifier,
qualifier_string, demangle_qualifier, cplus_demangle_opname,
cplus_mangle_opname, cplus_demangle_set_style,
cplus_demangle_name_to_style, cplus_demangle, grow_vect,
ada_demangle, internal_cplus_demangle, squangle_mop_up,
work_stuff_copy_to_from, delete_non_B_K_work_stuff,
delete_work_stuff, mop_up, demangle_signature,
demangle_method_args, demangle_template_template_parm,
demangle_expression, demangle_integral_value,
demangle_real_value, demangle_template_value_parm,
demangle_template, arm_pt, demangle_arm_hp_template,
demangle_class_name, demangle_class, iterate_demangle_function,
demangle_prefix, gnu_special, recursively_demangle, arm_special,
demangle_qualified, get_count, do_type, demangle_fund_type,
do_hpacc_template_const_value, do_hpacc_template_literal,
snarf_numeric_literal, do_arg, remember_type, remember_Ktype,
register_Btype, remember_Btype, forget_B_and_K_types,
forget_types, demangle_args, demangle_nested_args,
demangle_function_name, string_need, string_delete, string_init,
string_clear, string_empty, string_append, string_appends,
string_appendn, string_prepend, string_prepends, string_prependn,
string_append_template_idx): Use ISO C prootype style.
* cp-demint.c (cplus_demangle_fill_component,
cplus_demangle_fill_builtin_type, cplus_demangle_fill_operator,
cplus_demangle_v3_components): Likewise.
Index: libiberty/cp-demint.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/cp-demint.c,v
retrieving revision 1.2
diff -p -r1.2 cp-demint.c
*** libiberty/cp-demint.c 13 Jan 2004 21:35:12 -0000 1.2
--- libiberty/cp-demint.c 27 Mar 2005 04:52:04 -0000
***************
*** 56,66 ****
/* Fill in most component types. */
int
! cplus_demangle_fill_component (p, type, left, right)
! struct demangle_component *p;
! enum demangle_component_type type;
! struct demangle_component *left;
! struct demangle_component *right;
{
if (p == NULL)
return 0;
--- 56,65 ----
/* Fill in most component types. */
int
! cplus_demangle_fill_component (struct demangle_component *p,
! enum demangle_component_type type,
! struct demangle_component *left,
! struct demangle_component *right)
{
if (p == NULL)
return 0;
*************** cplus_demangle_fill_component (p, type,
*** 130,138 ****
/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE. */
int
! cplus_demangle_fill_builtin_type (p, typename)
! struct demangle_component *p;
! const char *typename;
{
int len;
unsigned int i;
--- 129,136 ----
/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE. */
int
! cplus_demangle_fill_builtin_type (struct demangle_component *p,
! const char *typename)
{
int len;
unsigned int i;
*************** cplus_demangle_fill_builtin_type (p, typ
*** 156,165 ****
/* Fill in a DEMANGLE_COMPONENT_OPERATOR. */
int
! cplus_demangle_fill_operator (p, opname, args)
! struct demangle_component *p;
! const char *opname;
! int args;
{
int len;
unsigned int i;
--- 154,161 ----
/* Fill in a DEMANGLE_COMPONENT_OPERATOR. */
int
! cplus_demangle_fill_operator (struct demangle_component *p,
! const char *opname, int args)
{
int len;
unsigned int i;
*************** cplus_demangle_fill_operator (p, opname,
*** 184,193 ****
/* Translate a mangled name into components. */
struct demangle_component *
! cplus_demangle_v3_components (mangled, options, mem)
! const char *mangled;
! int options;
! void **mem;
{
size_t len;
int type;
--- 180,186 ----
/* Translate a mangled name into components. */
struct demangle_component *
! cplus_demangle_v3_components (const char *mangled, int options, void **mem)
{
size_t len;
int type;
Index: libiberty/cplus-dem.c
===================================================================
RCS file: /cvs/gcc/gcc/libiberty/cplus-dem.c,v
retrieving revision 1.96
diff -p -r1.96 cplus-dem.c
*** libiberty/cplus-dem.c 24 Nov 2004 02:19:10 -0000 1.96
--- libiberty/cplus-dem.c 27 Mar 2005 04:52:06 -0000
*************** char * realloc ();
*** 62,68 ****
#include "libiberty.h"
! static char *ada_demangle PARAMS ((const char *, int));
#define min(X,Y) (((X) < (Y)) ? (X) : (Y))
--- 62,68 ----
#include "libiberty.h"
! static char *ada_demangle (const char *, int);
#define min(X,Y) (((X) < (Y)) ? (X) : (Y))
*************** static char *ada_demangle PARAMS ((cons
*** 70,76 ****
that will be output when using the `%d' format with `printf'. */
#define INTBUF_SIZE 32
! extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
/* In order to allow a single demangler executable to demangle strings
using various common values of CPLUS_MARKER, as well as any specific
--- 70,76 ----
that will be output when using the `%d' format with `printf'. */
#define INTBUF_SIZE 32
! extern void fancy_abort (void) ATTRIBUTE_NORETURN;
/* In order to allow a single demangler executable to demangle strings
using various common values of CPLUS_MARKER, as well as any specific
*************** static char cplus_markers[] = { CPLUS_MA
*** 99,106 ****
static char char_str[2] = { '\000', '\000' };
void
! set_cplus_marker_for_demangling (ch)
! int ch;
{
cplus_markers[0] = ch;
}
--- 99,105 ----
static char char_str[2] = { '\000', '\000' };
void
! set_cplus_marker_for_demangling (int ch)
{
cplus_markers[0] = ch;
}
*************** const struct demangler_engine libiberty_
*** 327,489 ****
/* Prototypes for local functions */
! static void
! delete_work_stuff PARAMS ((struct work_stuff *));
! static void
! delete_non_B_K_work_stuff PARAMS ((struct work_stuff *));
! static char *
! mop_up PARAMS ((struct work_stuff *, string *, int));
! static void
! squangle_mop_up PARAMS ((struct work_stuff *));
! static void
! work_stuff_copy_to_from PARAMS ((struct work_stuff *, struct work_stuff *));
#if 0
static int
! demangle_method_args PARAMS ((struct work_stuff *, const char **, string *));
#endif
static char *
! internal_cplus_demangle PARAMS ((struct work_stuff *, const char *));
static int
! demangle_template_template_parm PARAMS ((struct work_stuff *work,
! const char **, string *));
static int
! demangle_template PARAMS ((struct work_stuff *work, const char **, string *,
! string *, int, int));
static int
! arm_pt PARAMS ((struct work_stuff *, const char *, int, const char **,
! const char **));
static int
! demangle_class_name PARAMS ((struct work_stuff *, const char **, string *));
static int
! demangle_qualified PARAMS ((struct work_stuff *, const char **, string *,
! int, int));
! static int
! demangle_class PARAMS ((struct work_stuff *, const char **, string *));
! static int
! demangle_fund_type PARAMS ((struct work_stuff *, const char **, string *));
! static int
! demangle_signature PARAMS ((struct work_stuff *, const char **, string *));
! static int
! demangle_prefix PARAMS ((struct work_stuff *, const char **, string *));
! static int
! gnu_special PARAMS ((struct work_stuff *, const char **, string *));
! static int
! arm_special PARAMS ((const char **, string *));
! static void
! string_need PARAMS ((string *, int));
! static void
! string_delete PARAMS ((string *));
static void
! string_init PARAMS ((string *));
! static void
! string_clear PARAMS ((string *));
#if 0
! static int
! string_empty PARAMS ((string *));
#endif
! static void
! string_append PARAMS ((string *, const char *));
! static void
! string_appends PARAMS ((string *, string *));
! static void
! string_appendn PARAMS ((string *, const char *, int));
! static void
! string_prepend PARAMS ((string *, const char *));
! static void
! string_prependn PARAMS ((string *, const char *, int));
! static void
! string_append_template_idx PARAMS ((string *, int));
! static int
! get_count PARAMS ((const char **, int *));
! static int
! consume_count PARAMS ((const char **));
! static int
! consume_count_with_underscores PARAMS ((const char**));
! static int
! demangle_args PARAMS ((struct work_stuff *, const char **, string *));
! static int
! demangle_nested_args PARAMS ((struct work_stuff*, const char**, string*));
! static int
! do_type PARAMS ((struct work_stuff *, const char **, string *));
! static int
! do_arg PARAMS ((struct work_stuff *, const char **, string *));
static void
! demangle_function_name PARAMS ((struct work_stuff *, const char **, string *,
! const char *));
static int
! iterate_demangle_function PARAMS ((struct work_stuff *,
! const char **, string *, const char *));
! static void
! remember_type PARAMS ((struct work_stuff *, const char *, int));
! static void
! remember_Btype PARAMS ((struct work_stuff *, const char *, int, int));
! static int
! register_Btype PARAMS ((struct work_stuff *));
! static void
! remember_Ktype PARAMS ((struct work_stuff *, const char *, int));
! static void
! forget_types PARAMS ((struct work_stuff *));
! static void
! forget_B_and_K_types PARAMS ((struct work_stuff *));
! static void
! string_prepends PARAMS ((string *, string *));
static int
! demangle_template_value_parm PARAMS ((struct work_stuff*, const char**,
! string*, type_kind_t));
static int
! do_hpacc_template_const_value PARAMS ((struct work_stuff *, const char **, string *));
static int
! do_hpacc_template_literal PARAMS ((struct work_stuff *, const char **, string *));
! static int
! snarf_numeric_literal PARAMS ((const char **, string *));
/* There is a TYPE_QUAL value for each type qualifier. They can be
combined by bitwise-or to form the complete set of qualifiers for a
--- 326,452 ----
/* Prototypes for local functions */
! static void delete_work_stuff (struct work_stuff *);
! static void delete_non_B_K_work_stuff (struct work_stuff *);
! static char *mop_up (struct work_stuff *, string *, int);
! static void squangle_mop_up (struct work_stuff *);
! static void work_stuff_copy_to_from (struct work_stuff *, struct work_stuff *);
#if 0
static int
! demangle_method_args (struct work_stuff *, const char **, string *);
#endif
static char *
! internal_cplus_demangle (struct work_stuff *, const char *);
static int
! demangle_template_template_parm (struct work_stuff *work,
! const char **, string *);
static int
! demangle_template (struct work_stuff *work, const char **, string *,
! string *, int, int);
static int
! arm_pt (struct work_stuff *, const char *, int, const char **,
! const char **);
static int
! demangle_class_name (struct work_stuff *, const char **, string *);
static int
! demangle_qualified (struct work_stuff *, const char **, string *,
! int, int);
! static int demangle_class (struct work_stuff *, const char **, string *);
! static int demangle_fund_type (struct work_stuff *, const char **, string *);
! static int demangle_signature (struct work_stuff *, const char **, string *);
! static int demangle_prefix (struct work_stuff *, const char **, string *);
! static int gnu_special (struct work_stuff *, const char **, string *);
! static int arm_special (const char **, string *);
! static void string_need (string *, int);
! static void string_delete (string *);
static void
! string_init (string *);
! static void string_clear (string *);
#if 0
! static int string_empty (string *);
#endif
! static void string_append (string *, const char *);
! static void string_appends (string *, string *);
! static void string_appendn (string *, const char *, int);
! static void string_prepend (string *, const char *);
! static void string_prependn (string *, const char *, int);
! static void string_append_template_idx (string *, int);
! static int get_count (const char **, int *);
! static int consume_count (const char **);
! static int consume_count_with_underscores (const char**);
! static int demangle_args (struct work_stuff *, const char **, string *);
! static int demangle_nested_args (struct work_stuff*, const char**, string*);
! static int do_type (struct work_stuff *, const char **, string *);
! static int do_arg (struct work_stuff *, const char **, string *);
static void
! demangle_function_name (struct work_stuff *, const char **, string *,
! const char *);
static int
! iterate_demangle_function (struct work_stuff *,
! const char **, string *, const char *);
! static void remember_type (struct work_stuff *, const char *, int);
! static void remember_Btype (struct work_stuff *, const char *, int, int);
! static int register_Btype (struct work_stuff *);
! static void remember_Ktype (struct work_stuff *, const char *, int);
! static void forget_types (struct work_stuff *);
! static void forget_B_and_K_types (struct work_stuff *);
! static void string_prepends (string *, string *);
static int
! demangle_template_value_parm (struct work_stuff*, const char**,
! string*, type_kind_t);
static int
! do_hpacc_template_const_value (struct work_stuff *, const char **, string *);
static int
! do_hpacc_template_literal (struct work_stuff *, const char **, string *);
! static int snarf_numeric_literal (const char **, string *);
/* There is a TYPE_QUAL value for each type qualifier. They can be
combined by bitwise-or to form the complete set of qualifiers for a
*************** snarf_numeric_literal PARAMS ((const cha
*** 494,529 ****
#define TYPE_QUAL_VOLATILE 0x2
#define TYPE_QUAL_RESTRICT 0x4
! static int
! code_for_qualifier PARAMS ((int));
! static const char*
! qualifier_string PARAMS ((int));
! static const char*
! demangle_qualifier PARAMS ((int));
! static int
! demangle_expression PARAMS ((struct work_stuff *, const char **, string *,
! type_kind_t));
static int
! demangle_integral_value PARAMS ((struct work_stuff *, const char **,
! string *));
static int
! demangle_real_value PARAMS ((struct work_stuff *, const char **, string *));
static void
! demangle_arm_hp_template PARAMS ((struct work_stuff *, const char **, int,
! string *));
static void
! recursively_demangle PARAMS ((struct work_stuff *, const char **, string *,
! int));
! static void
! grow_vect PARAMS ((char **, size_t *, size_t, int));
/* Translate count to integer, consuming tokens in the process.
Conversion terminates on the first non-digit character.
--- 457,484 ----
#define TYPE_QUAL_VOLATILE 0x2
#define TYPE_QUAL_RESTRICT 0x4
! static int code_for_qualifier (int);
! static const char* qualifier_string (int);
! static const char* demangle_qualifier (int);
! static int demangle_expression (struct work_stuff *, const char **, string *,
! type_kind_t);
static int
! demangle_integral_value (struct work_stuff *, const char **, string *);
static int
! demangle_real_value (struct work_stuff *, const char **, string *);
static void
! demangle_arm_hp_template (struct work_stuff *, const char **, int, string *);
static void
! recursively_demangle (struct work_stuff *, const char **, string *, int);
! static void grow_vect (char **, size_t *, size_t, int);
/* Translate count to integer, consuming tokens in the process.
Conversion terminates on the first non-digit character.
*************** grow_vect PARAMS ((char **, size_t *, si
*** 534,541 ****
Overflow consumes the rest of the digits, and returns -1. */
static int
! consume_count (type)
! const char **type;
{
int count = 0;
--- 489,495 ----
Overflow consumes the rest of the digits, and returns -1. */
static int
! consume_count (const char **type)
{
int count = 0;
*************** consume_count (type)
*** 574,581 ****
failure, since 0 can be a valid value. */
static int
! consume_count_with_underscores (mangled)
! const char **mangled;
{
int idx;
--- 528,534 ----
failure, since 0 can be a valid value. */
static int
! consume_count_with_underscores (const char **mangled)
{
int idx;
*************** consume_count_with_underscores (mangled)
*** 608,615 ****
corresponding to this qualifier. */
static int
! code_for_qualifier (c)
! int c;
{
switch (c)
{
--- 561,567 ----
corresponding to this qualifier. */
static int
! code_for_qualifier (int c)
{
switch (c)
{
*************** code_for_qualifier (c)
*** 634,641 ****
TYPE_QUALS. */
static const char*
! qualifier_string (type_quals)
! int type_quals;
{
switch (type_quals)
{
--- 586,592 ----
TYPE_QUALS. */
static const char*
! qualifier_string (int type_quals)
{
switch (type_quals)
{
*************** qualifier_string (type_quals)
*** 676,692 ****
called with a valid qualifier code. */
static const char*
! demangle_qualifier (c)
! int c;
{
return qualifier_string (code_for_qualifier (c));
}
int
! cplus_demangle_opname (opname, result, options)
! const char *opname;
! char *result;
! int options;
{
int len, len1, ret;
string type;
--- 627,639 ----
called with a valid qualifier code. */
static const char*
! demangle_qualifier (int c)
{
return qualifier_string (code_for_qualifier (c));
}
int
! cplus_demangle_opname (const char *opname, char *result, int options)
{
int len, len1, ret;
string type;
*************** cplus_demangle_opname (opname, result, o
*** 819,827 ****
if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */
const char *
! cplus_mangle_opname (opname, options)
! const char *opname;
! int options;
{
size_t i;
int len;
--- 766,772 ----
if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */
const char *
! cplus_mangle_opname (const char *opname, int options)
{
size_t i;
int len;
*************** cplus_mangle_opname (opname, options)
*** 841,848 ****
allow for any demangler initialization that maybe necessary. */
enum demangling_styles
! cplus_demangle_set_style (style)
! enum demangling_styles style;
{
const struct demangler_engine *demangler = libiberty_demanglers;
--- 786,792 ----
allow for any demangler initialization that maybe necessary. */
enum demangling_styles
! cplus_demangle_set_style (enum demangling_styles style)
{
const struct demangler_engine *demangler = libiberty_demanglers;
*************** cplus_demangle_set_style (style)
*** 859,866 ****
/* Do string name to style translation */
enum demangling_styles
! cplus_demangle_name_to_style (name)
! const char *name;
{
const struct demangler_engine *demangler = libiberty_demanglers;
--- 803,809 ----
/* Do string name to style translation */
enum demangling_styles
! cplus_demangle_name_to_style (const char *name)
{
const struct demangler_engine *demangler = libiberty_demanglers;
*************** cplus_demangle_name_to_style (name)
*** 900,908 ****
MANGLED. */
char *
! cplus_demangle (mangled, options)
! const char *mangled;
! int options;
{
char *ret;
struct work_stuff work[1];
--- 843,849 ----
MANGLED. */
char *
! cplus_demangle (const char *mangled, int options)
{
char *ret;
struct work_stuff work[1];
*************** cplus_demangle (mangled, options)
*** 944,954 ****
updating *OLD_VECT and *SIZE as necessary. */
static void
! grow_vect (old_vect, size, min_size, element_size)
! char **old_vect;
! size_t *size;
! size_t min_size;
! int element_size;
{
if (*size < min_size)
{
--- 885,891 ----
updating *OLD_VECT and *SIZE as necessary. */
static void
! grow_vect (char **old_vect, size_t *size, size_t min_size, int element_size)
{
if (*size < min_size)
{
*************** grow_vect (old_vect, size, min_size, ele
*** 968,976 ****
The resulting string is valid until the next call of ada_demangle. */
static char *
! ada_demangle (mangled, option)
! const char *mangled;
! int option ATTRIBUTE_UNUSED;
{
int i, j;
int len0;
--- 905,911 ----
The resulting string is valid until the next call of ada_demangle. */
static char *
! ada_demangle (const char *mangled, int option ATTRIBUTE_UNUSED)
{
int i, j;
int len0;
*************** ada_demangle (mangled, option)
*** 1073,1081 ****
calls go directly to this routine to avoid resetting that info. */
static char *
! internal_cplus_demangle (work, mangled)
! struct work_stuff *work;
! const char *mangled;
{
string decl;
--- 1008,1014 ----
calls go directly to this routine to avoid resetting that info. */
static char *
! internal_cplus_demangle (struct work_stuff *work, const char *mangled)
{
string decl;
*************** internal_cplus_demangle (work, mangled)
*** 1140,1147 ****
/* Clear out and squangling related storage */
static void
! squangle_mop_up (work)
! struct work_stuff *work;
{
/* clean up the B and K type mangling types. */
forget_B_and_K_types (work);
--- 1073,1079 ----
/* Clear out and squangling related storage */
static void
! squangle_mop_up (struct work_stuff *work)
{
/* clean up the B and K type mangling types. */
forget_B_and_K_types (work);
*************** squangle_mop_up (work)
*** 1159,1167 ****
/* Copy the work state and storage. */
static void
! work_stuff_copy_to_from (to, from)
! struct work_stuff *to;
! struct work_stuff *from;
{
int i;
--- 1091,1097 ----
/* Copy the work state and storage. */
static void
! work_stuff_copy_to_from (struct work_stuff *to, struct work_stuff *from)
{
int i;
*************** work_stuff_copy_to_from (to, from)
*** 1231,1238 ****
/* Delete dynamic stuff in work_stuff that is not to be re-used. */
static void
! delete_non_B_K_work_stuff (work)
! struct work_stuff *work;
{
/* Discard the remembered types, if any. */
--- 1161,1167 ----
/* Delete dynamic stuff in work_stuff that is not to be re-used. */
static void
! delete_non_B_K_work_stuff (struct work_stuff *work)
{
/* Discard the remembered types, if any. */
*************** delete_non_B_K_work_stuff (work)
*** 1265,1272 ****
/* Delete all dynamic storage in work_stuff. */
static void
! delete_work_stuff (work)
! struct work_stuff *work;
{
delete_non_B_K_work_stuff (work);
squangle_mop_up (work);
--- 1194,1200 ----
/* Delete all dynamic storage in work_stuff. */
static void
! delete_work_stuff (struct work_stuff *work)
{
delete_non_B_K_work_stuff (work);
squangle_mop_up (work);
*************** delete_work_stuff (work)
*** 1276,1285 ****
/* Clear out any mangled storage */
static char *
! mop_up (work, declp, success)
! struct work_stuff *work;
! string *declp;
! int success;
{
char *demangled = NULL;
--- 1204,1210 ----
/* Clear out any mangled storage */
static char *
! mop_up (struct work_stuff *work, string *declp, int success)
{
char *demangled = NULL;
*************** DESCRIPTION
*** 1331,1340 ****
argument list. */
static int
! demangle_signature (work, mangled, declp)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
{
int success = 1;
int func_done = 0;
--- 1256,1263 ----
argument list. */
static int
! demangle_signature (struct work_stuff *work,
! const char **mangled, string *declp)
{
int success = 1;
int func_done = 0;
*************** demangle_signature (work, mangled, declp
*** 1624,1633 ****
#if 0
static int
! demangle_method_args (work, mangled, declp)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
{
int success = 0;
--- 1547,1554 ----
#if 0
static int
! demangle_method_args (struct work_stuff *work, const char **mangled,
! string *declp)
{
int success = 0;
*************** demangle_method_args (work, mangled, dec
*** 1647,1656 ****
#endif
static int
! demangle_template_template_parm (work, mangled, tname)
! struct work_stuff *work;
! const char **mangled;
! string *tname;
{
int i;
int r;
--- 1568,1575 ----
#endif
static int
! demangle_template_template_parm (struct work_stuff *work,
! const char **mangled, string *tname)
{
int i;
int r;
*************** demangle_template_template_parm (work, m
*** 1711,1721 ****
}
static int
! demangle_expression (work, mangled, s, tk)
! struct work_stuff *work;
! const char** mangled;
! string* s;
! type_kind_t tk;
{
int need_operator = 0;
int success;
--- 1630,1637 ----
}
static int
! demangle_expression (struct work_stuff *work, const char **mangled,
! string *s, type_kind_t tk)
{
int need_operator = 0;
int success;
*************** demangle_expression (work, mangled, s, t
*** 1771,1780 ****
}
static int
! demangle_integral_value (work, mangled, s)
! struct work_stuff *work;
! const char** mangled;
! string* s;
{
int success;
--- 1687,1694 ----
}
static int
! demangle_integral_value (struct work_stuff *work,
! const char **mangled, string *s)
{
int success;
*************** demangle_integral_value (work, mangled,
*** 1869,1878 ****
/* Demangle the real value in MANGLED. */
static int
! demangle_real_value (work, mangled, s)
! struct work_stuff *work;
! const char **mangled;
! string* s;
{
if (**mangled == 'E')
return demangle_expression (work, mangled, s, tk_real);
--- 1783,1790 ----
/* Demangle the real value in MANGLED. */
static int
! demangle_real_value (struct work_stuff *work,
! const char **mangled, string *s)
{
if (**mangled == 'E')
return demangle_expression (work, mangled, s, tk_real);
*************** demangle_real_value (work, mangled, s)
*** 1912,1922 ****
}
static int
! demangle_template_value_parm (work, mangled, s, tk)
! struct work_stuff *work;
! const char **mangled;
! string* s;
! type_kind_t tk;
{
int success = 1;
--- 1824,1831 ----
}
static int
! demangle_template_value_parm (struct work_stuff *work, const char **mangled,
! string *s, type_kind_t tk)
{
int success = 1;
*************** demangle_template_value_parm (work, mang
*** 2024,2036 ****
types. */
static int
! demangle_template (work, mangled, tname, trawname, is_type, remember)
! struct work_stuff *work;
! const char **mangled;
! string *tname;
! string *trawname;
! int is_type;
! int remember;
{
int i;
int r;
--- 1933,1941 ----
types. */
static int
! demangle_template (struct work_stuff *work, const char **mangled,
! string *tname, string *trawname,
! int is_type, int remember)
{
int i;
int r;
*************** demangle_template (work, mangled, tname,
*** 2239,2249 ****
}
static int
! arm_pt (work, mangled, n, anchor, args)
! struct work_stuff *work;
! const char *mangled;
! int n;
! const char **anchor, **args;
{
/* Check if ARM template with "__pt__" in it ("parameterized type") */
/* Allow HP also here, because HP's cfront compiler follows ARM to some extent */
--- 2144,2151 ----
}
static int
! arm_pt (struct work_stuff *work, const char *mangled,
! int n, const char **anchor, const char **args)
{
/* Check if ARM template with "__pt__" in it ("parameterized type") */
/* Allow HP also here, because HP's cfront compiler follows ARM to some extent */
*************** arm_pt (work, mangled, n, anchor, args)
*** 2296,2306 ****
}
static void
! demangle_arm_hp_template (work, mangled, n, declp)
! struct work_stuff *work;
! const char **mangled;
! int n;
! string *declp;
{
const char *p;
const char *args;
--- 2198,2205 ----
}
static void
! demangle_arm_hp_template (struct work_stuff *work, const char **mangled,
! int n, string *declp)
{
const char *p;
const char *args;
*************** demangle_arm_hp_template (work, mangled,
*** 2477,2486 ****
already been dealt with */
static int
! demangle_class_name (work, mangled, declp)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
{
int n;
int success = 0;
--- 2376,2383 ----
already been dealt with */
static int
! demangle_class_name (struct work_stuff *work, const char **mangled,
! string *declp)
{
int n;
int success = 0;
*************** DESCRIPTION
*** 2533,2542 ****
*/
static int
! demangle_class (work, mangled, declp)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
{
int success = 0;
int btype;
--- 2430,2436 ----
*/
static int
! demangle_class (struct work_stuff *work, const char **mangled, string *declp)
{
int success = 0;
int btype;
*************** demangle_class (work, mangled, declp)
*** 2588,2598 ****
demangle_signature. */
static int
! iterate_demangle_function (work, mangled, declp, scan)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
! const char *scan;
{
const char *mangle_init = *mangled;
int success = 0;
--- 2482,2489 ----
demangle_signature. */
static int
! iterate_demangle_function (struct work_stuff *work, const char **mangled,
! string *declp, const char *scan)
{
const char *mangle_init = *mangled;
int success = 0;
*************** DESCRIPTION
*** 2691,2700 ****
*/
static int
! demangle_prefix (work, mangled, declp)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
{
int success = 1;
const char *scan;
--- 2582,2589 ----
*/
static int
! demangle_prefix (struct work_stuff *work, const char **mangled,
! string *declp)
{
int success = 1;
const char *scan;
*************** DESCRIPTION
*** 2902,2911 ****
*/
static int
! gnu_special (work, mangled, declp)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
{
int n;
int success = 1;
--- 2791,2797 ----
*/
static int
! gnu_special (struct work_stuff *work, const char **mangled, string *declp)
{
int n;
int success = 1;
*************** gnu_special (work, mangled, declp)
*** 3106,3116 ****
}
static void
! recursively_demangle(work, mangled, result, namelength)
! struct work_stuff *work;
! const char **mangled;
! string *result;
! int namelength;
{
char * recurse = (char *)NULL;
char * recurse_dem = (char *)NULL;
--- 2992,2999 ----
}
static void
! recursively_demangle(struct work_stuff *work, const char **mangled,
! string *result, int namelength)
{
char * recurse = (char *)NULL;
char * recurse_dem = (char *)NULL;
*************** DESCRIPTION
*** 3158,3166 ****
*/
static int
! arm_special (mangled, declp)
! const char **mangled;
! string *declp;
{
int n;
int success = 1;
--- 3041,3047 ----
*/
static int
! arm_special (const char **mangled, string *declp)
{
int n;
int success = 1;
*************** BUGS
*** 3243,3254 ****
*/
static int
! demangle_qualified (work, mangled, result, isfuncname, append)
! struct work_stuff *work;
! const char **mangled;
! string *result;
! int isfuncname;
! int append;
{
int qualifiers = 0;
int success = 1;
--- 3124,3131 ----
*/
static int
! demangle_qualified (struct work_stuff *work, const char **mangled,
! string *result, int isfuncname, int append)
{
int qualifiers = 0;
int success = 1;
*************** DESCRIPTION
*** 3470,3478 ****
*/
static int
! get_count (type, count)
! const char **type;
! int *count;
{
const char *p;
int n;
--- 3347,3353 ----
*/
static int
! get_count (const char **type, int *count)
{
const char *p;
int n;
*************** get_count (type, count)
*** 3508,3517 ****
value returned is really a type_kind_t. */
static int
! do_type (work, mangled, result)
! struct work_stuff *work;
! const char **mangled;
! string *result;
{
int n;
int done;
--- 3383,3389 ----
value returned is really a type_kind_t. */
static int
! do_type (struct work_stuff *work, const char **mangled, string *result)
{
int n;
int done;
*************** do_type (work, mangled, result)
*** 3820,3829 ****
The value returned is really a type_kind_t. */
static int
! demangle_fund_type (work, mangled, result)
! struct work_stuff *work;
! const char **mangled;
! string *result;
{
int done = 0;
int success = 1;
--- 3692,3699 ----
The value returned is really a type_kind_t. */
static int
! demangle_fund_type (struct work_stuff *work,
! const char **mangled, string *result)
{
int done = 0;
int success = 1;
*************** demangle_fund_type (work, mangled, resul
*** 4022,4031 ****
**mangled points to 'S' or 'U' */
static int
! do_hpacc_template_const_value (work, mangled, result)
! struct work_stuff *work ATTRIBUTE_UNUSED;
! const char **mangled;
! string *result;
{
int unsigned_const;
--- 3892,3899 ----
**mangled points to 'S' or 'U' */
static int
! do_hpacc_template_const_value (struct work_stuff *work ATTRIBUTE_UNUSED,
! const char **mangled, string *result)
{
int unsigned_const;
*************** do_hpacc_template_const_value (work, man
*** 4079,4088 ****
**mangled is pointing to the 'A' */
static int
! do_hpacc_template_literal (work, mangled, result)
! struct work_stuff *work;
! const char **mangled;
! string *result;
{
int literal_len = 0;
char * recurse;
--- 3947,3954 ----
**mangled is pointing to the 'A' */
static int
! do_hpacc_template_literal (struct work_stuff *work, const char **mangled,
! string *result)
{
int literal_len = 0;
char * recurse;
*************** do_hpacc_template_literal (work, mangled
*** 4125,4133 ****
}
static int
! snarf_numeric_literal (args, arg)
! const char ** args;
! string * arg;
{
if (**args == '-')
{
--- 3991,3997 ----
}
static int
! snarf_numeric_literal (const char **args, string *arg)
{
if (**args == '-')
{
*************** snarf_numeric_literal (args, arg)
*** 4156,4165 ****
and free'd should anything go wrong. */
static int
! do_arg (work, mangled, result)
! struct work_stuff *work;
! const char **mangled;
! string *result;
{
/* Remember where we started so that we can record the type, for
non-squangling type remembering. */
--- 4020,4026 ----
and free'd should anything go wrong. */
static int
! do_arg (struct work_stuff *work, const char **mangled, string *result)
{
/* Remember where we started so that we can record the type, for
non-squangling type remembering. */
*************** do_arg (work, mangled, result)
*** 4222,4231 ****
}
static void
! remember_type (work, start, len)
! struct work_stuff *work;
! const char *start;
! int len;
{
char *tem;
--- 4083,4089 ----
}
static void
! remember_type (struct work_stuff *work, const char *start, int len)
{
char *tem;
*************** remember_type (work, start, len)
*** 4257,4266 ****
/* Remember a K type class qualifier. */
static void
! remember_Ktype (work, start, len)
! struct work_stuff *work;
! const char *start;
! int len;
{
char *tem;
--- 4115,4121 ----
/* Remember a K type class qualifier. */
static void
! remember_Ktype (struct work_stuff *work, const char *start, int len)
{
char *tem;
*************** remember_Ktype (work, start, len)
*** 4291,4298 ****
registers map<temp<char> > as B0, and temp<char> as B1 */
static int
! register_Btype (work)
! struct work_stuff *work;
{
int ret;
--- 4146,4152 ----
registers map<temp<char> > as B0, and temp<char> as B1 */
static int
! register_Btype (struct work_stuff *work)
{
int ret;
*************** register_Btype (work)
*** 4320,4329 ****
/* Store a value into a previously registered B code type. */
static void
! remember_Btype (work, start, len, index)
! struct work_stuff *work;
! const char *start;
! int len, index;
{
char *tem;
--- 4174,4181 ----
/* Store a value into a previously registered B code type. */
static void
! remember_Btype (struct work_stuff *work, const char *start,
! int len, int index)
{
char *tem;
*************** remember_Btype (work, start, len, index)
*** 4335,4342 ****
/* Lose all the info related to B and K type codes. */
static void
! forget_B_and_K_types (work)
! struct work_stuff *work;
{
int i;
--- 4187,4193 ----
/* Lose all the info related to B and K type codes. */
static void
! forget_B_and_K_types (struct work_stuff *work)
{
int i;
*************** forget_B_and_K_types (work)
*** 4363,4370 ****
/* Forget the remembered types, but not the type vector itself. */
static void
! forget_types (work)
! struct work_stuff *work;
{
int i;
--- 4214,4220 ----
/* Forget the remembered types, but not the type vector itself. */
static void
! forget_types (struct work_stuff *work)
{
int i;
*************** forget_types (work)
*** 4422,4431 ****
*/
static int
! demangle_args (work, mangled, declp)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
{
string arg;
int need_comma = 0;
--- 4272,4279 ----
*/
static int
! demangle_args (struct work_stuff *work, const char **mangled,
! string *declp)
{
string arg;
int need_comma = 0;
*************** demangle_args (work, mangled, declp)
*** 4547,4556 ****
and method pointers or references, not top-level declarations. */
static int
! demangle_nested_args (work, mangled, declp)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
{
string* saved_previous_argument;
int result;
--- 4395,4402 ----
and method pointers or references, not top-level declarations. */
static int
! demangle_nested_args (struct work_stuff *work, const char **mangled,
! string *declp)
{
string* saved_previous_argument;
int result;
*************** demangle_nested_args (work, mangled, dec
*** 4586,4596 ****
}
static void
! demangle_function_name (work, mangled, declp, scan)
! struct work_stuff *work;
! const char **mangled;
! string *declp;
! const char *scan;
{
size_t i;
string type;
--- 4432,4439 ----
}
static void
! demangle_function_name (struct work_stuff *work, const char **mangled,
! string *declp, const char *scan)
{
size_t i;
string type;
*************** demangle_function_name (work, mangled, d
*** 4747,4755 ****
/* a mini string-handling package */
static void
! string_need (s, n)
! string *s;
! int n;
{
int tem;
--- 4590,4596 ----
/* a mini string-handling package */
static void
! string_need (string *s, int n)
{
int tem;
*************** string_need (s, n)
*** 4774,4781 ****
}
static void
! string_delete (s)
! string *s;
{
if (s->b != NULL)
{
--- 4615,4621 ----
}
static void
! string_delete (string *s)
{
if (s->b != NULL)
{
*************** string_delete (s)
*** 4785,4799 ****
}
static void
! string_init (s)
! string *s;
{
s->b = s->p = s->e = NULL;
}
static void
! string_clear (s)
! string *s;
{
s->p = s->b;
}
--- 4625,4637 ----
}
static void
! string_init (string *s)
{
s->b = s->p = s->e = NULL;
}
static void
! string_clear (string *s)
{
s->p = s->b;
}
*************** string_clear (s)
*** 4801,4808 ****
#if 0
static int
! string_empty (s)
! string *s;
{
return (s->b == s->p);
}
--- 4639,4645 ----
#if 0
static int
! string_empty (string *s)
{
return (s->b == s->p);
}
*************** string_empty (s)
*** 4810,4818 ****
#endif
static void
! string_append (p, s)
! string *p;
! const char *s;
{
int n;
if (s == NULL || *s == '\0')
--- 4647,4653 ----
#endif
static void
! string_append (string *p, const char *s)
{
int n;
if (s == NULL || *s == '\0')
*************** string_append (p, s)
*** 4824,4831 ****
}
static void
! string_appends (p, s)
! string *p, *s;
{
int n;
--- 4659,4665 ----
}
static void
! string_appends (string *p, string *s)
{
int n;
*************** string_appends (p, s)
*** 4839,4848 ****
}
static void
! string_appendn (p, s, n)
! string *p;
! const char *s;
! int n;
{
if (n != 0)
{
--- 4673,4679 ----
}
static void
! string_appendn (string *p, const char *s, int n)
{
if (n != 0)
{
*************** string_appendn (p, s, n)
*** 4853,4861 ****
}
static void
! string_prepend (p, s)
! string *p;
! const char *s;
{
if (s != NULL && *s != '\0')
{
--- 4684,4690 ----
}
static void
! string_prepend (string *p, const char *s)
{
if (s != NULL && *s != '\0')
{
*************** string_prepend (p, s)
*** 4864,4871 ****
}
static void
! string_prepends (p, s)
! string *p, *s;
{
if (s->b != s->p)
{
--- 4693,4699 ----
}
static void
! string_prepends (string *p, string *s)
{
if (s->b != s->p)
{
*************** string_prepends (p, s)
*** 4874,4883 ****
}
static void
! string_prependn (p, s, n)
! string *p;
! const char *s;
! int n;
{
char *q;
--- 4702,4708 ----
}
static void
! string_prependn (string *p, const char *s, int n)
{
char *q;
*************** string_prependn (p, s, n)
*** 4894,4902 ****
}
static void
! string_append_template_idx (s, idx)
! string *s;
! int idx;
{
char buf[INTBUF_SIZE + 1 /* 'T' */];
sprintf(buf, "T%d", idx);
--- 4719,4725 ----
}
static void
! string_append_template_idx (string *s, int idx)
{
char buf[INTBUF_SIZE + 1 /* 'T' */];
sprintf(buf, "T%d", idx);
More information about the Gcc-patches
mailing list