2010-09-03 21:00:02 -06:00
|
|
|
#ifndef __COMMON_H__
|
|
|
|
#define __COMMON_H__
|
|
|
|
|
2010-09-11 23:22:28 -06:00
|
|
|
#include <stddef.h>
|
|
|
|
|
|
|
|
int cgi_init();
|
|
|
|
size_t cgi_item(char *str, size_t maxlen);
|
|
|
|
void cgi_page(char *title, char *fmt, ...);
|
|
|
|
void cgi_error(char *fmt, ...);
|
|
|
|
|
|
|
|
|
2010-09-09 15:14:39 -06:00
|
|
|
#define teamdir "/var/lib/ctf/teams/names"
|
2010-09-07 22:25:42 -06:00
|
|
|
#define pointsdir "/var/lib/ctf/points/new"
|
2010-09-03 21:00:02 -06:00
|
|
|
|
2010-09-10 23:07:40 -06:00
|
|
|
int fgrepx(char const *needle, char const *filename);
|
2010-09-11 22:57:46 -06:00
|
|
|
int team_exists(char const *teamhash);
|
|
|
|
int award_points(char const *teamhash,
|
|
|
|
char const *category,
|
|
|
|
int point);
|
|
|
|
void award_and_log_uniquely(char const *team,
|
|
|
|
char const *category,
|
|
|
|
int points,
|
|
|
|
char const *logfile,
|
|
|
|
char const *fmt, ...);
|
2010-09-03 21:00:02 -06:00
|
|
|
|
|
|
|
#endif
|