diff --git a/acconfig.h b/acconfig.h index 1620f75..595d934 100644 --- a/acconfig.h +++ b/acconfig.h @@ -34,10 +34,6 @@ #undef HD44780_DRV -#undef HAVE_SYS_NMLN - -#undef HAVE__SYS_NAMELEN - #undef IRMANIN_DRV #undef JOY_DRV diff --git a/acinclude.m4 b/acinclude.m4 index 7c9aff3..a0f50b1 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,17 +1,3 @@ -dnl This test is used by the curses driver. -dnl Checks if $1 defined the ACS_S* preprocessor macros. -dnl Example: AC_CHECK_DEFINE_ACS(curses.h) -AC_DEFUN(AC_CHECK_DEFINE_ACS, [ - AC_MSG_CHECKING(if $1 defines ACS_S3 and ACS_S7) - AC_TRY_COMPILE([#include <$1>], [[[char map[] = { ACS_S9, ACS_S7, ACS_S3, ACS_S1 }]]], [ - dnl then - AC_DEFINE(DEFINED_ACS) - AC_MSG_RESULT(yes) ], [ - dnl else - AC_MSG_RESULT(no) ], - [:]) -]) - AC_DEFUN(LCD_DRIVERS_SELECT, [ AC_MSG_CHECKING(for which drivers to compile) @@ -70,7 +56,6 @@ fi AC_CHECK_LIB(ncurses, main, AC_CHECK_HEADER(ncurses.h, dnl We have ncurses.h and libncurses, add driver. - AC_CHECK_DEFINE_ACS(ncurses.h) LIBCURSES="-lncurses" DRIVERS="$DRIVERS curses_drv.o" AC_DEFINE(CURSES_DRV) @@ -84,7 +69,6 @@ dnl else AC_CHECK_LIB(curses, main, AC_CHECK_HEADER(curses.h, dnl We have curses.h and libcurses, add driver. - AC_CHECK_DEFINE_ACS(curses.h) LIBCURSES="-lcurses" DRIVERS="$DRIVERS curses_drv.o" AC_DEFINE(CURSES_DRV) diff --git a/clients/lcdproc/chrono.c b/clients/lcdproc/chrono.c index ca1a9c9..8b2756b 100644 --- a/clients/lcdproc/chrono.c +++ b/clients/lcdproc/chrono.c @@ -32,11 +32,11 @@ int TwentyFourHour = 1; int uptime_fd = 0; -#ifdef HAVE_SYS_NMLN +#ifdef SYS_NMLN static char kver[SYS_NMLN]; static char sysname[SYS_NMLN]; #else -# ifdef HAVE__SYS_NAMELEN +# ifdef _SYS_NAMELEN static char kver[_SYS_NAMELEN]; static char sysname[_SYS_NAMELEN]; # else diff --git a/configure.in b/configure.in index 0f6de72..363bf1b 100644 --- a/configure.in +++ b/configure.in @@ -72,28 +72,6 @@ AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h) dnl Check for particular preprocessor macros -dnl Checking if sys/utsname.h is present and defines SYS_NMLN or _SYS_NAMELEN -AC_CHECK_HEADER(sys/utsname.h, - -AC_MSG_CHECKING(if sys/utsname.h defines SYS_NMLN) -AC_TRY_COMPILE([#include ], [[ char kver[SYS_NMLN] ]], [ -dnl then - AC_DEFINE(HAVE_SYS_NMLN) - AC_MSG_RESULT(yes) ], [ -dnl else - AC_MSG_RESULT(no) - AC_MSG_CHECKING(if sys/utsname.h defines _SYS_NAMELEN) - AC_TRY_COMPILE([#include ],[[ char kver[_SYS_NAMELEN] ]], [ - dnl then - AC_DEFINE(HAVE__SYS_NAMELEN) - AC_MSG_RESULT(yes) ], [ - dnl else - AC_MSG_RESULT(no) - AC_MSG_WARN([sys/utsname.h does not define SYS_NMLN or _SYS_NAMELEN])],[:]) -],[:]) - -, [AC_MSG_WARN([LCDproc client requires sys/utsname.h.])]) - dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_C_INLINE diff --git a/server/drivers/curses_drv.c b/server/drivers/curses_drv.c index 93a738b..1a5612f 100644 --- a/server/drivers/curses_drv.c +++ b/server/drivers/curses_drv.c @@ -31,6 +31,20 @@ #include "curses_drv.h" //#include "drv_base.h" +// ACS_S9 and ACS_S1 are defined as part of XSI Curses standard, Issue 4. +// However, ACS_S3 and ACS_S7 are not; these definitions were created to support +// commonly available graphics found in many terminfo definitions. The acsc character +// used for ACS_S3 is 'p'; the acsc character used for ACS_S7 is 'r'. +// +// Other systems may very likely support these characters; however, +// their names were invented for ncurses. +#ifndef ACS_S3 +#define ACS_S3 (acs_map['p']) +#endif +#ifndef ACS_S7 +#define ACS_S7 (acs_map['r']) +#endif + lcd_logical_driver *curses_drv; // Character used for title bars... @@ -455,22 +469,7 @@ void curses_drv_vbar (int x, int len) { int y; - -// ACS_S9 and ACS_S1 are defined as part of XSI Curses standard, Issue 4. -// However, ACS_S3 and ACS_S7 are not; these definitions were created to support -// commonly available graphics found in many terminfo definitions. The acsc character -// used for ACS_S3 is 'p'; the acsc character used for ACS_S7 is 'r'. -// -// Other systems may very likely support these characters; however, -// their names were invented for ncurses. -// -// Perhaps we could create our own ACS_S7 and ACS_S3? - -#ifdef DEFINED_ACS char map[] = { ACS_S9, ACS_S9, ACS_S7, ACS_S7, ACS_S3, ACS_S3, ACS_S1, ACS_S1 }; -#else - char map[] = "_.,,ooO8"; -#endif ValidX(x);