+extern struct fmt_number_style *the_styles ;
+
+
+/* Initialization. */
+struct fmt_number_style * fmt_create (void);
+void fmt_done (struct fmt_number_style *);
+
+/* Constructing formats. */
+struct fmt_spec fmt_for_input (enum fmt_type, int w, int d) PURE_FUNCTION;
+struct fmt_spec fmt_for_output (enum fmt_type, int w, int d) PURE_FUNCTION;
+struct fmt_spec fmt_for_output_from_input (const struct fmt_spec *);
+struct fmt_spec fmt_default_for_width (int width);
+
+/* Verifying formats. */
+bool fmt_check (const struct fmt_spec *, bool for_input);
+bool fmt_check_input (const struct fmt_spec *);
+bool fmt_check_output (const struct fmt_spec *);
+bool fmt_check_type_compat (const struct fmt_spec *, enum val_type);
+bool fmt_check_width_compat (const struct fmt_spec *, int var_width);
+
+/* Working with formats. */
+int fmt_var_width (const struct fmt_spec *);
+char *fmt_to_string (const struct fmt_spec *, char s[FMT_STRING_LEN_MAX + 1]);
+bool fmt_equal (const struct fmt_spec *, const struct fmt_spec *);
+void fmt_resize (struct fmt_spec *, int new_width);
+
+void fmt_fix (struct fmt_spec *, bool for_input);
+void fmt_fix_input (struct fmt_spec *);
+void fmt_fix_output (struct fmt_spec *);
+
+/* Format types. */
+const char *fmt_name (enum fmt_type) PURE_FUNCTION;
+bool fmt_from_name (const char *name, enum fmt_type *);
+
+bool fmt_takes_decimals (enum fmt_type) PURE_FUNCTION;
+
+int fmt_min_width (enum fmt_type, bool for_input) PURE_FUNCTION;
+int fmt_max_width (enum fmt_type, bool for_input) PURE_FUNCTION;
+int fmt_max_decimals (enum fmt_type, int width, bool for_input) PURE_FUNCTION;
+int fmt_min_input_width (enum fmt_type) PURE_FUNCTION;
+int fmt_max_input_width (enum fmt_type) PURE_FUNCTION;
+int fmt_max_input_decimals (enum fmt_type, int width) PURE_FUNCTION;
+int fmt_min_output_width (enum fmt_type) PURE_FUNCTION;
+int fmt_max_output_width (enum fmt_type) PURE_FUNCTION;
+int fmt_max_output_decimals (enum fmt_type, int width) PURE_FUNCTION;
+int fmt_step_width (enum fmt_type) PURE_FUNCTION;
+
+bool fmt_is_string (enum fmt_type) PURE_FUNCTION;
+bool fmt_is_numeric (enum fmt_type) PURE_FUNCTION;
+enum fmt_category fmt_get_category (enum fmt_type) PURE_FUNCTION;
+
+enum fmt_type fmt_input_to_output (enum fmt_type) PURE_FUNCTION;
+bool fmt_usable_for_input (enum fmt_type) PURE_FUNCTION;
+
+int fmt_to_io (enum fmt_type) PURE_FUNCTION;
+bool fmt_from_io (int io, enum fmt_type *);
+
+const char *fmt_date_template (enum fmt_type) PURE_FUNCTION;
+\f
+/* Maximum length of prefix or suffix string in
+ struct fmt_number_style. */
+#define FMT_STYLE_AFFIX_MAX 16
+
+
+struct fmt_number_style *fmt_number_style_create (void);
+void fmt_number_style_destroy (struct fmt_number_style *);