X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fview.c;h=9834e44415a7f496142d53133ba2176c7267ab70;hp=05e7d4812d5d33a2edfecda3903e9e8344aadadf;hb=1078c0231b8a58fbd2dd56b6e0a81b19d6b07f77;hpb=027ae42953e3186daed8f3882da73de48291b606 diff --git a/test/view.c b/test/view.c index 05e7d481..9834e444 100644 --- a/test/view.c +++ b/test/view.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * + * Copyright (c) 1998-2007,2008 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -50,7 +50,7 @@ * scroll operation worked, and the refresh() code only had to do a * partial repaint. * - * $Id: view.c,v 1.64 2006/05/20 15:37:03 tom Exp $ + * $Id: view.c,v 1.67 2008/01/19 21:01:21 tom Exp $ */ #include @@ -229,7 +229,7 @@ main(int argc, char *argv[]) (void) signal(SIGINT, finish); /* arrange interrupts to terminate */ #endif - while ((i = getopt(argc, argv, "cin:rtT:")) != EOF) { + while ((i = getopt(argc, argv, "cin:rtT:")) != -1) { switch (i) { case 'c': try_color = TRUE; @@ -374,7 +374,7 @@ main(int argc, char *argv[]) lptr++; else break; - wscrl(stdscr, lptr - olptr); + scrl(lptr - olptr); break; case KEY_UP: @@ -385,7 +385,7 @@ main(int argc, char *argv[]) lptr--; else break; - wscrl(stdscr, lptr - olptr); + scrl(lptr - olptr); break; case 'h': @@ -512,6 +512,7 @@ show_all(const char *tag) i = strlen(temp); sprintf(temp + i, "view %.*s", (int) (sizeof(temp) - 7 - i), fname); #else + (void) tag; sprintf(temp, "view %.*s", (int) sizeof(temp) - 7, fname); #endif move(0, 0);