Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libterminfo Warn about unprintable characters in capabil...
details: https://anonhg.NetBSD.org/src/rev/e86bb6c726df
branches: trunk
changeset: 351383:e86bb6c726df
user: roy <roy%NetBSD.org@localhost>
date: Sat Feb 11 15:13:17 2017 +0000
description:
Warn about unprintable characters in capability strings.
diffstat:
lib/libterminfo/compile.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 959823069b9b -r e86bb6c726df lib/libterminfo/compile.c
--- a/lib/libterminfo/compile.c Sat Feb 11 15:11:45 2017 +0000
+++ b/lib/libterminfo/compile.c Sat Feb 11 15:13:17 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: compile.c,v 1.10 2017/02/11 14:57:15 roy Exp $ */
+/* $NetBSD: compile.c,v 1.11 2017/02/11 15:13:17 roy Exp $ */
/*
* Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#endif
#include <sys/cdefs.h>
-__RCSID("$NetBSD: compile.c,v 1.10 2017/02/11 14:57:15 roy Exp $");
+__RCSID("$NetBSD: compile.c,v 1.11 2017/02/11 15:13:17 roy Exp $");
#if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H
#include <sys/endian.h>
@@ -347,7 +347,10 @@
ch = '\177';
else if ((ch &= 037) == 0)
ch = (char)128;
- }
+ } else if (!isprint((unsigned char)ch))
+ dowarn(flags,
+ "%s: %s: unprintable character",
+ term, cap);
*p++ = ch;
last = ch;
continue;
Home |
Main Index |
Thread Index |
Old Index