Skip to content
Snippets Groups Projects
Commit 6e93e628 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Use WIN_ATEXIT at exit.

Also, fix some formatting.
parent f99713f3
No related branches found
No related tags found
No related merge requests found
Pipeline #8653 passed
...@@ -121,7 +121,7 @@ void allocfail(uint size) ...@@ -121,7 +121,7 @@ void allocfail(uint size)
bail(1); bail(1);
} }
int confirm(char *prompt) int confirm(char *prompt, bool atexit)
{ {
int i=0; int i=0;
char *opt[3]={ char *opt[3]={
...@@ -130,7 +130,7 @@ int confirm(char *prompt) ...@@ -130,7 +130,7 @@ int confirm(char *prompt)
,"" ,""
}; };
i=uifc.list(WIN_MID|WIN_ACT|WIN_SAV,0,0,0,&i,0,prompt,opt); i=uifc.list(WIN_MID|WIN_ACT|WIN_SAV|(atexit ? WIN_ATEXIT : 0),0,0,0,&i,0,prompt,opt);
if(i==0) if(i==0)
return(1); return(1);
if(i==-1) if(i==-1)
...@@ -2116,13 +2116,12 @@ int main(int argc, char** argv) { ...@@ -2116,13 +2116,12 @@ int main(int argc, char** argv) {
"`---------------------------\n\n" "`---------------------------\n\n"
"If you want to exit the Synchronet user editor,\n" "If you want to exit the Synchronet user editor,\n"
"select `Yes`. Otherwise, select `No` or hit ~ ESC ~."; "select `Yes`. Otherwise, select `No` or hit ~ ESC ~.";
if(confirm("Exit Synchronet User Editor")==1) if(confirm("Exit Synchronet User Editor", true)==1)
bail(0); bail(0);
continue; continue;
} }
if(j==0) { if(j==0) {
/* New User */
createdefaults(&cfg); createdefaults(&cfg);
lprintf("Please edit defaults using next screen."); lprintf("Please edit defaults using next screen.");
getuser(&cfg,&user,"New User"); getuser(&cfg,&user,"New User");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment