+#include <stddef.h>
+
+struct dictionary;
+
+/* A variable in a system file. */
+struct sfm_var
+ {
+ int var_width; /* Variable width (0 to 32767). */
+ int segment_width; /* Segment width (0 to 255). */
+ int case_index; /* Index into case. */
+
+ /* The following members are interesting only for string
+ variables (width != 0). For numeric variables (width ==
+ 0) their values are always 0.
+
+ Note: width + padding is always a multiple of 8. */
+ int offset; /* Offset within string variable in case. */
+ int padding; /* Number of padding bytes following data. */
+ };
+
+int sfm_dictionary_to_sfm_vars (const struct dictionary *,
+ struct sfm_var **, size_t *);
+
+int sfm_width_to_octs (int width);
+int sfm_width_to_segments (int width);
+
+int sfm_segment_effective_offset (int width, int segment);
+int sfm_segment_alloc_width (int width, int segment);
+
+/* A mapping between an encoding name and a Windows codepage. */
+struct sys_encoding
+ {
+ int number;
+ const char *name;
+ };