X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fview.c;h=4782d8509748a42e6728b70826b5bc7fd62d5200;hp=cf11cbf04cfbddbec443453891c38acfb7fe1390;hb=0266ec751090f9523ae676f357095176e293fb16;hpb=4b1ec76cb0a0fa5055909f534b3f928dafc7f7f1 diff --git a/test/view.c b/test/view.c index cf11cbf0..4782d850 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.90 2013/01/05 23:18:13 tom Exp $ + * $Id: view.c,v 1.94 2013/09/28 21:58:42 tom Exp $ */ #include @@ -85,7 +85,7 @@ #undef CTRL #define CTRL(x) ((x) & 0x1f) -static RETSIGTYPE finish(int sig) GCC_NORETURN; +static void finish(int sig) GCC_NORETURN; static void show_all(const char *tag); #if defined(SIGWINCH) && defined(TIOCGWINSZ) && HAVE_RESIZE_TERM @@ -95,7 +95,7 @@ static void show_all(const char *tag); #endif #if CAN_RESIZE -static RETSIGTYPE adjust(int sig); +static void adjust(int sig); static int interrupted; static bool waiting = FALSE; #endif @@ -233,7 +233,7 @@ main(int argc, char *argv[]) int value = 0; bool done = FALSE; bool got_number = FALSE; - bool single_step = TRUE; + bool single_step = FALSE; #if CAN_RESIZE bool nonposix_resize = FALSE; #endif @@ -274,7 +274,7 @@ main(int argc, char *argv[]) case 'T': { char *next = 0; - int tvalue = strtol(optarg, &next, 0); + int tvalue = (int) strtol(optarg, &next, 0); if (tvalue < 0 || (next != 0 && *next != 0)) usage(); trace((unsigned) tvalue); @@ -507,7 +507,7 @@ main(int argc, char *argv[]) finish(0); /* we're done */ } -static RETSIGTYPE +static void finish(int sig) { endwin(); @@ -534,7 +534,7 @@ finish(int sig) * The 'wrefresh(curscr)' is needed to force the refresh to start from the top * of the screen -- some xterms mangle the bitmap while resizing. */ -static RETSIGTYPE +static void adjust(int sig) { if (waiting || sig == 0) { @@ -577,7 +577,7 @@ show_all(const char *tag) printw("%.*s", COLS, temp); clrtoeol(); this_time = time((time_t *) 0); - strncpy(temp, ctime(&this_time), 30); + strncpy(temp, ctime(&this_time), (size_t) 30); if ((i = (int) strlen(temp)) != 0) { temp[--i] = 0; if (move(0, COLS - i - 2) != ERR)