proper init and prototyping
This commit is contained in:
parent
1c791c3e6e
commit
677b9ed665
@ -17,12 +17,14 @@ DECL void clean_creds(void);
|
||||
|
||||
DECL int parse_admin_list(char const * admin_list_file);
|
||||
DECL int is_admin(char const * user);
|
||||
DECL void clean_admin_list();
|
||||
DECL void clean_admin_list();
|
||||
|
||||
DECL char * remind(char * who);
|
||||
DECL void set_repo(const char * const who, const char * const link);
|
||||
DECL char * dump(void);
|
||||
DECL char * raw(const char * const sql);
|
||||
DECL void random_assign(const char * const sql);
|
||||
DECL void purge_assignments(const char * const who);
|
||||
|
||||
#define CREDS_PARSER_H
|
||||
#endif
|
||||
|
@ -42,3 +42,9 @@ static const char new_assignment_stmt_template[] =
|
||||
" VALUES "
|
||||
"(?, ?);"
|
||||
;
|
||||
|
||||
static sqlite3_stmt* purge_assignments_stmt;
|
||||
static const char purge_assignments_stmt_template[] =
|
||||
"DELETE FROM assignment "
|
||||
"WHERE who = ?;"
|
||||
;
|
||||
|
@ -27,9 +27,12 @@ DECL int
|
||||
api_init(void)
|
||||
{
|
||||
DBERR(sqlite3_open(DBFILE, &connection));
|
||||
// dont you fucking dare to remove this spacing
|
||||
DBERR(stmt_prepare(remind_stmt));
|
||||
DBERR(stmt_prepare(set_repo_stmt));
|
||||
DBERR(stmt_prepare(get_nth_id_stmt));
|
||||
DBERR(stmt_prepare(new_assignment_stmt));
|
||||
DBERR(stmt_prepare(purge_assignments_stmt));
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user