* h8300-dis.c: Fix formatting.
[binutils-gdb.git] / gdb / ax-general.c
index 6020ed7da1a62937a55a904763991b78e9bd33ea..0c851ebb7bf8083ac93e349651cc13b1bc93e378 100644 (file)
@@ -1,5 +1,5 @@
 /* Functions for manipulating expressions designed to be executed on the agent
-   Copyright 1998 Free Software Foundation, Inc.
+   Copyright 1998, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 
 #include "value.h"
 
-static void grow_expr PARAMS ((struct agent_expr * x, int n));
+static void grow_expr (struct agent_expr *x, int n);
 
-static void append_const PARAMS ((struct agent_expr * x, LONGEST val, int n));
+static void append_const (struct agent_expr *x, LONGEST val, int n);
 
-static LONGEST read_const PARAMS ((struct agent_expr * x, int o, int n));
+static LONGEST read_const (struct agent_expr *x, int o, int n);
 
-static void generic_ext PARAMS ((struct agent_expr * x, enum agent_op op, int n));
+static void generic_ext (struct agent_expr *x, enum agent_op op, int n);
 \f
 /* Functions for building expressions.  */
 
@@ -62,6 +62,18 @@ free_agent_expr (x)
   free (x);
 }
 
+static void
+do_free_agent_expr_cleanup (void *x)
+{
+  free_agent_expr (x);
+}
+
+struct cleanup *
+make_cleanup_free_agent_expr (struct agent_expr *x)
+{
+  return make_cleanup (do_free_agent_expr_cleanup, x);
+}
+
 
 /* Make sure that X has room for at least N more bytes.  This doesn't
    affect the length, just the allocated size.  */
@@ -350,7 +362,7 @@ struct aop_map aop_map[] =
 /* Disassemble the expression EXPR, writing to F.  */
 void
 ax_print (f, x)
-     GDB_FILE *f;
+     struct ui_file *f;
      struct agent_expr *x;
 {
   int i;