Commit Graph

94 Commits

Author SHA1 Message Date
Ian Lance Taylor e4796f1c88 cp-demangle.c (d_encoding): When DMGL_PARAMS is not set...
* cp-demangle.c (d_encoding): When DMGL_PARAMS is not set, strip
	CV-qualifiers from D_COMP_LOCAL_NAME right subtree.
	* cplus-dem.c (demangle_arm_hp_template): Set DMGL_PARAMS when
	demangling template parameters.
	* testsuite/test-demangle.c (fail): New static function.
	(main): Support new options in input file: --no-params,
	--is-v3-ctor, and --is-v3-dtor.
	* testsuite/demangle-expected: Add --no-params to most tests, and
	add the correct result when parameters are not demangled.  Add
	some simple tests for V3 constructor/destructor recognition.

From-SVN: r75336
2004-01-02 20:33:55 +00:00
J. Brobecker 08c5b96d1b cplus-dem.c (demangle_template): Register a new Btype only when needed.
* cplus-dem.c (demangle_template): Register a new Btype only
        when needed.
        * testsuite/demangle-expected: Add a new test.

From-SVN: r72729
2003-10-20 23:21:30 +00:00
Carlo Wood 8fe857758f cplus-dem.c (demangle_integral_value): Correction to reflect patch of 2002-01-10 in order to also make negative...
* cplus-dem.c (demangle_integral_value): Correction to reflect
patch of 2002-01-10 in order to also make negative multi-digits
without leading underscore work.

From-SVN: r64179
2003-03-11 14:55:46 -05:00
Mark Mitchell 3bf2782272 * cplus-dem.c: Add license exception to copyright notice.
From-SVN: r63760
2003-03-04 02:57:16 +00:00
jmc e182f0a397 * cplus_dem.c: Fix typo: intializes -> initializes.
From-SVN: r63182
2003-02-20 15:31:18 -05:00
Daniel Jacobowitz 902cf50c93 re PR c++/7612 (Memory leaks in cplus-dem.c)
Fix PR c++/7612.
	* cplus-dem.c (demangle_signature): Call string_delete.
	Remove extra string_init.
	(demangle_arm_hp_template): Call string_delete instead of
	string_clear.  Add missing string_delete call.
	(demangle_qualified): Add missing string_delete call.
	(do_type): Remove unused variable btype.  Add missing string_delete
	call.  Call string_delete instead of string_clear.
	(demangle_fund_type): Move variable btype inside of the switch
	statement.  Add missing string_delete call.
	(do_arg): Call string_delete instead of string_clear.  Remove extra
	string_init.
	(demangle_nested_args): Free work->previous_argument.

From-SVN: r62852
2003-02-13 17:21:20 +00:00
Andreas Jaeger de78f58bcf cplus-dem.c (ada_demangle): Get rid of unneeded variable and of strict-aliasing warning.
* libiberty/cplus-dem.c (ada_demangle): Get rid of unneeded
	variable and of strict-aliasing warning.
	(grow_vect): Use char as first parameter.

From-SVN: r57866
2002-10-06 21:29:24 +02:00
John David Anglin f08b7eee21 cp-demangle.c (demangling_new): Cast 0 to enum.
* cp-demangle.c (demangling_new): Cast 0 to enum.
	(demangle_char): Cast return of strdup to char *.
	(is_gnu_v3_mangled_ctor): Cast 0 to enum.
	(is_gnu_v3_mangled_dtor): Likewise.
	* cplus-dem.c (grow_vect): Cast return of xrealloc to void *.
	(work_stuff_copy_to_from): Cast return of xmalloc to char **.
	* fibheap.c (fibnode_new): Cast return of xcalloc to fibnode_t.
	* md5.c (md5_process_bytes): Cast results back to const void *.
	(md5_process_block): Add cast to const md5_uint32 *.
	* regex.c (re_compile_fastmap): Cast enum to UCHAR_T.
	* safe-ctype.c (L, XL, U, XU, D, P, _, C, Z, M, V, T, S): Add cast to
	unsigned short.
	* splay-tree.c (splay_tree_xmalloc_allocate): Cast return of xmalloc
	to void *.
	* vasprintf.c (int_vasprintf): Cast return of malloc to char *.

From-SVN: r57330
2002-09-20 02:40:51 +00:00
Zack Weinberg 3fd9d606f3 Makefile.in: Remove all references to s-under and underscore.c.
gcc:
	* Makefile.in: Remove all references to s-under and underscore.c.
	* collect2.c, tlink.c: Change all uses of prepends_underscore
	to look directly at USER_LABEL_PREFIX.

gcc/cp:
	* Make-lang.in: Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
	and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
	* cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
	minor adjustments (use version_string, eliminate yet another
	duplicate of xmalloc)

libiberty:
	* cplus-dem.c: Code code under #ifdef MAIN moved to gcc/cp/cxxfilt.c.
	* testsuite/Makefile.in: Adjust for test-demangle.
	* testsuite/regress-demangle: Deleted.
	* testsuite/test-demangle.c: New file.
	* testsuite/demangle-expected: Change \$ to $ throughout, now that
	this file is not being read by a shell script.

From-SVN: r57037
2002-09-11 19:58:02 +00:00
Neil Booth 437974a94b * cplus-dem.c (PREPEND_BLANK): Remove.
From-SVN: r55837
2002-07-29 17:11:10 +00:00
Scott Snyder b1c1a22fb2 demangle-expected: Add test case for infinite loop in demangler.
* testsuite/demangle-expected: Add test case for infinite loop in
demangler.
* cplus-dem.c (demangle_arm_hp_template): Stop trying to demangle
if do_type() doesn't make any progress --- prevents an infinite
loop.

From-SVN: r49875
2002-02-19 15:02:16 -05:00
Carlo Wood 336669e7b0 re PR other/5390 ([3.3 only?] Libiberty fails to demangle multi-digit template parameters.)
2002-02-18  Carlo Wood  <carlo@gnu.org>

	PR c++/5390
        * cplus-dem.c (demangle_integral_value): Accept multi-digit
        numbers that do not start with an underscore; This is needed
        for integer template parameters. This doesn't break anything
        because multi-digit numbers are never followed by a digit.
        * testsuite/demangle-expected: Corrected all mangled test
        cases with multi-digit template parameters: g++ 2.95.x does
        not generate underscores around these parameters.

From-SVN: r49851
2002-02-18 22:41:45 +00:00
Jason Merrill c13db5d119 demangle.h (cplus_demangle_v3): Add "options" parm.
* demangle.h (cplus_demangle_v3): Add "options" parm.
        (cplus_demangle_v3_type): Remove prototype.
        (DMGL_VERBOSE): New macro.
        (DMGL_TYPES): New macro.

        * cplus-dem.c (flags): Add DMGL_VERBOSE
        (cplus_demangle_v3_p): Remove.
        (demangle_it): Add DMGL_TYPES to passed flags.
        * cp-demangle.c (cplus_demangle_v3_all): Remove.
        (cplus_demangle_v3_type): Remove.
        (cplus_demangle_v3): Add options parm.

        * collect2.c (dump_file): Pass DMGL_VERBOSE to cplus_demangle.

From-SVN: r49525
2002-02-05 11:33:31 -05:00
H.J. Lu d74697b84d cp-demangle.c (cp_demangle_type): Do not protect with IN_LIBGCC2.
2002-02-02  H.J. Lu  (hjl@gnu.org)

	* cp-demangle.c (cp_demangle_type): Do not protect with
	IN_LIBGCC2.
	(cplus_demangle_v3_all): New.
	(cplus_demangle_v3): Call cplus_demangle_v3_all.
	(cplus_demangle_v3_type): Call cplus_demangle_v3_all.

	* cplus-dem.c (cplus_demangle_v3_p): New function pointer.
	Initialized to cplus_demangle_v3.
	(cplus_demangle_with_style): Call cplus_demangle_v3_p instead
	of cplus_demangle_v3.
	(main): Set cplus_demangle_v3_p to cplus_demangle_v3_type for
	command line symbol.

	* testsuite/regress-demangle: Pass the mangled name at the
	command line.

From-SVN: r49456
2002-02-02 20:00:36 -08:00
Kaveh R. Ghazi 5e65297bbb gcc.c (default_compilers): Const-ify.
* gcc.c (default_compilers): Const-ify.
	* mips-tdump.c (stab_names): Likewise.
	* mips-tfile.c (map_coff_types, map_coff_storage,
	map_coff_sym_type, map_coff_derived_type, stabs_symbol,
	pseudo_ops_t, pseudo_ops): Likewise.
	* protoize.c (default_include): Likewise

f:
	* com.c (clear_binding_level): Const-ify.
	(ffecom_arglist_expr_): Likewise.
	* info.c (ffeinfo_types_): Don't needlessly zero init.
	* lex.c (ffelex_hash_kludge): Const-ify.

java:
	* parse.y (src_parse_roots): Don't needlessly zero init.

libiberty:
	* cp-demangle.c (long_options): Const-ify.
	* cplus-dem.c (long_options): Likewise.

From-SVN: r48485
2002-01-02 23:18:59 +00:00
Kaveh R. Ghazi adddf5bf27 cplus-dem.c (mystrstr): Delete.
* cplus-dem.c (mystrstr): Delete.  All callers changed to use
	strstr instead.

From-SVN: r48476
2002-01-02 17:07:40 +00:00
Craig Rodrigues 63de15a4b4 re PR other/2719 (demangler crash)
2001-12-12  Craig Rodrigues  <rodrigc@gcc.gnu.org>

        PR other/2719
        * cplus-dem.c (consume_count): Treat negative count as an error.
        * testsuite/demangle-expected: Added testcase.

From-SVN: r47952
2001-12-12 23:08:07 +00:00
Richard Henderson d06ba3c7e6 demangle.h (no_demangling): New.
* demangle.h (no_demangling): New.
        (NO_DEMANGLING_STYLE_STRING): New.

        * cplus-dem.c (libiberty_demanglers): Add no_demangling case.
        (cplus_demangle): Support no_demangling.

From-SVN: r47733
2001-12-06 13:56:15 -08:00
DJ Delorie 5bed56d982 argv.c, [...]: Improve manual formatting.
* argv.c, asprintf.c, choose-temp.c, concat.c, cplus-dem.c,
ffs.c, fnmatch.txh, getruntime.c, make-temp-file.c,
mkstemps.c, pexecute.c, random.c, strsitnal.c, vasprintf.c:
Improve manual formatting.
* functions.texi: Regenerate.

From-SVN: r46323
2001-10-17 17:15:41 -04:00
Kaveh R. Ghazi 0be6abca22 demangle.h (demangler_engine): Const-ify.
include:
	* demangle.h (demangler_engine): Const-ify.
	* libiberty.h (buildargv): Likewise.

libiberty:
	* argv.c (buildargv, tests, main): Const-ify.
	* cp-demangle.c (operator_code): Likewise.
	* cplus-dem.c (optable, libiberty_demanglers,
	cplus_demangle_set_style, cplus_demangle_name_to_style,
	print_demangler_list): Likewise.
	* hashtab.c (higher_prime_number): Likewise.
	* strcasecmp.c (charmap): Likewise.
	* strerror.c (error_info, strerror, main): Likewise.
	* strncasecmp.c (charmap): Likewise.
	* strsignal.c (signal_info): Likewise.

From-SVN: r46060
2001-10-07 14:45:04 +00:00
Jason Merrill e03a61f143 * cplus-dem.c (main): Skip initial $.
From-SVN: r40655
2001-03-20 11:54:17 -05:00
John David Anglin d9fd5aae76 * cplus-dem.c (main): Cast enum style to int.
From-SVN: r40242
2001-03-05 02:43:27 +00:00
Loren J. Rittle 4031ed6598 cplus-dem.c (main): Initialize style.
2001-02-16  Loren J. Rittle  <ljrittle@acm.org>

	* cplus-dem.c (main): Initialize style.

From-SVN: r39782
2001-02-16 23:28:14 +00:00
Bryce McKinlay 3b60dd8e10 Add support for Java demangling under the v3 ABI:
* cp-demangle.c (NAMESPACE_SEPARATOR): New define.
	(struct demangling_def): Add `style' field.
	(demangling_new): New parameter `style'. Set it in demangling_t.
	(demangle_prefix): Use NAMESPACE_SEPARATOR.
	(demangle_type_ptr): Don't emit pointer symbol if doing Java output.
	(cp_demangle): New parameter `style'. Pass it to demangling_new().
	(main): Call cp_demangle with extra parameter.
	(java_demangle_v3): New function.
	(java_builtin_type_names): New. Table of primitive type names used
	for Java demangling.
	(demangle_builtin_type): Look up in java_builtin_type_names if doing
	Java output.
	* cplus-dem.c (cplus_demangle): Use java_demangle_v3 to do Java
	demangling.
	(long_options): Remove obsolete `java' option.
	(main): Remove explicit handling of `java' option. Instead, pass style
	parameter in cplus_demangle flags as gdb does.
	* testsuite/demangle.expected: Add some Java test cases.

From-SVN: r39399
2001-02-02 00:27:39 +00:00
Zack Weinberg f6bbde28c4 safe-ctype.h: New file.
include:
	* safe-ctype.h: New file.
libiberty:
	* safe-ctype.c: New file.
	* Makefile.in (CFILES): Add safe-ctype.c.
	(REQUIRED_OFILES): Add safe-ctype.o.

	* argv.c: Define ISBLANK and use it, not isspace.
	* basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c,
	strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h.  Use
	uppercase ctype macros.  Don't test ISUPPER(c)/ISLOWER(c)
	before calling TOLOWER(c)/TOUPPER(c).
gcc:
	* Makefile.in (HOST_RTL): Add safe-ctype.o.
	(safe-ctype.o): New rule.
	* system.h: Include safe-ctype.h, not ctype.h.  No need to
	wrap ctype macros.

	* cpphash.h: Zap IStable and related macros.  Define is_* in
	terms of safe-ctype.h macros.
	* cppinit.c: Delete the IStable and all related code.

	* tradcpp.c: Delete is_idchar, is_idstart, is_hor_space, and
	is_space arrays.  Delete initialize_char_syntax.  Change all
	references to the above arrays to use macros instead.
	* tradcpp.h: Define is_idchar, is_idstart, is_space, and
	is_nvspace in terms of safe_ctype.h's macros.
	* tradcif.y: is_idchar, is_idstart are macros not arrays.

	* config/i370/i370.c, config/winnt/dirent.c,
	config/winnt/fixinc-nt.c, config/winnt/ld.c:
	Use uppercase ctype macros.  If we included ctype.h,
	include safe-ctype.h instead.

	* fixinc/fixfixes.c: Use uppercase ctype macros.  Don't test
	ISLOWER(c) before calling TOUPPER(c).
	* fixinc/fixincl.c (extract_quoted_files): Simplify out some gunk.
	* fixinc/gnu-regex.c: Include safe-ctype.h, not ctype.h.  No need to
	wrap ctype macros.  Don't test ISUPPER(x) before calling TOLOWER(x).
gcc/ch:
	* lex.c: Don't bother checking whether ISUPPER(c) before
	calling TOLOWER(c).  Don't bother checking whether isascii(c)
	before testing ISSPACE(c); ISSPACE(c) includes '\n'.
gcc/f:
	* Make-lang.in: Link f/fini with safe-ctype.o.
	* bad.c: Don't test ISUPPER(c) || ISLOWER(c) before calling TOUPPER(c).
	* com.c: Use TOUPPER, not ffesrc_toupper.
	* fini.c: Don't test ISALPHA(c) before calling TOUPPER(c)/TOLOWER(c).
	* intrin.c: Don't test IN_CTYPE_DOMAIN(c).
	* src.c: Delete ffesrc_toupper_ and ffesrc_tolower_ and their
	initializing code; use TOUPPER and TOLOWER instead of
	ffesrc_toupper and ffesrc_tolower.
	* src.h: Don't declare ffesrc_toupper_ or ffesrc_tolower_.
	Don't define ffesrc_toupper or ffesrc_tolower.
gcc/java:
	* jvgenmain.c: Use ISPRINT not isascii.

From-SVN: r38124
2000-12-08 03:00:26 +00:00
Jason Merrill c6e13630ab cp-demangle.c: s/new_abi/v3/.
* cp-demangle.c: s/new_abi/v3/.
        * cplus-dem.c: Likewise.
        (current_demangling_style): Now auto_demangling.
        (cplus_demangle): Try v3 demangling if AUTO_DEMANGLING.
        (main): Use standard symbol chars for auto_demangling.

From-SVN: r38002
2000-12-04 12:11:17 -05:00
H.J. Lu 3b3bd9a786 * cplus-dem.c (main): Handle gnat_demangling.
From-SVN: r37679
2000-11-22 23:57:50 +00:00
Hans-Peter Nilsson cf183ac2bd cplus-dem.c (cplus_demangle): Fix formatting.
* cplus-dem.c (cplus_demangle): Fix formatting.
	(grow_vect): Ditto.
	(ada_demangle): Ditto.
	(internal_cplus_demangle): Ditto.
	(mop_up): Ditto.

	* cplus-dem.c (main): Handle java_demangling.

From-SVN: r37612
2000-11-21 10:47:30 +00:00
Kaveh R. Ghazi 8bcc782ce9 cplus-dem.c (grow_vect): Prototype.
* cplus-dem.c (grow_vect): Prototype.
	(ada_demangle): Cast the arg of ctype macros to unsigned char.

From-SVN: r37563
2000-11-19 12:46:33 +00:00
Hans-Peter Nilsson 29120f4427 cplus-dem.c (ada_demangle): Add back ATTRIBUTE_UNUSED for parameter `option'.
* cplus-dem.c (ada_demangle): Add back ATTRIBUTE_UNUSED for
parameter `option'.
Do s/cplus_dem.c/cplus-dem.c/g on ChangeLog.

From-SVN: r37494
2000-11-16 09:12:47 +00:00
Kenneth Block 0437a5a8a8 cplus_dem.c: Eliminate use of DEFUN, it is obsolete and cannot be used in GCC.
* cplus_dem.c: Eliminate use of DEFUN, it is obsolete and cannot
	be used in GCC.

From-SVN: r37483
2000-11-15 17:35:20 +00:00
Kenneth Block 61ab980a02 cplus_dem.c: Add gnat demangler.
* cplus_dem.c: Add gnat demangler.  Add java to demangle style
	list.

From-SVN: r37475
2000-11-15 11:54:53 +00:00
Hans-Peter Nilsson 2979107801 demangle-expected: Add two tests for anonymous namespaces.
* testsuite/demangle-expected: Add two tests for anonymous
	namespaces.
	* cplus-dem.c (gnu_special): Handle anonymous namespaces.

From-SVN: r36398
2000-09-13 23:09:30 +00:00
Hans-Peter Nilsson bb22da4b6d demangle-expected: Add four tests for type_info mangling.
* testsuite/demangle-expected: Add four tests for type_info
	mangling.

	* cplus-dem.c (gnu_special): Use do_type, not demangle_fund_type,
	for a non-template non-qualified type_info function or node.

From-SVN: r36301
2000-09-10 19:35:16 +00:00
Alex Samuel 31e0ab1f76 In include:
* dyn-string.h: Adjust formatting.
        (dyn_string_insert_char): New macro.  New declaration.

In libiberty:

        * cp-demangle.c (ANONYMOUS_NAMESPACE_PREFIX): New macro.
        (substitution_def): Remove template_parm_number.
        (NOT_TEMPLATE_PARM): Remove.
        (result_insert_string): New macro.
        (result_insert): Likewise.
        (result_insert_char): Likewise.
        (substitution_add): Remove last parameter.  Don't store template
        parm number.
        (BFT_NO_RETURN_TYPE): Define as NULL.
        (demangle_encoding): Adjust call to demangle_bare_function_type.
        (demangle_name): Adjust substitution.  Adjust call to
        substitution_add.
        (demangle_prefix): Adjust call to substitution_add.
        (demangle_identifier): Handle anonymous namespaces.
        (demangle_operator_name): Change demangling of vendor-extended
        operator to match ABI changes.
        (demangle_type_ptr): Change parameters.  Make recursive.  Handle
        substitutions here.
        (demangle_type): Adjust calls to demangle_template_param,
        substitution_add, and demangle_type_ptr.  Fix substitution of
        templated types.
        (demangle_function_type): Change parameter to a pointer.
        (demangle_bare_function_type): Likewise.  Adjust insertion point.
        (demangle_template_param): Remove last parameter.
        (demangle_expr_primary): Remove unused variable.  Adjust call to
        demangle_template_param.
        (is_mangled_char): Accept `$' and `.'.
        * cplus-dem.c (gnu_new_abi_symbol_characters): Add '$' and '.'.
        * dyn-string.c (dyn_string_insert_char): New function.

From-SVN: r36148
2000-09-05 01:01:12 +00:00
Greg McGary 2f26c11dbb cplus-dem.c (cplus_demangle_opname, [...]): Use ARRAY_SIZE.
* libiberty/cplus-dem.c (cplus_demangle_opname, cplus_mangle_opname,
	demangle_expression, demangle_function_name): Use ARRAY_SIZE.
	* libiberty/random.c (end_ptr): Likewise.

From-SVN: r35948
2000-08-24 20:29:48 +00:00
Daniel Berlin 3388651ce0 cplus-dem.c (demangle_signature): Change if (GNU_DEMANGLING) to if (AUTO_DEMANGLING || GNU_DEMANGLING)
* cplus-dem.c (demangle_signature): Change if (GNU_DEMANGLING) to
        if (AUTO_DEMANGLING || GNU_DEMANGLING)

From-SVN: r35652
2000-08-11 20:55:05 -04:00
Joseph Myers e995813266 cplus-dem.c (demangle_fund_type): Make 'dec' an unsigned int, and print it with %u.
* cplus-dem.c (demangle_fund_type): Make 'dec' an unsigned int,
        and print it with %u.

From-SVN: r35153
2000-07-20 13:58:34 -06:00
Andrew Haley 6d0be3693d cplus-dem.c (main): fflush() after emitting last char before waiting for input.
2000-07-07  Andrew Haley  <aph@cygnus.com>

	* cplus-dem.c (main): fflush() after emitting last char before
	waiting for input.

From-SVN: r34902
2000-07-07 13:50:49 +00:00
Alex Samuel 69afa80d10 In include,
* dyn-string.h: Move here from gcc/dyn-string.h.  Add new functions.

	* demangle.h (DMGL_GNU_NEW_ABI): New macro.
	(DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI.
	(current_demangling_style): Add gnu_new_abi_demangling.
	(GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro.
	(GNU_NEW_ABI_DEMANGLING): Likewise.
	(cplus_demangle_new_abi): New declaration.

In libiberty,

	* Makefile.in (CFILES): Add cp-demangle.c and dyn-string.c.
	(REQUIRED_OFILES): Add cp-demangle.o and dyn-string.o.
	(cp-demangle.o): New dependency.
	(dyn-string.o): Likewise.

	* dyn-string.c: Move here from gcc/dyn-string.c.  Add new functions.

	* cplus-dem.c (libiberty_demanglers): Add initializer for new-ABI
	demangler.
	(cplus_demangle): Call cplus_demangle_new_abi if in new-ABI
	demangling mode.
	(gnu_new_abi_symbol_characters): New function.
	(main): Use gnu_new_abi_symbol_characters.  * cp-demangle.c: New
	file.
	* cp-demangle.c: New file.

From-SVN: r34397
2000-06-05 02:28:41 +00:00
Kaveh R. Ghazi a85a47fbf4 demangle.h (demangler_engine): Constify.
include:
	* demangle.h (demangler_engine): Constify.

libiberty:
	* cplus-dem.c (cplus_demangle_opname, demangle_function_name):
	Cast the arguments to `islower' to `unsigned char'.
	(print_demangler_list): Prototype.

From-SVN: r33679
2000-05-04 18:21:03 +00:00
Kenneth Block 24eaa47a46 * libiberty/cplus-dem.c
(libiberty_demanglers): new table for demangle styles
        (cplus_demangle_set_style): New function for setting style
        (cplus_demangle_name_to_style): New function to translate name
        * include/demangle.h
        (libiberty_demanglers): new table for different styles
        (cplus_demangle_set_style): New function for setting style
        (cplus_demangle_name_to_style): New function to translate name

Co-Authored-By: Jason Merrill <jason@casey.cygnus.com>

From-SVN: r33525
2000-04-28 18:22:22 -04:00
Dave Pitts 498e1ab148 * cplus-dem.c (cplus_demangle_opname): Changed to use islower.
From-SVN: r33189
2000-04-16 17:51:19 -07:00
Jim Kingdon a82cecdad5 cplus-dem.c: Move declarations of standard_symbol_characters and hp_symbol_characters inside...
* cplus-dem.c: Move declarations of standard_symbol_characters and
        hp_symbol_characters inside #ifdef MAIN to avoid compiler
        warnings.

From-SVN: r30175
1999-10-25 22:30:08 -06:00
Mark Mitchell b60fe4a75b cplus-dem.c (INTBUF_SIZE): New macro.
* cplus-dem.c (INTBUF_SIZE): New macro.
	(string_append_template_idx): New function.
	(demangle_expression): Likewise.
	(demangle_integral_value): Use it.
	(demangle_real_value): New function, split out from ...
	(demangle_template_value_parm): ... here.  Use
	string_append_template_idx.  Use demangle_real_value.
	(demangle_template): Use string_append_template_idx.
	(demangle_qualified): Use consume_count_with_underscores.
	(get_count): Tweak formatting.
	(do_type): Use string_append_template_idx.

From-SVN: r30091
1999-10-19 17:52:52 +00:00
Mark Mitchell 7c56a6cef7 cplus-dem.c (do_type): Handle pointer to member types whose enclosing classes have namespace scope.
* cplus-dem.c (do_type): Handle pointer to member types whose
	enclosing classes have namespace scope.

From-SVN: r29901
1999-10-11 08:32:10 +00:00
Kaveh R. Ghazi 2a138827f0 cplus-dem.c (fancy_abort, [...]): Add prototype.
* cplus-dem.c (fancy_abort, demangle_integral_value,
	demangle_arm_hp_template, recursively_demangle,
	standard_symbol_characters, hp_symbol_characters, main): Add prototype.
	(program_name, program_version, fatal): Constify a char*.
	(usage, fatal): Mark with ATTRIBUTE_NORETURN.
	(main): Call return, not exit.

From-SVN: r29776
1999-10-02 20:03:15 +00:00
Kaveh R. Ghazi e797ff7048 Warning fixes:
* cplus-dem.c (gnu_special): Cast a `size_t' to `long' when
	comparing against a signed quantity.
	(arm_special): Likewise.
	(demangle_fund_type): Likewise.
	(do_hpacc_template_const_value): Mark parameter `work' with
	ATTRIBUTE_UNUSED.
	(main): Constify variable `valid_symbols'.

From-SVN: r28859
1999-08-25 13:29:34 +00:00
Stu Grossman 53504016e1 cplus-dem.c (demangle_fund_type (near 'I' case)): Don't advance the *mangled pointer beyond the end of the string.
* cplus-dem.c (demangle_fund_type (near 'I' case)): Don't advance
        the *mangled pointer beyond the end of the string.  Clean up code to
        match prevailing coding style.

From-SVN: r26959
1999-05-16 18:44:09 -06:00
Marc Espie 3a08531df2 cplus-dem.c (standard_symbol_characters): Renamed from standard_symbol_alphabet.
* cplus-dem.c (standard_symbol_characters): Renamed from
        standard_symbol_alphabet.  No longer modify TABLE.
        (hp_symbol_characters): Renamed from hp_symbol_alphabet.  No longer
        modify TABLE.
        (main): Corresponding changes.  Use strchr to determine if a
        character is valid.

From-SVN: r26912
1999-05-12 18:24:18 -06:00