X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdots.c;h=079342372331bed1c15b6fac23b19bbc787af917;hp=5490bcfba31ec79b41140fa913f9ea3519bed3de;hb=093902b4199bbc1d9afec433759e48344c06ed1a;hpb=58369d647d003dd9d9e1ecfc5ab07982db28f3da diff --git a/test/dots.c b/test/dots.c index 5490bcfb..07934237 100644 --- a/test/dots.c +++ b/test/dots.c @@ -29,7 +29,7 @@ /* * Author: Thomas E. Dickey 1999 * - * $Id: dots.c,v 1.31 2017/10/22 00:44:06 tom Exp $ + * $Id: dots.c,v 1.33 2017/11/24 19:26:31 tom Exp $ * * A simple demo of the terminfo interface. */ @@ -97,7 +97,7 @@ ranf(void) } static int -get_number(const char *cap, int map) +get_number(NCURSES_CONST char *cap, int map) { int result = map; if (cap != 0) { @@ -117,7 +117,9 @@ usage(void) ,"" ,"Options:" ," -T TERM override $TERM" +#if HAVE_USE_ENV ," -e allow environment $LINES / $COLUMNS" +#endif ," -f use tigetnum rather than mapping" ," -m SIZE set margin (default: 2)" ," -s MSECS delay 1% of the time (default: 1 msecs)" @@ -147,9 +149,11 @@ main(int argc, case 'T': putenv(strcat(strcpy(malloc(6 + strlen(optarg)), "TERM="), optarg)); break; +#if HAVE_USE_ENV case 'e': use_env(TRUE); break; +#endif case 'f': f_option = 1; break;