X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fsavescreen.c;h=e48800dbabd13b93471a0bbcc5d16f51f5d729a5;hp=9ace6a701fe99cee6e47e2f56260c361592a480d;hb=5d8dbcdd9423bf9821db414fd9ec792ccf1f1027;hpb=5e1e572b71ae31a6071daa24e2460a68a6f1003c diff --git a/test/savescreen.c b/test/savescreen.c index 9ace6a70..e48800db 100644 --- a/test/savescreen.c +++ b/test/savescreen.c @@ -26,7 +26,7 @@ * authorization. * ****************************************************************************/ /* - * $Id: savescreen.c,v 1.32 2017/04/15 17:33:50 tom Exp $ + * $Id: savescreen.c,v 1.34 2017/09/04 15:01:45 tom Exp $ * * Demonstrate save/restore functions from the curses library. * Thomas Dickey - 2007/7/14 @@ -313,7 +313,7 @@ main(int argc, char *argv[]) } move(0, 0); } else { - endwin(); + exit_curses(); fprintf(stderr, "Cannot open \"%s\"\n", fill_by); ExitProgram(EXIT_FAILURE); } @@ -325,14 +325,14 @@ main(int argc, char *argv[]) * Use the last file as the initial/current screen. */ if (last < 0) { - endwin(); + exit_curses(); printf("No screen-dumps given\n"); ExitProgram(EXIT_FAILURE); } which = last; if (load_screen(files[which]) == ERR) { - endwin(); + exit_curses(); printf("Cannot load screen-dump %s\n", files[which]); ExitProgram(EXIT_FAILURE); } @@ -489,7 +489,7 @@ main(int argc, char *argv[]) #else int -main(int argc, char *argv[]) +main(int argc GCC_UNUSED, char *argv[]GCC_UNUSED) { printf("This program requires the screen-dump functions\n"); ExitProgram(EXIT_FAILURE);