Remove _cursesi_genbuf, it was not being set and caused a SIGSEGV

in getcap().  Fixed getcap() to use screen->cursesi_genbuf.
Thanks to Peter Bex for spotting this.  This closes pr lib/26404.
This commit is contained in:
blymn 2004-07-24 13:10:47 +00:00
parent 5b576a585b
commit 6b3a44ef27
2 changed files with 5 additions and 10 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cr_put.c,v 1.22 2003/08/07 16:44:20 agc Exp $ */
/* $NetBSD: cr_put.c,v 1.23 2004/07/24 13:10:47 blymn Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cr_put.c 8.3 (Berkeley) 5/4/94";
#else
__RCSID("$NetBSD: cr_put.c,v 1.22 2003/08/07 16:44:20 agc Exp $");
__RCSID("$NetBSD: cr_put.c,v 1.23 2004/07/24 13:10:47 blymn Exp $");
#endif
#endif /* not lint */
@ -43,9 +43,6 @@ __RCSID("$NetBSD: cr_put.c,v 1.22 2003/08/07 16:44:20 agc Exp $");
#include "curses.h"
#include "curses_private.h"
/* the following is defined and set up in setterm.c */
extern struct tinfo *_cursesi_genbuf;
#define HARDTABS 8
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: setterm.c,v 1.38 2003/10/21 00:30:05 fvdl Exp $ */
/* $NetBSD: setterm.c,v 1.39 2004/07/24 13:10:47 blymn Exp $ */
/*
* Copyright (c) 1981, 1993, 1994
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
#else
__RCSID("$NetBSD: setterm.c,v 1.38 2003/10/21 00:30:05 fvdl Exp $");
__RCSID("$NetBSD: setterm.c,v 1.39 2004/07/24 13:10:47 blymn Exp $");
#endif
#endif /* not lint */
@ -53,8 +53,6 @@ static int zap(SCREEN *screen);
static int does_esc_m(char *cap);
static int does_ctrl_o(char *cap);
struct tinfo *_cursesi_genbuf;
static char *sflags[] = {
/* am bs cc da eo */
&__tc_am, &__tc_bs, &__tc_cc, &__tc_da, &__tc_eo,
@ -418,7 +416,7 @@ zap(SCREEN *screen)
char *
getcap(char *name)
{
return (t_agetstr(_cursesi_genbuf, name));
return (t_agetstr(_cursesi_screen->cursesi_genbuf, name));
}
/*