X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fview.c;h=c7d1771822aced3f898a746c5964594df029c8ff;hp=6e5c2411cf411d02813d3baf8fa67a89d61aba63;hb=8789460c7ae8e812ec444304cad5e23df1d70fc8;hpb=52aa842907b31bb56fb5133da3f023b45bd4355f diff --git a/test/view.c b/test/view.c index 6e5c2411..c7d17718 100644 --- a/test/view.c +++ b/test/view.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2010,2011 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.81 2010/11/14 01:06:02 tom Exp $ + * $Id: view.c,v 1.84 2011/12/10 15:42:34 tom Exp $ */ #include @@ -110,9 +110,9 @@ static void show_all(const char *tag); #if CAN_RESIZE static RETSIGTYPE adjust(int sig); static int interrupted; +static bool waiting = FALSE; #endif -static bool waiting = FALSE; static int shift = 0; static bool try_color = FALSE; @@ -121,6 +121,8 @@ static NCURSES_CH_T **vec_lines; static NCURSES_CH_T **lptr; static int num_lines; +static void usage(void) GCC_NORETURN; + static void usage(void) { @@ -180,7 +182,7 @@ ch_dup(char *src) { unsigned len = (unsigned) strlen(src); NCURSES_CH_T *dst = typeMalloc(NCURSES_CH_T, len + 1); - unsigned j, k; + size_t j, k; #if USE_WIDEC_SUPPORT wchar_t wstr[CCHARW_MAX + 1]; wchar_t wch; @@ -373,10 +375,12 @@ main(int argc, char *argv[]) adjust(0); my_label = "interrupt"; } -#endif waiting = TRUE; c = getch(); waiting = FALSE; +#else + c = getch(); +#endif if ((c < 127) && isdigit(c)) { if (!got_number) { MvPrintw(0, 0, "Count: ");