exit(0) on success, non-zero if an error occurred or signal was received

Signed-off-by: Christoph Lohmann <20h@r-36.net>
master
Hiltjo Posthuma 3 years ago committed by Christoph Lohmann
parent 79fcfa10f4
commit 4749f13de5

@ -14,7 +14,7 @@
#include <locale.h>
char *currentslidep, **slidefiles; /* the slides */
int nslides, currentslide, currentslidelen;
int nslides, currentslide, currentslidelen, exitstatus = 1;
void
unloadcurrentslide(void)
@ -32,7 +32,7 @@ cleanup(int sig)
unloadcurrentslide();
endwin(); /* restore terminal */
exit(1);
exit(exitstatus);
}
void
@ -167,6 +167,7 @@ again:
}
/* unmap mem */
exitstatus = 0;
cleanup(0);
return 0;

Loading…
Cancel
Save