+2007-04-22 Ben Pfaff <blp@gnu.org>
+
+ * value.c (value_copy): New function.
+ (value_set_missing): Ditto.
+
2007-04-22 John Darrington <john@darrington.wattle.id.au>
* Deleted existing category.h and moved cat-routines.h into
? hsh_hash_double (v->f)
: hsh_hash_bytes (v->s, MIN (MAX_SHORT_STRING, width)));
}
+
+/* Copies SRC to DST, given that they both contain data of the
+ given WIDTH. */
+void
+value_copy (union value *dst, const union value *src, int width)
+{
+ if (width == 0)
+ dst->f = src->f;
+ else
+ memcpy (dst->s, src->s, width);
+}
+
+/* Sets V to the system-missing value for data of the given
+ WIDTH. */
+void
+value_set_missing (union value *v, int width)
+{
+ if (width == 0)
+ v->f = SYSMIS;
+ else
+ memset (v->s, ' ', width);
+}
int compare_values (const union value *, const union value *, int width);
unsigned hash_value (const union value *, int width);
+void value_copy (union value *, const union value *, int width);
+void value_set_missing (union value *, int width);
+
#endif /* !value.h */