Module Name: src
Committed By: christos
Date: Wed Feb 13 04:58:18 UTC 2013
Modified Files:
src/lib/libc/gen: vis.c
Log Message:
explain we we want wide character support here.
To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/lib/libc/gen/vis.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/libc/gen/vis.c
diff -u src/lib/libc/gen/vis.c:1.46 src/lib/libc/gen/vis.c:1.47
--- src/lib/libc/gen/vis.c:1.46 Tue Feb 12 23:49:59 2013
+++ src/lib/libc/gen/vis.c Tue Feb 12 23:58:17 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: vis.c,v 1.46 2013/02/13 04:49:59 christos Exp $ */
+/* $NetBSD: vis.c,v 1.47 2013/02/13 04:58:17 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.46 2013/02/13 04:49:59 christos Exp $");
+__RCSID("$NetBSD: vis.c,v 1.47 2013/02/13 04:58:17 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#ifdef __FBSDID
__FBSDID("$FreeBSD$");
@@ -84,6 +84,14 @@ __weak_alias(strvisx,_strvisx)
#include <stdio.h>
#include <string.h>
+/*
+ * The reason for going through the trouble to deal with character encodings
+ * in vis(3), is that we use this to safe encode output of commands. This
+ * safe encoding varies depending on the character set. For example if we
+ * display ps output in French, we don't want to display French characters
+ * as M-foo.
+ */
+
static wchar_t *do_svis(wchar_t *, int, int, int, const wchar_t *);
#undef BELL