From f5e58c701297d3dc2691b6b11540d546f5edad00 Mon Sep 17 00:00:00 2001 From: "Rob Swindell (on ChromeOS)" <rob@synchro.net> Date: Tue, 21 Feb 2023 20:29:58 -0800 Subject: [PATCH] Use the new UIFC input mode flags to trim spaces where inappropriate from sysop input, automatically. --- src/sbbs3/scfg/scfg.c | 3 ++- src/sbbs3/scfg/scfgsys.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sbbs3/scfg/scfg.c b/src/sbbs3/scfg/scfg.c index 8489697ba7..11d79a8daf 100644 --- a/src/sbbs3/scfg/scfg.c +++ b/src/sbbs3/scfg/scfg.c @@ -200,7 +200,7 @@ void cfg_wizard(void) char* opt[] = { "Continue", NULL }; wizard_msg(stage, total, - " ~ Welcome ~\n" + " ~ Welcome ~\n" " _________ .__ __ \n" " / _____/__.__. ____ ____ | |_________ ____ ____ _____/ |_ \n" " \\_____ < | |/ \\_/ ___\\| | \\_ __ \\/ _ \\ / \\_/ __ \\ __\\\n" @@ -633,6 +633,7 @@ int main(int argc, char **argv) printf("uifc library init returned error %d\n",i); exit(1); } + uifc.kmode = K_TRIM; // trim all leading & trailing whitespace on string input if((opt=(char **)malloc(sizeof(char *)*(MAX_OPTS+1)))==NULL) allocfail(sizeof(char *)*(MAX_OPTS+1)); diff --git a/src/sbbs3/scfg/scfgsys.c b/src/sbbs3/scfg/scfgsys.c index 0e34343ebc..32f71932a5 100644 --- a/src/sbbs3/scfg/scfgsys.c +++ b/src/sbbs3/scfg/scfgsys.c @@ -105,7 +105,7 @@ int edit_sys_inetaddr(int page, int total) if(page) mode = wiz_help(page, total, uifc.helpbuf); return uifc.input(mode,0,10,"System Internet Address" - ,cfg.sys_inetaddr,32,K_EDIT); + ,cfg.sys_inetaddr,32,K_EDIT | K_NOSPACE); } int edit_sys_id(int page, int total) -- GitLab