+ return ((double) r / 32768.);
+}
+
+static int
+get_number(NCURSES_CONST char *cap, int map)
+{
+ int result = map;
+ if (cap != 0) {
+ int check = tigetnum(cap);
+ if (check > 0)
+ result = check;
+ }
+ return result;
+}
+
+static void
+usage(void)
+{
+ static const char *msg[] =
+ {
+ "Usage: dots [options]"
+ ,""
+ ,"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)"
+ ," -r SECS self-interrupt/exit after specified number of seconds"
+ ," -s MSECS delay 1% of the time (default: 1 msecs)"
+ };
+ size_t n;
+
+ for (n = 0; n < SIZEOF(msg); n++)
+ fprintf(stderr, "%s\n", msg[n]);
+
+ ExitProgram(EXIT_FAILURE);