"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog test harness
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Fri, 14 Apr 2023 15:02:17 +0200

Download raw body.

Thread
On Fri, Apr 14, 2023 at 10:49:01PM +1000, Mark Jamsek wrote:
> Very nice, ok. I was actually working on a similar diff with minor
> changes but I like this better; I was also calling init_curses() from
> main. I've added a patch below with one of the differences though, which
> applies on top of yours. It just consolidates all the tog_io_close()
> calls at the end of main().

Sure. I have put my diff in just now. Ok for your diff as well.
 
> @@ -9821,6 +9793,11 @@ main(int argc, char *argv[])
>  			error = cmd->cmd_main(argc, cmd_argv ? cmd_argv : argv);
>  	}
>  
> +	if (using_mock_io) {
> +		io_err = tog_io_close();
> +		if (error == NULL)
> +			error = io_err;
> +	}
>  	endwin();

I wonder if we should be calling endwin() if we never called initscr()?