catpoint

Catpoint simple presenting software.
git clone git://r-36.net/catpoint
Log | Files | Refs | LICENSE

commit 4749f13de5cfd18a997135c10d5ea859e56efaba
parent 79fcfa10f48e539001da1288f7a084f07b895abf
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun, 20 Dec 2020 15:51:33 +0100

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

Signed-off-by: Christoph Lohmann <20h@r-36.net>

Diffstat:
catpoint.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/catpoint.c b/catpoint.c @@ -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;