[Lunar-commits] <moonbase> man: optionally output Unicode instead of latin1

Paul Bredbury brebs at lunar-linux.org
Sun Feb 27 16:25:22 CET 2011


commit 8d57e1abf5b7cb2aa6b5e99890b0772f02479f81
Author: Paul Bredbury <brebs at lunar-linux.org>
Date:   Sun Feb 27 22:25:22 2011 +0700

    man: optionally output Unicode instead of latin1
    
    makes manpages slightly less ugly on Unicode terminals.
    
    To improve further, we should probably switch to man-db.
---
 doc-tools/man/BUILD     |    8 +++++++-
 doc-tools/man/CONFIGURE |    1 +
 doc-tools/man/DETAILS   |   10 +++++-----
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/doc-tools/man/BUILD b/doc-tools/man/BUILD
index ee61ed5..7cacbd0 100644
--- a/doc-tools/man/BUILD
+++ b/doc-tools/man/BUILD
@@ -4,7 +4,13 @@
   patch_it $SOURCE2 1 &&
   patch_it $SOURCE3 1 &&
 
-  ./configure -d -confdir /etc -compatibility_mode_for_colored_groff  &&
+  if [ "$UCODE" == "y" ] ; then
+    # Example:  man top | grep -B1 "two help"
+    # which should show an apostrophe, rather than "<B4>"
+    sedit "s:nroff -Tlatin1:nroff:" configure
+  fi &&
+
+  ./configure -d -confdir /etc -compatibility_mode_for_colored_groff &&
   default_make
 
 ) > $C_FIFO 2>&1
diff --git a/doc-tools/man/CONFIGURE b/doc-tools/man/CONFIGURE
new file mode 100644
index 0000000..6409506
--- /dev/null
+++ b/doc-tools/man/CONFIGURE
@@ -0,0 +1 @@
+mquery UCODE "Output Unicode instead of latin1?" n
diff --git a/doc-tools/man/DETAILS b/doc-tools/man/DETAILS
index c6a2a70..1084afe 100644
--- a/doc-tools/man/DETAILS
+++ b/doc-tools/man/DETAILS
@@ -17,10 +17,10 @@
            PSAFE="no"
 
 cat << EOF
-This package provides the man command. 
-This utility is the primary way of examining the on-line help files 
-(manual pages). Other utilities provided include the whatis and 
-apropos commands for searching the manual page database, the manpath 
-utility for determining the manual page search path, and the 
+This package provides the man command.
+This utility is the primary way of examining the on-line help files
+(manual pages). Other utilities provided include the whatis and
+apropos commands for searching the manual page database, the manpath
+utility for determining the manual page search path, and the
 maintenance utilities mandb, catman and zsoelim.
 EOF


More information about the Lunar-commits mailing list