texit(0) on success, non-zero if an error occurred or signal was received - catpoint - Catpoint simple presenting software.
 (HTM) git clone git://r-36.net/catpoint
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit 4749f13de5cfd18a997135c10d5ea859e56efaba
 (DIR) parent 79fcfa10f48e539001da1288f7a084f07b895abf
 (HTM) 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(-)
       ---
 (DIR) diff --git a/catpoint.c b/catpoint.c
       t@@ -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)
       t@@ -32,7 +32,7 @@ cleanup(int sig)
                unloadcurrentslide();
        
                endwin(); /* restore terminal */
       -        exit(1);
       +        exit(exitstatus);
        }
        
        void
       t@@ -167,6 +167,7 @@ again:
                }
        
                /* unmap mem */
       +        exitstatus = 0;
                cleanup(0);
        
                return 0;