Beginning of VFM cleanup.
[pspp-builds.git] / src / format.h
index ad6d2f7ba5d39caf45a6f887a8ed699f0bb15d86..7f4b5442799f1aaa731f3a3906bf63414c0d70f4 100644 (file)
@@ -25,8 +25,7 @@
    this list:
    misc.c:convert_fmt_ItoO()
    sfm-read.c:parse_format_spec()
-   data-in.c:parse_string_as_format()
-   data-out.c:convert_format_to_string(). */
+   data-in.c:parse_string_as_format() */
 #define DEFFMT(LABEL, NAME, N_ARGS, IMIN_W, IMAX_W, OMIN_W, OMAX_W,    \
               CAT, OUTPUT, SPSS_FMT)                                   \
        LABEL,
@@ -77,15 +76,19 @@ extern const int translate_fmt[40];
 
 union value;
 
+/* Maximum length of formatted value, in character. */
+#define MAX_FORMATTED_LEN 256
+
 int parse_format_specifier (struct fmt_spec *input, int allow_xt);
 int parse_format_specifier_name (const char **cp, int allow_xt);
 int check_input_specifier (const struct fmt_spec *spec);
 int check_output_specifier (const struct fmt_spec *spec);
 int check_string_specifier (const struct fmt_spec *spec, int min_len);
 void convert_fmt_ItoO (const struct fmt_spec *input, struct fmt_spec *output);
+int get_format_var_width (const struct fmt_spec *);
 int parse_string_as_format (const char *s, int len, const struct fmt_spec *fp,
                            int fc, union value *v);
-int data_out (char *s, const struct fmt_spec *fp, const union value *v);
+void data_out (char *s, const struct fmt_spec *fp, const union value *v);
 char *fmt_to_string (const struct fmt_spec *);
 void num_to_string (double v, char *s, int w, int d);