+ if (width != -1)
+ {
+ if (width == 0)
+ v->f = SYSMIS;
+ else
+ memset (v->s, ' ', width);
+ }
+}
+
+/* Compares A and B, which both have the given WIDTH, and returns
+ a strcmp()-type result. */
+int
+value_compare_3way (const union value *a, const union value *b, int width)
+{
+ return (width == -1 ? 0
+ : width == 0 ? (a->f < b->f ? -1 : a->f > b->f)
+ : memcmp (a->s, b->s, width));
+}
+
+/* Returns true if A and B, which must both have the given WIDTH,
+ have equal contents, false if their contents differ. */
+bool
+value_equal (const union value *a, const union value *b, int width)
+{
+ return (width == -1 ? true
+ : width == 0 ? a->f == b->f
+ : !memcmp (a->s, b->s, width));
+}
+
+/* Returns a hash of the data in VALUE, which must have the given
+ WIDTH, folding BASIS into the hash value calculation. */
+unsigned int
+value_hash (const union value *value, int width, unsigned int basis)
+{
+ return (width == -1 ? basis
+ : width == 0 ? hash_double (value->f, basis)
+ : hash_bytes (value->s, width, basis));