X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Finchs.c;h=180d3245db3388be1c9c268b93ce3ae8922d69f7;hp=38747a2f39bd2c70162b0b16831a420b99374f3a;hb=6374752643292ccd9bf7ee66485efe9aed9e8e48;hpb=a1aff38c9421e79f92cd4e8ab0587fdf3806cc28 diff --git a/test/inchs.c b/test/inchs.c index 38747a2f..180d3245 100644 --- a/test/inchs.c +++ b/test/inchs.c @@ -26,7 +26,9 @@ * authorization. * ****************************************************************************/ /* - * $Id: inchs.c,v 1.6 2007/06/09 21:25:06 tom Exp $ + * $Id: inchs.c,v 1.9 2007/07/21 19:01:43 tom Exp $ + * + * Author: Thomas E Dickey */ /* chtype inch(void); @@ -96,14 +98,14 @@ test_inchs(int level, char **argv, WINDOW *chrwin, WINDOW *strwin) if ((fp = fopen(argv[level], "r")) != 0) { while ((j = fgetc(fp)) != EOF) { - if (waddch(txtwin, j) != OK) { + if (waddch(txtwin, UChar(j)) != OK) { break; } } + fclose(fp); } else { wprintw(txtwin, "Cannot open:\n%s", argv[1]); } - fclose(fp); while (!Quit(j = mvwgetch(txtwin, txt_y, txt_x))) { switch (j) { @@ -266,5 +268,5 @@ main(int argc, char *argv[]) test_inchs(1, argv, chrwin, strwin); endwin(); - return EXIT_SUCCESS; + ExitProgram(EXIT_SUCCESS); }