Get the ESCDELAY from the environment.

This commit is contained in:
christos 2009-02-22 20:05:48 +00:00
parent 58e089a802
commit 4534498c64
1 changed files with 7 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: setterm.c,v 1.43 2007/10/06 20:14:41 martin Exp $ */ /* $NetBSD: setterm.c,v 1.44 2009/02/22 20:05:48 christos Exp $ */
/* /*
* Copyright (c) 1981, 1993, 1994 * Copyright (c) 1981, 1993, 1994
@ -34,7 +34,7 @@
#if 0 #if 0
static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94"; static char sccsid[] = "@(#)setterm.c 8.8 (Berkeley) 10/25/94";
#else #else
__RCSID("$NetBSD: setterm.c,v 1.43 2007/10/06 20:14:41 martin Exp $"); __RCSID("$NetBSD: setterm.c,v 1.44 2009/02/22 20:05:48 christos Exp $");
#endif #endif
#endif /* not lint */ #endif /* not lint */
@ -160,9 +160,12 @@ _cursesi_setterm(char *type, SCREEN *screen)
/* POSIX 1003.2 requires that the environment override. */ /* POSIX 1003.2 requires that the environment override. */
if ((p = getenv("LINES")) != NULL) if ((p = getenv("LINES")) != NULL)
screen->LINES = (int) strtol(p, NULL, 10); screen->LINES = (int) strtol(p, NULL, 0);
if ((p = getenv("COLUMNS")) != NULL) if ((p = getenv("COLUMNS")) != NULL)
screen->COLS = (int) strtol(p, NULL, 10); screen->COLS = (int) strtol(p, NULL, 0);
if ((p = getenv("ESCDELAY")) != NULL)
ESCDELAY = (int) strtol(p, NULL, 0);
/* /*
* Want cols > 4, otherwise things will fail. * Want cols > 4, otherwise things will fail.