summaryrefslogtreecommitdiffstats
path: root/bbsconfig.c
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2015-07-05 17:42:26 +0100
committerFreeArtMan <dos21h@gmail.com>2015-07-05 17:42:26 +0100
commit8f893cfe961a3be8c688e9d657e656e03749477b (patch)
treeac2333997d30e77415116c058a7342f852d477ed /bbsconfig.c
parent43d3e330b0064c8ab962a7e77b4f26ac2c63f8ec (diff)
downloadmicrobbs-8f893cfe961a3be8c688e9d657e656e03749477b.tar.gz
microbbs-8f893cfe961a3be8c688e9d657e656e03749477b.zip
Added default config init. And small fixes
Diffstat (limited to 'bbsconfig.c')
-rw-r--r--bbsconfig.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/bbsconfig.c b/bbsconfig.c
index 4eed4a6..6dea7dc 100644
--- a/bbsconfig.c
+++ b/bbsconfig.c
@@ -8,7 +8,11 @@ int config_default()
//g_config.todo_files = llist_new();
g_config.todo_files = NULL;
+#ifdef CONFIG_ARTICLES
+ g_config.article_dir = CONFIG_ARTICLES_DEFAULT_DIR;
+#else
g_config.article_dir = NULL;
+#endif
#ifdef CONFIG_LOGIN
g_config.user_dir = CONFIG_USER_DEFAULT_DIR;
@@ -33,6 +37,9 @@ userdir string
syslog int
*/
+/*
+bbs_cfg_handler - callback for parsing ini file and obtain values
+*/
static int bbs_cfg_handler( void *user, const char *section, const char *name,
const char *value )
{
@@ -145,4 +152,13 @@ int config_from_argv( int argc, char **argv )
return ret;
}
+char* config_to_str( size_t max_size )
+{
+ char *str = malloc( max_size );
+ if (str == NULL)
+ return NULL;
+
+
+ return str;
+}