X-Git-Url: http://git.bytex64.net/?a=blobdiff_plain;f=database%2Fdatabase.h;h=2f71beebe2e4f9964ae6dba3ca2e5c43e0db038d;hb=efabc7da2c7dff11ab6835d23655a023f1cbc296;hp=0ef1c7ddc299342245cb6e68ff4c4f6acb277f47;hpb=1cf0f1ebfbd5b5a621af2a49ac0328fd0cec4bf4;p=blerg.git diff --git a/database/database.h b/database/database.h index 0ef1c7d..2f71bee 100644 --- a/database/database.h +++ b/database/database.h @@ -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 #include +#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; @@ -34,5 +40,6 @@ int blerg_close(struct blerg *); int blerg_store(struct blerg *, const char *, int); int blerg_fetch(struct blerg *, int, char **, int *); uint64_t blerg_get_record_count(struct blerg *); +time_t blerg_get_timestamp(struct blerg *blerg, int record); #endif //_DATABASE_H