Module Name: src
Committed By: roy
Date: Sat Feb 11 15:13:17 UTC 2017
Modified Files:
src/lib/libterminfo: compile.c
Log Message:
Warn about unprintable characters in capability strings.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libterminfo/compile.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/libterminfo/compile.c
diff -u src/lib/libterminfo/compile.c:1.10 src/lib/libterminfo/compile.c:1.11
--- src/lib/libterminfo/compile.c:1.10 Sat Feb 11 14:57:15 2017
+++ src/lib/libterminfo/compile.c Sat Feb 11 15:13:17 2017
@@ -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 @@ encode_string(const char *term, const ch
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;