Implemented data-store using a casefile instead of an array of cases.
[pspp-builds.git] / src / data / format.c
index e88df4633b69e7cb186486d495360bc76957fa8b..a552f867cf338ce941a3759d5610be685c2ae676 100644 (file)
 #include <config.h>
 #include "format.h"
 #include <ctype.h>
-#include "message.h"
+#include <libpspp/message.h>
 #include <stdlib.h>
-#include "misc.h"
+#include <libpspp/compiler.h>
+#include <libpspp/misc.h>
 #include "identifier.h"
-#include "str.h"
+#include <libpspp/str.h>
 #include "variable.h"
 
 #include "gettext.h"
@@ -371,3 +372,19 @@ make_output_format (int type, int w, int d)
   assert (check_output_specifier (&f, 0));
   return f;
 }
+
+
+bool 
+measure_is_valid(enum measure m)
+{
+  if ( m <= 0 ) return false;
+  if ( m >= n_MEASURES) return false;
+  return true;
+}
+
+bool 
+alignment_is_valid(enum alignment a)
+{
+  if ( a >= n_ALIGN) return false;
+  return true;
+}