+#include "libpspp/compiler.h"
+#include <assert.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <stdint.h>
+#include <string.h>
+#include "libpspp/cast.h"
+#include "libpspp/str.h"
+#include "gl/xalloc.h"
+\f
+/* A numeric or string value. The client is responsible for keeping track of
+ the value's width. */
+union value
+ {
+ double f;
+ uint8_t *s;
+ };
+
+static inline void value_init (union value *, int width);
+static inline void value_clone (union value *, const union value *, int width);
+static inline bool value_needs_init (int width);
+static inline bool value_try_init (union value *, int width);
+static inline void value_destroy (union value *, int width);
+
+static inline void value_copy (union value *, const union value *, int width);
+void value_copy_rpad (union value *, int dst_width,
+ const union value *, int src_width,
+ char pad);
+void value_copy_str_rpad (union value *, int dst_width, const uint8_t *,
+ char pad);
+void value_copy_buf_rpad (union value *dst, int dst_width,
+ const uint8_t *src, size_t src_len, char pad);
+void value_set_missing (union value *, int width);
+int value_compare_3way (const union value *, const union value *, int width);
+bool value_equal (const union value *, const union value *, int width);
+unsigned int value_hash (const union value *, int width, unsigned int basis) WARN_UNUSED_RESULT;
+
+bool value_is_resizable (const union value *, int old_width, int new_width);
+bool value_needs_resize (int old_width, int new_width);
+void value_resize (union value *, int old_width, int new_width);
+
+static inline struct substring value_ss (const union value *, int width);