summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2001-04-12 04:08:07 +0000
committerClint Adams <clint@users.sourceforge.net>2001-04-12 04:08:07 +0000
commit43cd922cd82026eaa968aeafd29f08ea386bb492 (patch)
tree99f12e43175191ab6ec8b014d56601423c1445c6
parente05ca62a9cd33a116454bd471e33c17f9c0c8191 (diff)
downloadzsh-43cd922cd82026eaa968aeafd29f08ea386bb492.tar.gz
zsh-43cd922cd82026eaa968aeafd29f08ea386bb492.zip
13955: boolnames et al., not boolcodes
-rw-r--r--ChangeLog3
-rw-r--r--Src/Modules/terminfo.c18
-rw-r--r--acconfig.h15
-rw-r--r--configure.in15
4 files changed, 39 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 201d9d6d6..087128845 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2001-04-12 Clint Adams <schizo@debian.org>
+ * 13955: acconfig.h, configure.in, Src/Modules/terminfo.c:
+ s/codes/names/.
+
* 13953: acconfig.h, configure.in, Src/Modules/terminfo.c:
have configure check for the existence of boolcodes,
numcodes, and strcodes symbols, and presume that they
diff --git a/Src/Modules/terminfo.c b/Src/Modules/terminfo.c
index f5d9bc935..56ab62fb7 100644
--- a/Src/Modules/terminfo.c
+++ b/Src/Modules/terminfo.c
@@ -208,16 +208,16 @@ scanterminfo(HashTable ht, ScanFunc func, int flags)
int num;
char **capname, *tistr;
-#ifndef HAVE_BOOLCODES
- static char *boolcodes[] = {
+#ifndef HAVE_BOOLNAMES
+ static char *boolnames[] = {
"bw", "am", "bce", "ccc", "xhp", "xhpa", "cpix", "crxm", "xt", "xenl",
"eo", "gn", "hc", "chts", "km", "daisy", "hs", "hls", "in", "lpix",
"da", "db", "mir", "msgr", "nxon", "xsb", "npc", "ndscr", "nrrmc",
"os", "mc5i", "xvpa", "sam", "eslok", "hz", "ul", "xon", NULL};
#endif
-#ifndef HAVE_NUMCODES
- static char *numcodes[] = {
+#ifndef HAVE_NUMNAMES
+ static char *numnames[] = {
"cols", "it", "lh", "lw", "lines", "lm", "xmc", "ma", "colors",
"pairs", "wnum", "ncv", "nlab", "pb", "vt", "wsl", "bitwin",
"bitype", "bufsz", "btns", "spinh", "spinv", "maddr", "mjump",
@@ -225,8 +225,8 @@ scanterminfo(HashTable ht, ScanFunc func, int flags)
NULL};
#endif
-#ifndef HAVE_STRCODES
- static char *strcodes[] = {
+#ifndef HAVE_STRNAMES
+ static char *strnames[] = {
"acsc", "cbt", "bel", "cr", "cpi", "lpi", "chr", "cvr", "csr", "rmp",
"tbc", "mgc", "clear", "el1", "el", "ed", "hpa", "cmdch", "cwin",
"cup", "cud1", "home", "civis", "cub1", "mrcup", "cnorm", "cuf1",
@@ -288,7 +288,7 @@ scanterminfo(HashTable ht, ScanFunc func, int flags)
pm->old = NULL;
pm->flags = PM_READONLY | PM_SCALAR;
- for (capname = (char **)boolcodes; *capname; capname++) {
+ for (capname = (char **)boolnames; *capname; capname++) {
if ((num = tigetflag(*capname)) != -1) {
pm->u.str = num ? dupstring("yes") : dupstring("no");
pm->nam = dupstring(*capname);
@@ -297,7 +297,7 @@ scanterminfo(HashTable ht, ScanFunc func, int flags)
}
pm->flags = PM_READONLY | PM_INTEGER;
- for (capname = (char **)numcodes; *capname; capname++) {
+ for (capname = (char **)numnames; *capname; capname++) {
if (((num = tigetnum(*capname)) != -1) && (num != -2)) {
pm->u.val = num;
pm->nam = dupstring(*capname);
@@ -306,7 +306,7 @@ scanterminfo(HashTable ht, ScanFunc func, int flags)
}
pm->flags = PM_READONLY | PM_SCALAR;
- for (capname = (char **)strcodes; *capname; capname++) {
+ for (capname = (char **)strnames; *capname; capname++) {
if ((tistr = (char *)tigetstr(*capname)) != NULL &&
tistr != (char *)-1) {
pm->u.str = dupstring(tistr);
diff --git a/acconfig.h b/acconfig.h
index f4744d2d7..e28bbc587 100644
--- a/acconfig.h
+++ b/acconfig.h
@@ -300,11 +300,20 @@
/* Define to 1 if h_errno is not defined by the system */
#undef USE_LOCAL_H_ERRNO
-/* Define if you have the terminfo boolcodes symbol. */
+/* Define if you have the termcap boolcodes symbol. */
#undef HAVE_BOOLCODES
-/* Define if you have the terminfo numcodes symbol. */
+/* Define if you have the termcap numcodes symbol. */
#undef HAVE_NUMCODES
-/* Define if you have the terminfo strcodes symbol. */
+/* Define if you have the termcap strcodes symbol. */
#undef HAVE_STRCODES
+
+/* Define if you have the terminfo boolnames symbol. */
+#undef HAVE_BOOLNAMES
+
+/* Define if you have the terminfo numnames symbol. */
+#undef HAVE_NUMNAMES
+
+/* Define if you have the terminfo strnames symbol. */
+#undef HAVE_STRNAMES
diff --git a/configure.in b/configure.in
index d6cd03753..8e9f58629 100644
--- a/configure.in
+++ b/configure.in
@@ -530,6 +530,21 @@ AC_TRY_COMPILE([#include <curses.h>
#include <term.h>], [char **test = strcodes;],
AC_DEFINE(HAVE_STRCODES) strcodes=yes, strcodes=no)
AC_MSG_RESULT($strcodes)
+AC_MSG_CHECKING(if boolnames is available)
+AC_TRY_COMPILE([#include <curses.h>
+#include <term.h>], [char **test = boolnames;],
+AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes, boolnames=no)
+AC_MSG_RESULT($boolnames)
+AC_MSG_CHECKING(if numnames is available)
+AC_TRY_COMPILE([#include <curses.h>
+#include <term.h>], [char **test = numnames;],
+AC_DEFINE(HAVE_NUMNAMES) numnames=yes, numnames=no)
+AC_MSG_RESULT($numnames)
+AC_MSG_CHECKING(if strnames is available)
+AC_TRY_COMPILE([#include <curses.h>
+#include <term.h>], [char **test = strnames;],
+AC_DEFINE(HAVE_STRNAMES) strnames=yes, strnames=no)
+AC_MSG_RESULT($strnames)
dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require
dnl libnsl (Network Services Library) to find yp_all