X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdemo_new_pair.c;fp=test%2Fdemo_new_pair.c;h=8c29870b81290d25626603f9f44cf5e67ca90afa;hp=1070c06ae2290ad91e5806b8eb0d2ad243cf5cb4;hb=af3d0ee323cbb22d2a7596d564bf68f7307f5076;hpb=dee978d1ba016c8f327516f684900f95ee7a2b30 diff --git a/test/demo_new_pair.c b/test/demo_new_pair.c index 1070c06a..8c29870b 100644 --- a/test/demo_new_pair.c +++ b/test/demo_new_pair.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: demo_new_pair.c,v 1.13 2017/04/15 17:36:00 tom Exp $ + * $Id: demo_new_pair.c,v 1.14 2017/06/17 19:48:45 tom Exp $ * * Demonstrate the alloc_pair() function. */ @@ -229,8 +229,10 @@ main(int argc, char *argv[]) fprintf(stderr, "cannot open terminal for output\n"); ExitProgram(EXIT_FAILURE); } - if (newterm(NULL, output, stdin) == 0) - usage(); + if (newterm(NULL, output, stdin) == 0) { + fprintf(stderr, "Cannot initialize terminal\n"); + ExitProgram(EXIT_FAILURE); + } (void) cbreak(); /* read chars without wait for \n */ (void) noecho(); /* don't echo input */ update_modes();