* authorization. *
****************************************************************************/
/*
- * $Id: demo_new_pair.c,v 1.13 2017/04/15 17:36:00 tom Exp $
+ * $Id: demo_new_pair.c,v 1.15 2017/06/26 00:20:23 tom Exp $
*
* Demonstrate the alloc_pair() function.
*/
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");
+ fclose(output);
+ ExitProgram(EXIT_FAILURE);
+ }
(void) cbreak(); /* read chars without wait for \n */
(void) noecho(); /* don't echo input */
update_modes();