From 310170b83b7e0263286f3c6c2787d20ae96aea17 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Wed, 16 Apr 2008 23:12:40 +0200 Subject: [PATCH] cal: use HAVE_LIB{NCURSES,NCURSESW} instead HAVE_NCURSES The HAVE_NCURSES is obsolete macro. The autotool generates HAVE_LIBxxx macros. Signed-off-by: Karel Zak --- misc-utils/cal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/misc-utils/cal.c b/misc-utils/cal.c index ec6abf49..82603b1b 100644 --- a/misc-utils/cal.c +++ b/misc-utils/cal.c @@ -66,7 +66,7 @@ #include #include "nls.h" -#if defined(HAVE_NCURSES) +#if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW) #ifdef HAVE_NCURSES_H #include @@ -122,7 +122,7 @@ my_tgetstr(char *s, char *ss) { return ret; } -#else /* ! (HAVE_LIBTERMCAP || HAVE_NCURSES) */ +#else /* ! (HAVE_LIBTERMCAP || HAVE_LIBNCURSES || HAVE_LIBNCURSESW) */ static void my_putstring(char *s) { @@ -273,7 +273,7 @@ main(int argc, char **argv) { bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); -#if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP) +#if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW) || defined(HAVE_LIBTERMCAP) if ((term = getenv("TERM"))) { int ret; my_setupterm(term, 1, &ret); @@ -516,7 +516,7 @@ monthly3(int day, int month, int year) { int w1, w2, w3; w1 = w2 = w3 = width; -#if defined(HAVE_NCURSES) || defined(HAVE_LIBTERMCAP) +#if defined(HAVE_LIBNCURSES) || defined(HAVE_LIBNCURSESW) || defined(HAVE_LIBTERMCAP) /* adjust width to allow for non printable characters */ w1 += (out_prev.s[i] == Hrow ? Slen : 0); w2 += (out_curm.s[i] == Hrow ? Slen : 0); -- 2.39.5