-static struct expression *e;
-static int nop, mop;
-static int ndbl, mdbl;
-static int nstr, mstr;
-static int nvars, mvars;
-
-static void dump_node (union any_node * n);
-static void emit (int);
-static void emit_num_con (double);
-static void emit_str_con (char *, int);
-static void emit_var (struct variable *);
+struct expr_dump_state
+ {
+ struct expression *expr; /* Output expression. */
+ int op_cnt, op_cap; /* Number of ops, allocated space. */
+ int dbl_cnt, dbl_cap; /* Number of doubles, allocated space. */
+ int str_cnt, str_cap; /* Number of strings, allocated space. */
+ int var_cnt, var_cap; /* Number of variables, allocated space. */
+ };
+
+static void dump_node (struct expr_dump_state *, union any_node * n);
+static void emit (struct expr_dump_state *, int);
+static void emit_num_con (struct expr_dump_state *, double);
+static void emit_str_con (struct expr_dump_state *, char *, int);
+static void emit_var (struct expr_dump_state *, struct variable *);