1
0
Fork 0
mirror of https://gitea.quitesimple.org/crtxcr/cgitsb synced 2024-05-09 11:46:08 +02:00
cgitsb/configfile.h
Lukas Fleischer 50e70d32f0 Use strbuf for reading configuration files
Use struct strbuf from Git instead of fixed-size buffers to remove the
limit on the length of configuration file lines and refactor
read_config_line() to improve readability.

Note that this also fixes a buffer overflow that existed with the
original fixed-size buffer implementation.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
2013-08-12 13:14:10 -06:00

11 lines
239 B
C

#ifndef CONFIGFILE_H
#define CONFIGFILE_H
#include "cgit.h"
typedef void (*configfile_value_fn)(const char *name, const char *value);
extern int parse_configfile(const char *filename, configfile_value_fn fn);
#endif /* CONFIGFILE_H */