Commit 47fd14f4 by Ian Lance Taylor

Add const where appropriate

From-SVN: r11064
parent 841faeed
/* Demangler for GNU C++ /* Demangler for GNU C++
Copyright 1989, 1991, 1994, 1995 Free Software Foundation, Inc. Copyright 1989, 1991, 1994, 1995, 1996 Free Software Foundation, Inc.
Written by James Clark (jjc@jclark.uucp) Written by James Clark (jjc@jclark.uucp)
Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
...@@ -323,7 +323,7 @@ consume_count (type) ...@@ -323,7 +323,7 @@ consume_count (type)
int int
cplus_demangle_opname (opname, result, options) cplus_demangle_opname (opname, result, options)
char *opname; const char *opname;
char *result; char *result;
int options; int options;
{ {
...@@ -450,9 +450,9 @@ cplus_demangle_opname (opname, result, options) ...@@ -450,9 +450,9 @@ cplus_demangle_opname (opname, result, options)
If OPTIONS & DMGL_ANSI == 1, return the ANSI name; If OPTIONS & DMGL_ANSI == 1, return the ANSI name;
if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */ if OPTIONS & DMGL_ANSI == 0, return the old GNU name. */
char * const char *
cplus_mangle_opname (opname, options) cplus_mangle_opname (opname, options)
char *opname; const char *opname;
int options; int options;
{ {
int i; int i;
...@@ -464,7 +464,7 @@ cplus_mangle_opname (opname, options) ...@@ -464,7 +464,7 @@ cplus_mangle_opname (opname, options)
if (strlen (optable[i].out) == len if (strlen (optable[i].out) == len
&& (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI) && (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI)
&& memcmp (optable[i].out, opname, len) == 0) && memcmp (optable[i].out, opname, len) == 0)
return ((char *)optable[i].in); return optable[i].in;
} }
return (0); return (0);
} }
......
/* Defs for interface to demanglers. /* Defs for interface to demanglers.
Copyright 1992, 1995 Free Software Foundation, Inc. Copyright 1992, 1995, 1996 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -95,10 +95,10 @@ extern char * ...@@ -95,10 +95,10 @@ extern char *
cplus_demangle PARAMS ((const char *mangled, int options)); cplus_demangle PARAMS ((const char *mangled, int options));
extern int extern int
cplus_demangle_opname PARAMS ((char *opname, char *result, int options)); cplus_demangle_opname PARAMS ((const char *opname, char *result, int options));
extern char * extern const char *
cplus_mangle_opname PARAMS ((char *opname, int options)); cplus_mangle_opname PARAMS ((const char *opname, int options));
/* Note: This sets global state. FIXME if you care about multi-threading. */ /* Note: This sets global state. FIXME if you care about multi-threading. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment