#ifndef __MICROBBS_BBSCONFIG_H #define __MICROBBS_BBSCONFIG_H #include #include #include #include #include #include #include #define ASSERT assert #include "kconfig.h" #include "list.h" #include "sds.h" #include "file_use.h" #include "ini.h" //there should be many ways how to config stuff //from commandline some basic things //from config files more complicated typedef struct bbs_config { //todo configs //list of filenames that considered to be todos char *todo_dir; List *todo_files; //directories where could be articles char *article_dir; //if defined this then there is directory where all needed is in standart layout char *root_dir; //directory with all user inis char *user_dir; //write syslogs? int syslog; //debug mode outputs more stuff int debug; } bbs_config; //GLOBAL USER #ifdef __MICROBBS_MAIN bbs_config g_config; #else extern bbs_config g_config; #endif int config_default(); int config_from_ini( const char *config_file ); int config_from_argv( int argc, char **argv ); #endif