+static inline void
+output_short_or_char_table (struct obstack *oout,
+ const char *comment,
+ const char *type,
+ const char *table_name,
+ short *short_table,
+ short first_value,
+ short begin, short end)
+{
+ int i, j;
+
+ if (comment)
+ obstack_fgrow1 (oout, "/* %s. */\n", comment);
+
+ obstack_fgrow3 (oout, "static const %s %s[] =\n{\n %6d",
+ type, table_name, first_value);
+
+ j = 1;
+ for (i = begin; i < end; i++)
+ {
+ obstack_1grow (oout, ',');
+
+ if (j >= 10)
+ {
+ obstack_grow_literal_string (oout, "\n ");
+ j = 1;
+ }
+ else
+ {
+ j++;
+ }
+
+ obstack_fgrow1 (oout, "%6d", short_table[i]);
+ }
+
+ obstack_grow_literal_string (oout, "\n};\n");
+}
+
+
+static inline void
+output_short_table (struct obstack *oout,
+ const char *comment,
+ const char *table_name,
+ short *short_table,
+ short first_value,
+ short begin, short end)
+{
+ output_short_or_char_table (oout, comment, "short", table_name, short_table,
+ first_value, begin, end);
+}
+
+
+/*--------------------------------------------------------------.
+| output_headers -- Output constant strings to the beginning of |
+| certain files. |
+`--------------------------------------------------------------*/
+
+/* Don't put the `%s' insides quotes, since it quotearg puts them. */
+