projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix problem where entry strings got mangled
[pspp]
/
src
/
data
/
format.h
diff --git
a/src/data/format.h
b/src/data/format.h
index 88b49a5a38a522547364cf592f81ccbf176fe1ae..15d13ef958d4e2c42b3a12c443bada7b0a946cf8 100644
(file)
--- a/
src/data/format.h
+++ b/
src/data/format.h
@@
-69,6
+69,8
@@
struct fmt_spec
int d; /* Number of implied decimal places. */
};
int d; /* Number of implied decimal places. */
};
+/* Maximum width of any numeric format. */
+#define FMT_MAX_NUMERIC_WIDTH 40
/* A numeric output style. */
struct fmt_number_style
/* A numeric output style. */
struct fmt_number_style
@@
-108,12
+110,19
@@
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);
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;
/* 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_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;