Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: correct idiocy
- X-seq: zsh-workers 13955
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: PATCH: correct idiocy
- Date: Thu, 12 Apr 2001 00:05:04 -0400
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <1010412032348.ZM20888@xxxxxxxxxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxxxxxxxxx on Thu, Apr 12, 2001 at 03:23:48AM +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010411203005.A13303@xxxxxxxx> <1010412012435.ZM20772@xxxxxxxxxxxxxxxxxxxxxxx> <20010411224402.A16551@xxxxxxxx> <1010412032348.ZM20888@xxxxxxxxxxxxxxxxxxxxxxx>
> ?? The `names' arrays are supposed to contain the terminfo names, and
> the `codes' arrays the termcap codes. Do you mean that the two will be
> the same under ncurses?
No, I appear to be completely delirious.
Index: acconfig.h
===================================================================
RCS file: /cvsroot/zsh/zsh/acconfig.h,v
retrieving revision 1.5
diff -u -r1.5 acconfig.h
--- acconfig.h 2001/04/12 02:49:14 1.5
+++ acconfig.h 2001/04/12 04:03:53
@@ -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
Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.42
diff -u -r1.42 configure.in
--- configure.in 2001/04/12 02:49:14 1.42
+++ configure.in 2001/04/12 04:03:54
@@ -530,6 +530,21 @@
#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
Index: Src/Modules/terminfo.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/terminfo.c,v
retrieving revision 1.11
diff -u -r1.11 terminfo.c
--- Src/Modules/terminfo.c 2001/04/12 02:49:14 1.11
+++ Src/Modules/terminfo.c 2001/04/12 04:03:54
@@ -208,16 +208,16 @@
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 @@
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 @@
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 @@
}
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 @@
}
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);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author