src/data/any-reader.c (any_reader_may_open): Return tri-state value.
[pspp] / src / data / any-reader.h
index fb36e99ccec87af844dd94249296901d69b0d130..063a7e650ecee3f335fa9078c8035982f54f2ace 100644 (file)
 
 #include <stdbool.h>
 
+/* Result of type detection. */
+enum detect_result
+  {
+    ANY_YES,                        /* It is this type. */
+    ANY_NO,                         /* It is not this type. */
+    ANY_ERROR                    /* File couldn't be opened. */
+  };
+
+
 struct file_handle;
 struct dictionary;
-bool any_reader_may_open (const char *file_name);
+enum detect_result any_reader_may_open (const char *file_name);
 struct casereader *any_reader_open (struct file_handle *, const char *encoding,
                                     struct dictionary **);