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 36 37 38 39 40 41 42 43 44 45
|
.\" (C) 2002 Ian Gulliver
.TH firestring_conf_parse 3 2002-03-31
.SH NAME
firestring_conf_parse \-
read and parse a configuration file
.SH SYNOPSIS
.B #include <firestring.h>
.br
.B -lfirestring
.LP
.BI "struct firestring_conf_t *firestring_conf_parse(const char *" "filename" ")"
.SH DESCRIPTION
firestring_conf_parse() attempts to read a configuration from
.I filename
and parse the results into a structure that it then returns.
.HP
The support configuration format is fairly flexible:
.br
# Configuration file example
.br
# These are comments
.br
variable_name = value
.br
variable_name2=value
.br
variable_name3="quoted value"
.br
variable_name4="array value 1"
.br
variable_name4="array value 2"
.P
.B include
as a variable name is special; it causes firestring to parse the file referenced
by the value, overriding any previous values (although they are still accessible
as arrays).
.SH RETURN VALUE
Returns a pointer to a structure containing the data read from
the config file, or
.I NULL
if the file cannot be opened.
.SH AUTHOR
Ian Gulliver <ian@penguinhosting.net>
.SH SEE ALSO
.BR libfirestring (3)
|