Mercurial > hg > nnchat
comparison nnchat.c @ 247:fce4e2e31d69
Add the config section ...
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 20 Apr 2011 18:59:42 +0300 |
parents | cb86d7543be2 |
children | dcf78e2c458c |
comparison
equal
deleted
inserted
replaced
244:517c7b22b3c9 | 247:fce4e2e31d69 |
---|---|
1079 th_cfg_add_int(&tmpcfg, "port", &optPort, optPort); | 1079 th_cfg_add_int(&tmpcfg, "port", &optPort, optPort); |
1080 th_cfg_add_section(&cfg, "server", tmpcfg); | 1080 th_cfg_add_section(&cfg, "server", tmpcfg); |
1081 | 1081 |
1082 tmpcfg = NULL; | 1082 tmpcfg = NULL; |
1083 th_cfg_add_comment(&tmpcfg, "Enable logging"); | 1083 th_cfg_add_comment(&tmpcfg, "Enable logging"); |
1084 th_cfg_add_bool(&tmpcfg, "log", &optLogEnable, optLogEnable); | 1084 th_cfg_add_bool(&tmpcfg, "enable", &optLogEnable, optLogEnable); |
1085 th_cfg_add_comment(&tmpcfg, "Log filename format"); | 1085 th_cfg_add_comment(&tmpcfg, "Log filename format"); |
1086 th_cfg_add_string(&tmpcfg, "logformat", &optLogFilename, optLogFilename); | 1086 th_cfg_add_string(&tmpcfg, "filename", &optLogFilename, optLogFilename); |
1087 th_cfg_add_section(&cfg, "logging", tmpcfg); | |
1087 | 1088 |
1088 #ifdef __WIN32 | 1089 #ifdef __WIN32 |
1089 { | 1090 { |
1090 char tmpPath[MAX_PATH]; | 1091 char tmpPath[MAX_PATH]; |
1091 if (SHGetFolderPath(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, tmpPath) == S_OK) | 1092 if (SHGetFolderPath(NULL, CSIDL_APPDATA | CSIDL_FLAG_CREATE, NULL, 0, tmpPath) == S_OK) |