Implemented the find dialog.
[pspp-builds.git] / src / data / value.c
index e9411c8cefa976ff4a4c46d94db837e9eefffb23..cd52f147ca3a0f4fd924c40861788cfc22081623 100644 (file)
@@ -30,6 +30,16 @@ value_dup (const union value *val, int width)
   return xmemdup (val, MAX (width, sizeof *val));
 }
 
+
+/* Create a value of specified width.
+   The caller is responsible for freeing the returned value. */
+union value *
+value_create (int width)
+{
+  return xnmalloc (value_cnt_from_width (width), sizeof (union value));
+}
+
+
 /* Compares A and B, which both have the given WIDTH, and returns
    a strcmp()-type result.
    Only the short string portion of longer strings are