Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libcurses curses: once __slk_init is called, reset slk_fmt
details: https://anonhg.NetBSD.org/src/rev/5a4c34f7fbf7
branches: trunk
changeset: 433790:5a4c34f7fbf7
user: roy <roy%NetBSD.org@localhost>
date: Thu Oct 04 19:11:09 2018 +0000
description:
curses: once __slk_init is called, reset slk_fmt
This allows soft label keys to be used on more than one terminal.
diffstat:
lib/libcurses/slk.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r f7dca9570663 -r 5a4c34f7fbf7 lib/libcurses/slk.c
--- a/lib/libcurses/slk.c Thu Oct 04 18:40:41 2018 +0000
+++ b/lib/libcurses/slk.c Thu Oct 04 19:11:09 2018 +0000
@@ -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_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:
Home |
Main Index |
Thread Index |
Old Index