Add const where appropriate
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 18 Jan 1996 16:30:48 +0000 (16:30 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 18 Jan 1996 16:30:48 +0000 (16:30 +0000)
From-SVN: r11064

gcc/cplus-dem.c
gcc/demangle.h

index 3eb27cc9b847c9f237274db0867715457a7a19cf..53a668dda5a323e3496e1cdcfe3e2c2d8498c786 100644 (file)
@@ -1,5 +1,5 @@
 /* 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)
    Rewritten by Fred Fish (fnf@cygnus.com) for ARM and Lucid demangling
    
@@ -323,7 +323,7 @@ consume_count (type)
 
 int
 cplus_demangle_opname (opname, result, options)
-     char *opname;
+     const char *opname;
      char *result;
      int options;
 {
@@ -450,9 +450,9 @@ cplus_demangle_opname (opname, result, options)
    If OPTIONS & DMGL_ANSI == 1, return the ANSI name;
    if OPTIONS & DMGL_ANSI == 0, return the old GNU name.  */
 
-char *
+const char *
 cplus_mangle_opname (opname, options)
-     char *opname;
+     const char *opname;
      int options;
 {
   int i;
@@ -464,7 +464,7 @@ cplus_mangle_opname (opname, options)
       if (strlen (optable[i].out) == len
          && (options & DMGL_ANSI) == (optable[i].flags & DMGL_ANSI)
          && memcmp (optable[i].out, opname, len) == 0)
-       return ((char *)optable[i].in);
+       return optable[i].in;
     }
   return (0);
 }
index 8dcd5fd06a6500259bdcce2ed758821da16389c5..d4d0a3f428e3768c36851994de53900e809f8370 100644 (file)
@@ -1,5 +1,5 @@
 /* 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
    it under the terms of the GNU General Public License as published by
@@ -95,10 +95,10 @@ extern char *
 cplus_demangle PARAMS ((const char *mangled, int options));
 
 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 *
-cplus_mangle_opname PARAMS ((char *opname, int options));
+extern const char *
+cplus_mangle_opname PARAMS ((const char *opname, int options));
 
 /* Note: This sets global state.  FIXME if you care about multi-threading. */