Module Name: src Committed By: christos Date: Sun Sep 15 21:09:11 UTC 2019
Modified Files: src/lib/libedit: chartype.h terminal.c Log Message: Fix type and remove cast (Yuichiro NAITO/FreeBSD). To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/lib/libedit/chartype.h cvs rdiff -u -r1.39 -r1.40 src/lib/libedit/terminal.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/libedit/chartype.h diff -u src/lib/libedit/chartype.h:1.35 src/lib/libedit/chartype.h:1.36 --- src/lib/libedit/chartype.h:1.35 Mon May 22 15:16:25 2017 +++ src/lib/libedit/chartype.h Sun Sep 15 17:09:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.h,v 1.35 2017/05/22 19:16:25 christos Exp $ */ +/* $NetBSD: chartype.h,v 1.36 2019/09/15 21:09:11 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -87,7 +87,7 @@ libedit_private size_t ct_enc_width(wcha /* The terminal is thought of in terms of X columns by Y lines. In the cases * where a wide character takes up more than one column, the adjacent * occupied column entries will contain this faux character. */ -#define MB_FILL_CHAR ((wchar_t)-1) +#define MB_FILL_CHAR ((wint_t)-1) /* Visual width of character c, taking into account ^? , \0177 and \U+nnnnn * style visual expansions. */ Index: src/lib/libedit/terminal.c diff -u src/lib/libedit/terminal.c:1.39 src/lib/libedit/terminal.c:1.40 --- src/lib/libedit/terminal.c:1.39 Tue Jul 23 06:18:52 2019 +++ src/lib/libedit/terminal.c Sun Sep 15 17:09:11 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: terminal.c,v 1.39 2019/07/23 10:18:52 christos Exp $ */ +/* $NetBSD: terminal.c,v 1.40 2019/09/15 21:09:11 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)term.c 8.2 (Berkeley) 4/30/95"; #else -__RCSID("$NetBSD: terminal.c,v 1.39 2019/07/23 10:18:52 christos Exp $"); +__RCSID("$NetBSD: terminal.c,v 1.40 2019/09/15 21:09:11 christos Exp $"); #endif #endif /* not lint && not SCCSID */ @@ -1224,7 +1224,7 @@ terminal__putc(EditLine *el, wint_t c) { char buf[MB_LEN_MAX +1]; ssize_t i; - if (c == (wint_t)MB_FILL_CHAR) + if (c == MB_FILL_CHAR) return 0; if (c & EL_LITERAL) return fputs(literal_get(el, c), el->el_outfile);