X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fview.c;h=5c609fa6fd1604e74dad4562b0600dc0e4bfb90d;hp=e759a9b24ab2393335a70c688c3a16f54cc3e52f;hb=71c0306f0824ef2b10c4c5813fb003db48f3012e;hpb=77afe78361875f531dc2bf8d73f2e781c8e76176 diff --git a/test/view.c b/test/view.c index e759a9b2..5c609fa6 100644 --- a/test/view.c +++ b/test/view.c @@ -50,7 +50,7 @@ * scroll operation worked, and the refresh() code only had to do a * partial repaint. * - * $Id: view.c,v 1.77 2010/01/09 16:34:06 tom Exp $ + * $Id: view.c,v 1.79 2010/05/01 21:56:10 tom Exp $ */ #include @@ -294,6 +294,8 @@ main(int argc, char *argv[]) if ((vec_lines = typeCalloc(NCURSES_CH_T *, MAXLINES + 2)) == 0) usage(); + assert(vec_lines != 0); + fname = argv[optind]; if ((fp = fopen(fname, "r")) == 0) { perror(fname); @@ -365,7 +367,6 @@ main(int argc, char *argv[]) if (!got_number) show_all(my_label); - n = 0; for (;;) { #if CAN_RESIZE if (interrupted) { @@ -378,7 +379,7 @@ main(int argc, char *argv[]) waiting = FALSE; if ((c < 127) && isdigit(c)) { if (!got_number) { - mvprintw(0, 0, "Count: "); + MvPrintw(0, 0, "Count: "); clrtoeol(); } addch(UChar(c));