-static void
-output_token_translations (void)
-{
- output_table_data (&format_obstack, token_translations,
- 0, 1, max_user_token_number + 1);
- muscle_insert ("translate", obstack_finish (&format_obstack));
- XFREE (token_translations);
+/*------------------------------------------------------------------.
+| Create a function NAME which Format the FIRST and then |
+| TABLE_DATA[BEGIN..END[ (of TYPE) into OOUT, and return the number |
+| of bits needed for its longuest value. |
+`------------------------------------------------------------------*/
+
+
+#define GENERATE_OUTPUT_TABLE(Name, Type) \
+ \
+static inline long int \
+Name (struct obstack *oout, \
+ Type *table_data, \
+ Type first, \
+ int begin, \
+ int end) \
+{ \
+ long int max = first; \
+ int i; \
+ int j = 1; \
+ \
+ obstack_fgrow1 (oout, "%6d", first); \
+ for (i = begin; i < end; ++i) \
+ { \
+ obstack_1grow (oout, ','); \
+ if (j >= 10) \
+ { \
+ obstack_sgrow (oout, "\n "); \
+ j = 1; \
+ } \
+ else \
+ ++j; \
+ obstack_fgrow1 (oout, "%6d", table_data[i]); \
+ if (table_data[i] > max) \
+ max = table_data[i]; \
+ } \
+ obstack_1grow (oout, 0); \
+ \
+ return max; \