Skip to content
Snippets Groups Projects
Commit d3e4f915 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add support for ctrl/uedit.ini (with fallback to uifc.ini)

For Nelgin
parent 051fc225
Branches
Tags
1 merge request!455Update branch with changes from master
Pipeline #6435 passed
...@@ -58,6 +58,7 @@ struct user_list { ...@@ -58,6 +58,7 @@ struct user_list {
/* Global Variables */ /* Global Variables */
/********************/ /********************/
uifcapi_t uifc; /* User Interface (UIFC) Library API */ uifcapi_t uifc; /* User Interface (UIFC) Library API */
int ciolib_mode=CIOLIB_MODE_AUTO;
char YesStr[]="Yes"; char YesStr[]="Yes";
char NoStr[]="No"; char NoStr[]="No";
char sepchar = 0xb3; char sepchar = 0xb3;
...@@ -1862,6 +1863,16 @@ int createdefaults(scfg_t* cfg) ...@@ -1862,6 +1863,16 @@ int createdefaults(scfg_t* cfg)
return(i); return(i);
} }
void read_uedit_ini(const char* ctrl_dir)
{
char path[MAX_PATH + 1];
snprintf(path, sizeof path, "%s/uedit.ini", ctrl_dir);
if(!fexist(path))
snprintf(path, sizeof path, "%s/uifc.ini", ctrl_dir);
read_uifc_ini(path, &uifc, &ciolib_mode, NULL);
}
int main(int argc, char** argv) { int main(int argc, char** argv) {
char** opt; char** opt;
char** mopt; char** mopt;
...@@ -1876,7 +1887,6 @@ int main(int argc, char** argv) { ...@@ -1876,7 +1887,6 @@ int main(int argc, char** argv) {
int last; int last;
user_t user; user_t user;
int edtuser=0; int edtuser=0;
int ciolib_mode=CIOLIB_MODE_AUTO;
bool uifcx = false; bool uifcx = false;
/******************/ /******************/
...@@ -1891,6 +1901,8 @@ int main(int argc, char** argv) { ...@@ -1891,6 +1901,8 @@ int main(int argc, char** argv) {
SAFECOPY(ctrl_dir, get_ctrl_dir(/* warn: */TRUE)); SAFECOPY(ctrl_dir, get_ctrl_dir(/* warn: */TRUE));
read_uedit_ini(ctrl_dir);
sbbs_get_ini_fname(ini_file, ctrl_dir); sbbs_get_ini_fname(ini_file, ctrl_dir);
/* Initialize BBS startup structure */ /* Initialize BBS startup structure */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment