2
0
Fork 0

no more globals in lighttpd.c

personal/stbuehler/wip
Thomas Porzelt 2008-07-18 17:05:51 +02:00
parent ded5777ea2
commit 6b8bbdabde
1 changed files with 12 additions and 13 deletions

View File

@ -3,25 +3,24 @@
#include "log.h"
#include "config_parser.h"
static gchar *config_path = NULL;
static gboolean luaconfig = FALSE;
static gboolean test_config = FALSE;
static gboolean show_version = FALSE;
static GOptionEntry entries[] = {
{ "config", 'c', 0, G_OPTION_ARG_FILENAME, &config_path, "filename/path of the config", "PATH" },
{ "lua", 'l', 0, G_OPTION_ARG_NONE, &luaconfig, "use the lua config frontend", NULL },
{ "test", 't', 0, G_OPTION_ARG_NONE, &test_config, "test config and exit", NULL },
{ "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, "show version and exit", NULL },
{ NULL, 0, 0, 0, NULL, NULL, NULL }
};
int main(int argc, char *argv[]) {
GError *error;
GOptionContext *context;
server *srv;
gchar *config_path = NULL;
gboolean luaconfig = FALSE;
gboolean test_config = FALSE;
gboolean show_version = FALSE;
GOptionEntry entries[] = {
{ "config", 'c', 0, G_OPTION_ARG_FILENAME, &config_path, "filename/path of the config", "PATH" },
{ "lua", 'l', 0, G_OPTION_ARG_NONE, &luaconfig, "use the lua config frontend", NULL },
{ "test", 't', 0, G_OPTION_ARG_NONE, &test_config, "test config and exit", NULL },
{ "version", 'v', 0, G_OPTION_ARG_NONE, &show_version, "show version and exit", NULL },
{ NULL, 0, 0, 0, NULL, NULL, NULL }
};
/* parse commandline options */