moth/src/common.h

32 lines
866 B
C
Raw Normal View History

2010-09-03 21:00:02 -06:00
#ifndef __COMMON_H__
#define __COMMON_H__
#include <stddef.h>
2010-09-12 22:00:58 -06:00
#define TEAM_MAX 40
#define CAT_MAX 40
2010-09-14 18:04:33 -06:00
#define TOKEN_MAX 40
2010-09-12 22:00:58 -06:00
int cgi_init(char *global_argv[]);
size_t cgi_item(char *str, size_t maxlen);
2010-09-12 22:00:58 -06:00
void cgi_head(char *title);
void cgi_foot();
void cgi_page(char *title, char *fmt, ...);
void cgi_error(char *fmt, ...);
int fgrepx(char const *needle, char const *filename);
2010-09-16 12:21:16 -06:00
int my_snprintf(char *buf, size_t buflen, char *fmt, ...);
char *srv_path(char const *fmt, ...);
int team_exists(char const *teamhash);
int award_points(char const *teamhacsh,
char const *category,
2010-09-12 22:00:58 -06:00
long point);
void award_and_log_uniquely(char const *team,
char const *category,
2010-09-12 22:00:58 -06:00
long points,
char const *logfile,
2010-09-14 18:04:33 -06:00
char const *line);
2010-09-03 21:00:02 -06:00
#endif