#include sqlite3 *db; struct att{ int id; int post; int bytes; char *name; char *description; char *mime; char *data; }; struct post{ int id; int parent; int user; int created; int edited; char *subject; char *text; }; struct user{ int id; char *name; char *full; char *hash; }; sqlite3_stmt *byid(char *, int); struct att *getatt(sqlite3_stmt *); struct post *getpost(sqlite3_stmt *); struct user *getuser(sqlite3_stmt *); struct att *nextatt(sqlite3_stmt *); struct post *nextpost(sqlite3_stmt *); struct user *nextuser(sqlite3_stmt *);