Copyright updates for 2007.
[deliverable/binutils-gdb.git] / gdb / p-typeprint.c
index 286f22d95a571ca236bedc67361f8bd3f8ad387d..f21a7f1b392a744e250962c6544169a9b62145a6 100644 (file)
@@ -1,6 +1,5 @@
 /* Support for printing Pascal types for GDB, the GNU debugger.
-   Copyright 2000, 2001, 2002
-   Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2006, 2007 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,7 +15,8 @@
 
    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.  */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor,
+   Boston, MA 02110-1301, USA.  */
 
 /* This file is derived from p-typeprint.c */
 
@@ -50,7 +50,7 @@ void
 pascal_print_type (struct type *type, char *varstring, struct ui_file *stream,
                   int show, int level)
 {
-  register enum type_code code;
+  enum type_code code;
   int demangled_args;
 
   code = TYPE_CODE (type);
@@ -139,8 +139,8 @@ void
 pascal_type_print_method_args (char *physname, char *methodname,
                               struct ui_file *stream)
 {
-  int is_constructor = STREQN (physname, "__ct__", 6);
-  int is_destructor = STREQN (physname, "__dt__", 6);
+  int is_constructor = DEPRECATED_STREQN (physname, "__ct__", 6);
+  int is_destructor = DEPRECATED_STREQN (physname, "__dt__", 6);
 
   if (is_constructor || is_destructor)
     {
@@ -207,19 +207,6 @@ pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
       pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 1);
       break;                   /* pointer should be handled normally in pascal */
 
-    case TYPE_CODE_MEMBER:
-      if (passed_a_ptr)
-       fprintf_filtered (stream, "(");
-      pascal_type_print_varspec_prefix (TYPE_TARGET_TYPE (type), stream, 0, 0);
-      fprintf_filtered (stream, " ");
-      name = type_name_no_tag (TYPE_DOMAIN_TYPE (type));
-      if (name)
-       fputs_filtered (name, stream);
-      else
-       pascal_type_print_base (TYPE_DOMAIN_TYPE (type), stream, 0, passed_a_ptr);
-      fprintf_filtered (stream, "::");
-      break;
-
     case TYPE_CODE_METHOD:
       if (passed_a_ptr)
        fprintf_filtered (stream, "(");
@@ -264,7 +251,7 @@ pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
       if (passed_a_ptr)
        fprintf_filtered (stream, "(");
       fprintf_filtered (stream, "array ");
-      if (TYPE_LENGTH (type) >= 0 && TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
+      if (TYPE_LENGTH (TYPE_TARGET_TYPE (type)) > 0
        && TYPE_ARRAY_UPPER_BOUND_TYPE (type) != BOUND_CANNOT_BE_DETERMINED)
        fprintf_filtered (stream, "[%d..%d] ",
                          TYPE_ARRAY_LOWER_BOUND_VALUE (type),
@@ -294,7 +281,7 @@ pascal_type_print_varspec_prefix (struct type *type, struct ui_file *stream,
          gcc -Wall will reveal any types that haven't been handled.  */
       break;
     default:
-      error ("type not handled in pascal_type_print_varspec_prefix()");
+      error (_("type not handled in pascal_type_print_varspec_prefix()"));
       break;
     }
 }
@@ -352,12 +339,6 @@ pascal_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
        fprintf_filtered (stream, ")");
       break;
 
-    case TYPE_CODE_MEMBER:
-      if (passed_a_ptr)
-       fprintf_filtered (stream, ")");
-      pascal_type_print_varspec_suffix (TYPE_TARGET_TYPE (type), stream, 0, 0, 0);
-      break;
-
     case TYPE_CODE_METHOD:
       if (passed_a_ptr)
        fprintf_filtered (stream, ")");
@@ -415,7 +396,7 @@ pascal_type_print_varspec_suffix (struct type *type, struct ui_file *stream,
          gcc -Wall will report types that may not have been considered.  */
       break;
     default:
-      error ("type not handled in pascal_type_print_varspec_suffix()");
+      error (_("type not handled in pascal_type_print_varspec_suffix()"));
       break;
     }
 }
@@ -440,9 +421,9 @@ void
 pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
                        int level)
 {
-  register int i;
-  register int len;
-  register int lastval;
+  int i;
+  int len;
+  int lastval;
   enum
     {
       s_none, s_public, s_private, s_protected
@@ -480,7 +461,6 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
     {
     case TYPE_CODE_TYPEDEF:
     case TYPE_CODE_PTR:
-    case TYPE_CODE_MEMBER:
     case TYPE_CODE_REF:
       /* case TYPE_CODE_FUNC:
          case TYPE_CODE_METHOD: */
@@ -559,7 +539,7 @@ pascal_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 (DEPRECATED_STREQN (TYPE_FIELD_NAME (type, i), "_vptr", 5)
                  && is_cplus_marker ((TYPE_FIELD_NAME (type, i))[5]))
                continue;
 
@@ -637,8 +617,8 @@ pascal_type_print_base (struct type *type, struct ui_file *stream, int show,
                {
                  char *physname = TYPE_FN_FIELD_PHYSNAME (f, j);
 
-                 int is_constructor = STREQN (physname, "__ct__", 6);
-                 int is_destructor = STREQN (physname, "__dt__", 6);
+                 int is_constructor = DEPRECATED_STREQN (physname, "__ct__", 6);
+                 int is_destructor = DEPRECATED_STREQN (physname, "__dt__", 6);
 
                  QUIT;
                  if (TYPE_FN_FIELD_PROTECTED (f, j))
This page took 0.035152 seconds and 4 git commands to generate.