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

Use the new UIFC input mode flags to trim spaces where inappropriate

from sysop input, automatically.
parent 640c1355
No related branches found
No related tags found
No related merge requests found
...@@ -200,7 +200,7 @@ void cfg_wizard(void) ...@@ -200,7 +200,7 @@ void cfg_wizard(void)
char* opt[] = { "Continue", NULL }; char* opt[] = { "Continue", NULL };
wizard_msg(stage, total, wizard_msg(stage, total,
" ~ Welcome ~\n" " ~ Welcome ~\n"
" _________ .__ __ \n" " _________ .__ __ \n"
" / _____/__.__. ____ ____ | |_________ ____ ____ _____/ |_ \n" " / _____/__.__. ____ ____ | |_________ ____ ____ _____/ |_ \n"
" \\_____ < | |/ \\_/ ___\\| | \\_ __ \\/ _ \\ / \\_/ __ \\ __\\\n" " \\_____ < | |/ \\_/ ___\\| | \\_ __ \\/ _ \\ / \\_/ __ \\ __\\\n"
...@@ -633,6 +633,7 @@ int main(int argc, char **argv) ...@@ -633,6 +633,7 @@ int main(int argc, char **argv)
printf("uifc library init returned error %d\n",i); printf("uifc library init returned error %d\n",i);
exit(1); exit(1);
} }
uifc.kmode = K_TRIM; // trim all leading & trailing whitespace on string input
if((opt=(char **)malloc(sizeof(char *)*(MAX_OPTS+1)))==NULL) if((opt=(char **)malloc(sizeof(char *)*(MAX_OPTS+1)))==NULL)
allocfail(sizeof(char *)*(MAX_OPTS+1)); allocfail(sizeof(char *)*(MAX_OPTS+1));
......
...@@ -105,7 +105,7 @@ int edit_sys_inetaddr(int page, int total) ...@@ -105,7 +105,7 @@ int edit_sys_inetaddr(int page, int total)
if(page) if(page)
mode = wiz_help(page, total, uifc.helpbuf); mode = wiz_help(page, total, uifc.helpbuf);
return uifc.input(mode,0,10,"System Internet Address" 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) int edit_sys_id(int page, int total)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment