Thank you for your time,
-Chase
From 08ab64e8a63c3c146f149a8fb342332a3c1d904b Mon Sep 17 00:00:00 2001
From: chase <ch...@localhost.com>
Date: Sun, 14 Oct 2018 15:02:37 -0500
Subject: [PATCH] dbtoman: Improve readability
---
cde/doc/util/dbtoman/dbtoman | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/cde/doc/util/dbtoman/dbtoman b/cde/doc/util/dbtoman/dbtoman
index a76d41d3..af4cdb1f 100755
--- a/cde/doc/util/dbtoman/dbtoman
+++ b/cde/doc/util/dbtoman/dbtoman
@@ -5,20 +5,20 @@
# dbtoman
#
#############################################################################
-#
+#
# Copyright (c) 1996 X Consortium
# Copyright (c) 1996 Dalrymple Consulting
-#
+#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
-#
+#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
-#
+#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
@@ -26,12 +26,12 @@
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
-#
+#
# Except as contained in this notice, the names of the X Consortium and
# Dalrymple Consulting shall not be used in advertising or otherwise to
# promote the sale, use or other dealings in this Software without prior
# written authorization.
-#
+#
trap "rm -f /tmp/dtm.$$.psinc /tmp/dtm.$$.out1 /tmp/dtm.$$.out2" 0 1 2 3 4 5 6 7 8 10 12 15
@@ -41,17 +41,10 @@ TPT_LIB=$CDETOP/doc/util/dbtoman/transpec
export TPT_LIB
PARSER=$CDETOP/programs/nsgmls/nsgmls
-if [ -x $PARSER ]
-then
PARSER_OPTS="-g -oline -wno-idref"
SGML_CATALOG_FILES="$SGML/catalog"
export SGML_CATALOG_FILES
-else
-PARSER=$CDETOP/programs/dtdocbook/sgmls/sgmls
-PARSER_OPTS="-gl"
-SGML_PATH="$SGML/%P:$SGML/%S:%S"
-export SGML_PATH
-fi
+
INSTANT=$CDETOP/doc/util/dbtoman/instant/instant
INSTANT_OPT=-d
@@ -59,7 +52,7 @@ DECL=$CDETOP/programs/dtdocbook/doc2sdl/docbook.sgml
NROFF=
-if [ $# -gt 0 -a $1 = "-c" ]
+if [ $# -gt 0 ] && [ $1 = "-c" ]
then
NROFF="| tbl | nroff -man"
shift
@@ -76,7 +69,8 @@ cat > /tmp/dtm.$$.psinc <<\!
'\" t
!
-grep '<\!-- $''XConsortium: ' $REFFILE | sed -e 's/<\!-- $''XConsortium:/...\\"/g' -e 's/ -->//g' >> /tmp/dtm.$$.psinc
+grep '<\!-- $''XConsortium: ' $REFFILE | \
+sed -e 's/<\!-- $''XConsortium:/...\\"/g' -e 's/ -->//g' >> /tmp/dtm.$$.psinc
cat >> /tmp/dtm.$$.psinc <<\!
.de P!
@@ -126,4 +120,9 @@ cat >> /tmp/dtm.$$.psinc <<\!
.ds f4\"
!
-cat $DECL $DCLFILE $REFFILE | sed -e 's/<\!\[[ ]*\%CDE\.C\.CDE;[ ]*\[<[rR]ef[eE]ntry [iI]d="[^"]*">\]\]>/<refentry>/g' | $PARSER $PARSER_OPTS | $INSTANT $INSTANT_OPT -croff.cmap -sroff.sdata -tdocbook-to-man.ts > /tmp/dtm.$$.out1 && eval cat /tmp/dtm.$$.psinc /tmp/dtm.$$.out1 $NROFF > /tmp/dtm.$$.out2 && cp /tmp/dtm.$$.out2 $MANFILE
+cat $DECL $DCLFILE $REFFILE | \
+sed -e 's/<\!\[[ ]*\%CDE\.C\.CDE;[ ]*\[<[rR]ef[eE]ntry [iI]d="[^"]*">\]\]>/<refentry>/g' | \
+$PARSER $PARSER_OPTS | \
+$INSTANT $INSTANT_OPT -croff.cmap -sroff.sdata -tdocbook-to-man.ts > \
+/tmp/dtm.$$.out1 && eval cat /tmp/dtm.$$.psinc /tmp/dtm.$$.out1 $NROFF > \
+/tmp/dtm.$$.out2 && cp /tmp/dtm.$$.out2 $MANFILE
--
2.17.1
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel