* aix5ppc-core.c: Define macros for the default architecture and
[deliverable/binutils-gdb.git] / gdb / macroexp.c
index 2c7b6823661aec6c33e9b783532b5666c3d9bc8b..f85cb4b13584dd9c7a76df048675ae6b296a04ac 100644 (file)
@@ -1,12 +1,12 @@
 /* C preprocessor macro expansion for GDB.
-   Copyright 2002 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc.
    Contributed by Red Hat, 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,
@@ -15,9 +15,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 <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 #include "gdb_obstack.h"
@@ -81,9 +79,6 @@ struct macro_buffer
 static void
 init_buffer (struct macro_buffer *b, int n)
 {
-  /* Small value for initial testing.  */
-  n = 1;
-
   b->size = n;
   if (n > 0)
     b->text = (char *) xmalloc (n);
@@ -616,7 +611,7 @@ append_tokens_without_splicing (struct macro_buffer *dest,
   /* As far as I know, there's no case where inserting a space isn't
      enough to prevent a splice.  */
   internal_error (__FILE__, __LINE__,
-                  "unable to avoid splicing tokens during macro expansion");
+                  _("unable to avoid splicing tokens during macro expansion"));
 }
 
 
@@ -715,7 +710,7 @@ gather_arguments (const char *name, struct macro_buffer *src, int *argc_p)
   get_token (&tok, src);
 
   args_len = 0;
-  args_size = 1;                /* small for initial testing */
+  args_size = 6;
   args = (struct macro_buffer *) xmalloc (sizeof (*args) * args_size);
 
   for (;;)
@@ -927,7 +922,7 @@ expand (const char *id,
   else if (def->kind == macro_function_like)
     {
       struct cleanup *back_to = make_cleanup (null_cleanup, 0);
-      int argc;
+      int argc = 0;
       struct macro_buffer *argv = NULL;
       struct macro_buffer substituted;
       struct macro_buffer substituted_src;
@@ -991,7 +986,7 @@ expand (const char *id,
       return 1;
     }
   else
-    internal_error (__FILE__, __LINE__, "bad macro definition kind");
+    internal_error (__FILE__, __LINE__, _("bad macro definition kind"));
 }
 
 
This page took 0.029752 seconds and 4 git commands to generate.