Clean up some error handling in tag listing
[blerg.git] / database / database.h
index d128869..2f71bee 100644 (file)
@@ -1,9 +1,15 @@
+/* Blerg is (C) 2011 The Dominion of Awesome, and is distributed under a
+ * BSD-style license.  Please see the COPYING file for details.
+ */
 #ifndef _DATABASE_H
 #define _DATABASE_H
 
 #include <stdint.h>
 #include <time.h>
 
+#define VALID_CHAR(c) ((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || c == '_')
+#define WHITESPACE(c) (c == ' ' || c == '\t' || c == '\n' || c == '\r')
+
 struct record {
        uint32_t offset;
        uint16_t length;