blob: 9841d9c4fc23d20f492c67e75016a7df7116e8f4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#include <sqlite3.h>
sqlite3 *db;
struct attachment{
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 attachment *getattachment(sqlite3_stmt *, int);
struct post *getpost(sqlite3_stmt *, int);
struct user *getuser(sqlite3_stmt *, int);
|