-/* $OpenBSD: ttinit.c,v 1.5 1999/11/14 17:34:24 millert Exp $ */
+/* $OpenBSD: ttinit.c,v 1.6 2000/04/14 18:43:34 millert Exp $ */
/* $NetBSD: ttinit.c,v 1.3 1995/09/28 10:34:50 tls Exp $ */
/*
#if 0
static char sccsid[] = "@(#)ttinit.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: ttinit.c,v 1.5 1999/11/14 17:34:24 millert Exp $";
+static char rcsid[] = "$OpenBSD: ttinit.c,v 1.6 2000/04/14 18:43:34 millert Exp $";
#endif
#endif /* not lint */
tt_obe = tt_ob + i;
/*
- * Use the standard name of the terminal (i.e. the second
- * name in termcap).
+ * Use the standard name of the terminal (i.e. the first
+ * non-two letter name in termcap).
*/
#ifdef NCURSES_VERSION
wwterm = strdup(_nc_first_name(cur_term->type.term_names));
#else
- for (p = wwtermcap; *p && *p != '|' && *p != ':'; p++)
- ;
- if (*p == '|')
- p++;
+ if ((p = strchr(wwtermcap, '|')) && p - wwtermcap == 2) {
+ /* Skip the two-character short name. */
+ for (p = wwtermcap; *p && *p != '|' && *p != ':'; p++)
+ ;
+ if (*p == '|')
+ p++;
+ } else
+ p = wwtermcap;
for (q = p; *q && *q != '|' && *q != ':'; q++)
;
if (q != p && (t = malloc(q - p + 1)) != 0) {
-/* $OpenBSD: ww.h,v 1.6 1997/02/25 00:04:36 downsj Exp $ */
+/* $OpenBSD: ww.h,v 1.7 2000/04/14 18:43:34 millert Exp $ */
/* $NetBSD: ww.h,v 1.9 1996/10/12 23:46:23 christos Exp $ */
/*
/* the window virtual terminal */
#define WWT_TERM "window-v2"
-#define WWT_TERMCAP "WW|window-v2|window program version 2:\
+#define WWT_TERMCAP "window-v2|window program version 2:\
:am:bs:da:db:ms:pt:cr=^M:nl=^J:bl=^G:ta=^I:\
:cm=\\EY%+ %+ :le=^H:nd=\\EC:up=\\EA:do=\\EB:ho=\\EH:\
:cd=\\EJ:ce=\\EK:cl=\\EE:me=\\Er^?:"