]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/dots_mvcur.c
ncurses 6.1 - patch 20180127
[ncurses.git] / test / dots_mvcur.c
index 2a2cdf5429be709d449ce9a621670c329c18f334..7dfae824995f29674e95d0bd434aa4fe89b0352d 100644 (file)
@@ -29,7 +29,7 @@
 /*
  * Author: Thomas E. Dickey - 2007
  *
- * $Id: dots_mvcur.c,v 1.17 2017/10/22 00:44:39 tom Exp $
+ * $Id: dots_mvcur.c,v 1.19 2017/11/24 19:26:31 tom Exp $
  *
  * A simple demo of the terminfo interface, and mvcur.
  */
@@ -98,7 +98,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) {
@@ -118,7 +118,9 @@ usage(void)
        ,""
        ,"Options:"
        ," -T TERM  override $TERM"
+#if HAVE_USE_ENV
        ," -e       allow environment $LINES / $COLUMNS"
+#endif
        ," -f       use tigetnum rather than <term.h> mapping"
        ," -m SIZE  set margin (default: 2)"
        ," -s MSECS delay 1% of the time (default: 1 msecs)"
@@ -150,9 +152,11 @@ main(int argc GCC_UNUSED,
        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;