X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fjv-typeprint.c;h=cc0f2bb7ed428cbb31ad9b42a403fb06976ff833;hb=62c4f6b3c9ff0f90d0a6ac409128f5c13a4c304c;hp=893082cc187ebb9e7498024cc670c2bad7c60768;hpb=2ee563b53258d390d7446e90a67f465d504ae44c;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/jv-typeprint.c b/gdb/jv-typeprint.c index 893082cc18..cc0f2bb7ed 100644 --- a/gdb/jv-typeprint.c +++ b/gdb/jv-typeprint.c @@ -1,11 +1,11 @@ /* Support for printing Java types for GDB, the GNU debugger. - Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1997, 1998, 1999, 2000, 2007 Free Software Foundation, Inc. This file is part of GDB. 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 - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,9 +14,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ + along with this program. If not, see . */ #include "defs.h" @@ -86,8 +84,8 @@ static void java_type_print_base (struct type *type, struct ui_file *stream, int show, int level) { - register int i; - register int len; + int i; + int len; char *mangled_name; char *demangled_name; QUIT; @@ -166,12 +164,12 @@ java_type_print_base (struct type *type, struct ui_file *stream, int show, { QUIT; /* Don't print out virtual function table. */ - if (STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5) + if (strncmp (TYPE_FIELD_NAME (type, i), "_vptr", 5) == 0 && is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5])) continue; /* Don't print the dummy field "class". */ - if (STREQN (TYPE_FIELD_NAME (type, i), "class", 5)) + if (strncmp (TYPE_FIELD_NAME (type, i), "class", 5) == 0) continue; print_spaces_filtered (level + 4, stream); @@ -216,7 +214,7 @@ java_type_print_base (struct type *type, struct ui_file *stream, int show, n_overloads = TYPE_FN_FIELDLIST_LENGTH (type, i); method_name = TYPE_FN_FIELDLIST_NAME (type, i); name = type_name_no_tag (type); - is_constructor = name && STREQ (method_name, name); + is_constructor = name && strcmp (method_name, name) == 0; for (j = 0; j < n_overloads; j++) { @@ -338,6 +336,6 @@ java_print_type (struct type *type, char *varstring, struct ui_file *stream, /* For demangled function names, we have the arglist as part of the name, so don't print an additional pair of ()'s */ - demangled_args = strchr (varstring, '(') != NULL; + demangled_args = varstring != NULL && strchr (varstring, '(') != NULL; c_type_print_varspec_suffix (type, stream, show, 0, demangled_args); }