2006-07-06 Andrew Stubbs <andrew.stubbs@st.com>
[deliverable/binutils-gdb.git] / gdb / c-lang.c
index ad8fa5c8ebd475ecdd88f584c8b64da987a4b173..48669a4bd91430b065d1723be2fbf98de1b74721 100644 (file)
@@ -1,6 +1,7 @@
 /* C language support routines for GDB, the GNU debugger.
-   Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002, 2003, 2004
-   Free Software Foundation, Inc.
+
+   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002,
+   2003, 2004, 2005 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,8 +17,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.  */
 
 #include "defs.h"
 #include "symtab.h"
@@ -85,8 +86,8 @@ c_printchar (int c, struct ui_file *stream)
    printing LENGTH characters, or if FORCE_ELLIPSES.  */
 
 void
-c_printstr (struct ui_file *stream, char *string, unsigned int length,
-           int width, int force_ellipses)
+c_printstr (struct ui_file *stream, const gdb_byte *string,
+           unsigned int length, int width, int force_ellipses)
 {
   unsigned int i;
   unsigned int things_printed = 0;
@@ -148,7 +149,7 @@ c_printstr (struct ui_file *stream, char *string, unsigned int length,
              in_quotes = 0;
            }
          LA_PRINT_CHAR (current_char, stream);
-         fprintf_filtered (stream, " <repeats %u times>", reps);
+         fprintf_filtered (stream, _(" <repeats %u times>"), reps);
          i = rep1 - 1;
          things_printed += repeat_count_threshold;
          need_comma = 1;
@@ -201,7 +202,7 @@ c_printstr (struct ui_file *stream, char *string, unsigned int length,
    gdb test suite since we don't have to account for the differences
    in output depending upon what the compiler and debugging format
    support.  We will probably have to re-examine the issue when gdb
-   starts taking it's fundamental type information directly from the
+   starts taking its fundamental type information directly from the
    debugging information supplied by the compiler.  fnf@cygnus.com */
 
 struct type *
@@ -219,7 +220,7 @@ c_create_fundamental_type (struct objfile *objfile, int typeid)
       type = init_type (TYPE_CODE_INT,
                        TARGET_INT_BIT / TARGET_CHAR_BIT,
                        0, "<?type?>", objfile);
-      warning ("internal error: no C/C++ fundamental type %d", typeid);
+      warning (_("internal error: no C/C++ fundamental type %d"), typeid);
       break;
     case FT_VOID:
       type = init_type (TYPE_CODE_VOID,
@@ -588,16 +589,13 @@ const struct language_defn c_language_defn =
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,                                /* Language specific symbol demangler */
   NULL,                                /* Language specific class_name_from_physname */
-  {"", "", "", ""},            /* Binary format info */
-  {"0%lo", "0", "o", ""},      /* Octal format info */
-  {"%ld", "", "d", ""},                /* Decimal format info */
-  {"0x%lx", "0x", "x", ""},    /* Hex format info */
   c_op_print_tab,              /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
   NULL,
   default_word_break_characters,
   c_language_arch_info,
+  default_print_array_index,
   LANG_MAGIC
 };
 
@@ -650,16 +648,13 @@ const struct language_defn cplus_language_defn =
   cp_lookup_transparent_type,   /* lookup_transparent_type */
   cplus_demangle,              /* Language specific symbol demangler */
   cp_class_name_from_physname,  /* Language specific class_name_from_physname */
-  {"", "", "", ""},            /* Binary format info */
-  {"0%lo", "0", "o", ""},      /* Octal format info */
-  {"%ld", "", "d", ""},                /* Decimal format info */
-  {"0x%lx", "0x", "x", ""},    /* Hex format info */
   c_op_print_tab,              /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
   &builtin_type_char,          /* Type of string elements */
   default_word_break_characters,
   NULL, /* FIXME: la_language_arch_info.  */
+  default_print_array_index,
   LANG_MAGIC
 };
 
@@ -689,16 +684,13 @@ const struct language_defn asm_language_defn =
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,                                /* Language specific symbol demangler */
   NULL,                                /* Language specific class_name_from_physname */
-  {"", "", "", ""},            /* Binary format info */
-  {"0%lo", "0", "o", ""},      /* Octal format info */
-  {"%ld", "", "d", ""},                /* Decimal format info */
-  {"0x%lx", "0x", "x", ""},    /* Hex format info */
   c_op_print_tab,              /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
   NULL,
   default_word_break_characters,
   c_language_arch_info, /* FIXME: la_language_arch_info.  */
+  default_print_array_index,
   LANG_MAGIC
 };
 
@@ -733,16 +725,13 @@ const struct language_defn minimal_language_defn =
   basic_lookup_transparent_type,/* lookup_transparent_type */
   NULL,                                /* Language specific symbol demangler */
   NULL,                                /* Language specific class_name_from_physname */
-  {"", "", "", ""},            /* Binary format info */
-  {"0%lo", "0", "o", ""},      /* Octal format info */
-  {"%ld", "", "d", ""},                /* Decimal format info */
-  {"0x%lx", "0x", "x", ""},    /* Hex format info */
   c_op_print_tab,              /* expression operators for printing */
   1,                           /* c-style arrays */
   0,                           /* String lower bound */
   NULL,
   default_word_break_characters,
   c_language_arch_info,
+  default_print_array_index,
   LANG_MAGIC
 };
 
This page took 0.03522 seconds and 4 git commands to generate.