You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "config.h"
#include "bfd.h"
usage (FILE *stream, int status)
{
fprintf (stream, "\
-Usage: %s [-_] [-n] [--strip-underscores] [--no-strip-underscores] \n",
+Usage: %s [-_] [-n] [--strip-underscores] [--no-strip-underscores]\n\
+ [-p] [--no-params]\n",
program_name);
fprintf (stream, "\
exit (status);
}
-#define MBUF_SIZE 32767
-char mbuffer[MBUF_SIZE];
+static char mbuffer[32767];
int strip_underscore = 0;
{"strip-underscores", no_argument, 0, '_'},
{"format", required_argument, 0, 's'},
{"help", no_argument, 0, 'h'},
+ {"no-params", no_argument, 0, 'p'},
{"no-strip-underscores", no_argument, 0, 'n'},
{"version", no_argument, 0, 'v'},
{0, no_argument, 0, 0}
program_name = argv[0];
xmalloc_set_program_name (program_name);
+ expandargv (&argc, &argv);
+
strip_underscore = TARGET_PREPENDS_UNDERSCORE;
- while ((c = getopt_long (argc, argv, "_ns:", long_options, (int *) 0)) != EOF)
+ while ((c = getopt_long (argc, argv, "_nps:", long_options, (int *) 0)) != EOF)
{
switch (c)
{
case 'n':
strip_underscore = 0;
break;
+ case 'p':
+ flags &= ~ DMGL_PARAMS;
+ break;
case 'v':
print_version ("c++filt");
return (0);
for (;;)
{
- int i = 0;
+ unsigned i = 0;
c = getchar ();
/* Try to read a label. */
while (c != EOF && (ISALNUM (c) || strchr (valid_symbols, c)))
{
- if (i >= MBUF_SIZE-1)
+ if (i >= sizeof (mbuffer) - 1)
break;
mbuffer[i++] = c;
c = getchar ();
}
if (i > 0)
{
- int skip_first = 0;
+ unsigned skip_first = 0;
mbuffer[i] = 0;
if (mbuffer[0] == '.' || mbuffer[0] == '$')