Module Name:    src
Committed By:   christos
Date:           Sun Aug 15 12:39:39 UTC 2021

Modified Files:
        src/lib/libcurses: curses_private.h slk.c

Log Message:
This is a mess; always define MB_LEN_MAX so both the regular and libhack
version of curses compiles. Really we should not be defining MB_LEN_MAX here,
and include <limits.h> in curses_private.h to get it.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/lib/libcurses/curses_private.h
cvs rdiff -u -r1.13 -r1.14 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/curses_private.h
diff -u src/lib/libcurses/curses_private.h:1.73 src/lib/libcurses/curses_private.h:1.74
--- src/lib/libcurses/curses_private.h:1.73	Sat Mar 14 21:12:47 2020
+++ src/lib/libcurses/curses_private.h	Sun Aug 15 08:39:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: curses_private.h,v 1.73 2020/03/15 01:12:47 uwe Exp $	*/
+/*	$NetBSD: curses_private.h,v 1.74 2021/08/15 12:39:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998-2000 Brett Lymn
@@ -299,8 +299,14 @@ struct __screen {
 	bool		 slk_hidden;
 	struct __slk_label *slk_labels;
 
-#ifdef HAVE_WCHAR
+/*
+ * XXX: This conflicts with the value in <limits.h> (32)
+ * which should be used here instead of defining a different value,
+ * but I am not changing it because it is also used in the WCOL()
+ * macro and I don't understand the effects of it.
+ */
 #define MB_LEN_MAX 8
+#ifdef HAVE_WCHAR
 #define MAX_CBUF_SIZE MB_LEN_MAX
 	int		cbuf_head;		/* header to cbuf */
 	int		cbuf_tail;		/* tail to cbuf */

Index: src/lib/libcurses/slk.c
diff -u src/lib/libcurses/slk.c:1.13 src/lib/libcurses/slk.c:1.14
--- src/lib/libcurses/slk.c:1.13	Sun Aug 15 07:54:12 2021
+++ src/lib/libcurses/slk.c	Sun Aug 15 08:39:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: slk.c,v 1.13 2021/08/15 11:54:12 christos Exp $	*/
+/*	$NetBSD: slk.c,v 1.14 2021/08/15 12:39:39 christos Exp $	*/
 
 /*-
  * Copyright (c) 2017 The NetBSD Foundation, Inc.
@@ -31,13 +31,12 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: slk.c,v 1.13 2021/08/15 11:54:12 christos Exp $");
+__RCSID("$NetBSD: slk.c,v 1.14 2021/08/15 12:39:39 christos Exp $");
 #endif				/* not lint */
 
 #include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
-#include <limits.h>
 #ifdef HAVE_WCHAR
 #include <wctype.h>
 #endif

Reply via email to