Module Name: src
Committed By: roy
Date: Thu Oct 4 19:11:09 UTC 2018
Modified Files:
src/lib/libcurses: slk.c
Log Message:
curses: once __slk_init is called, reset slk_fmt
This allows soft label keys to be used on more than one terminal.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/lib/libcurses/slk.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libcurses/slk.c
diff -u src/lib/libcurses/slk.c:1.3 src/lib/libcurses/slk.c:1.4
--- src/lib/libcurses/slk.c:1.3 Thu Oct 4 18:40:41 2018
+++ src/lib/libcurses/slk.c Thu Oct 4 19:11:09 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: slk.c,v 1.3 2018/10/04 18:40:41 roy Exp $ */
+/* $NetBSD: slk.c,v 1.4 2018/10/04 19:11:09 roy Exp $ */
/*-
* Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: slk.c,v 1.3 2018/10/04 18:40:41 roy Exp $");
+__RCSID("$NetBSD: slk.c,v 1.4 2018/10/04 19:11:09 roy Exp $");
#endif /* not lint */
#include <ctype.h>
@@ -560,10 +560,12 @@ __slk_init(SCREEN *screen)
{
__slk_free(screen); /* safety */
+
+ screen->slk_format = slk_fmt;
if (slk_fmt == SLK_FMT_INVAL)
return OK;
+ slk_fmt = SLK_FMT_INVAL;
- screen->slk_format = slk_fmt;
switch(screen->slk_format) {
case SLK_FMT_3_2_3:
case SLK_FMT_4_4: