resettitle even if there was no succesful initialization setting `needcleanup` - sfeed_curses - sfeed curses UI (now part of sfeed, development is in sfeed)
 (HTM) git clone git://git.codemadness.org/sfeed_curses
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit c94a5e5e01d617d1f1c2f08058df832148c4adc9
 (DIR) parent e37cbef2ec362a29ea79ece4e88bd4a65e8c1145
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Sat, 20 Mar 2021 12:53:28 +0100
       
       resettitle even if there was no succesful initialization setting `needcleanup`
       
       This makes sure to reset the terminal state and/or title when it calls die()
       inside init() or before.
       
       Diffstat:
         M sfeed_curses.c                      |       4 ++--
       
       1 file changed, 2 insertions(+), 2 deletions(-)
       ---
 (DIR) diff --git a/sfeed_curses.c b/sfeed_curses.c
       @@ -586,6 +586,8 @@ cleanup(void)
        {
                struct sigaction sa;
        
       +        resettitle();
       +
                if (!needcleanup)
                        return;
        
       @@ -600,8 +602,6 @@ cleanup(void)
                if (usemouse)
                        mousemode(0);
        
       -        resettitle();
       -
                memset(&sa, 0, sizeof(sa));
                sigemptyset(&sa.sa_mask);
                sa.sa_flags = SA_RESTART; /* require BSD signal semantics */