X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Fdots_termcap.c;fp=test%2Fdots_termcap.c;h=65786c411a4ae1bde374e677bd556fe70fe547c4;hp=679c9928f99bd44ddddd0944b85167be2e0a37fe;hb=6315e1a380ecdb706d4f6518d2e8c7eb0db8fbe2;hpb=e27924b560884229fa4c9cf5a90778aa6b7e5e96 diff --git a/test/dots_termcap.c b/test/dots_termcap.c index 679c9928..65786c41 100644 --- a/test/dots_termcap.c +++ b/test/dots_termcap.c @@ -30,7 +30,7 @@ /* * Author: Thomas E. Dickey * - * $Id: dots_termcap.c,v 1.31 2023/01/07 17:21:48 tom Exp $ + * $Id: dots_termcap.c,v 1.32 2023/02/25 18:11:21 tom Exp $ * * A simple demo of the termcap interface. */ @@ -150,11 +150,19 @@ ranf(void) return ((double) r / 32768.); } +/* + * napms is a curses function which happens to be usable without initializing + * the screen, but if this program happened to be build with a "real" termcap + * library, there is nothing like napms. + */ +#if HAVE_NAPMS +#define my_napms(ms) napms(ms) +#else static void my_napms(int ms) { if (ms > 0) { -#if defined(_NC_WINDOWS) || !HAVE_GETTIMEOFDAY +#if defined(_NC_WINDOWS) Sleep((unsigned int) ms); #else struct timeval data; @@ -164,6 +172,7 @@ my_napms(int ms) #endif } } +#endif static int get_number(NCURSES_CONST char *cap, const char *env)