Skip to content
Snippets Groups Projects
Commit 3ed775d5 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 d8dfa611
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3837 passed
...@@ -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