From: Robert Luberda <robert@debian.org>
Date: Thu, 6 Feb 2003 22:59:25 +0100
Subject: 003 hman browser

Rename BROWSER variable to HMAN_BROWSER in the hman.sh script
to avoid conflict with sensible-browser's BROWSER.
---
 man2html/hman.sh | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/man2html/hman.sh b/man2html/hman.sh
index cb72090..915522a 100755
--- a/man2html/hman.sh
+++ b/man2html/hman.sh
@@ -17,26 +17,26 @@
 # hman from %version%
 #
 
-if [ x"$1" = x"-v" -o x"$1" = x"-V" ]; then
+if [ x"$1" = x"-v" ] || [ x"$1" = x"-V" ]; then
 	echo "`basename $0` from %version%"
 	exit 0
 fi
 
 # The user has to set MANHTMLPAGER (or he will get httpd-free lynx).
 # Pick your favorite browser: lynx, xmosaic, netscape, arena, amaya, grail, ...
-BROWSER=${MANHTMLPAGER-lynxcgi}
+HMAN_BROWSER=${MANHTMLPAGER-lynxcgi}
 #
 # If the man pages are on a remote host, specify it in MANHTMLHOST.
 HOST=${MANHTMLHOST-localhost}
 
 # Perhaps the browser was specified on the command line?
-if [ $# -gt 1 -a "$1" = "-P" ]; then
-    BROWSER="$2"
+if [ "$#" -gt 1 ] && [ x"$1" = x"-P" ]; then
+    HMAN_BROWSER="$2"
     shift; shift
 fi
 
 # Perhaps the host was specified on the command line?
-if [ $# -gt 1 -a "$1" = "-H" ]; then
+if [ "$#" -gt 1 ] && [ x"$1" = x"-H" ]; then
     HOST="$2"
     shift; shift
 fi
@@ -54,13 +54,13 @@ nsfunc () {
 	fi
 }
 
-case $BROWSER in
+case "$HMAN_BROWSER" in
      lynxcgi)
-	BROWSER=lynx
+	HMAN_BROWSER=lynx
 	CG="lynxcgi:/home/httpd/cgi-bin/man"
 	;;
      netscape)
-        BROWSER=nsfunc
+        HMAN_BROWSER=nsfunc
         CG="http://$HOST/cgi-bin/man"
 	;;
      *)
@@ -68,26 +68,26 @@ case $BROWSER in
 	;;
 esac
 
-  case $# in
-     0)   $BROWSER $CG/man2html ;;
+  case "$#" in
+     0)   $HMAN_BROWSER "$CG/man2html" ;;
      1)   case "$1" in
 	    1|2|3|4|5|6|7|8|l|n)
-		$BROWSER "$CG/mansec?$CG+$1" ;;
+		$HMAN_BROWSER "$CG/mansec?$CG+$1" ;;
 	    /*)
-		$BROWSER "$CG/man2html?$1" ;;
+		$HMAN_BROWSER "$CG/man2html?$1" ;;
 	    */*)
-		$BROWSER "$CG/man2html?$PWD/$1" ;;
+		$HMAN_BROWSER "$CG/man2html?$PWD/$1" ;;
 	    *)
-		$BROWSER "$CG/man2html?$1" ;;
+		$HMAN_BROWSER "$CG/man2html?$1" ;;
           esac ;;
      2)   case "$1" in
             -k)
-                $BROWSER "$CG/mansearch?$2" ;;
+                $HMAN_BROWSER "$CG/mansearch?$2" ;;
             *)
 		if [ "$2" = index ]; then
-		    $BROWSER "$CG/manwhatis?$CG+$1"
+		    $HMAN_BROWSER "$CG/manwhatis?$CG+$1"
                 else
-		    $BROWSER "$CG/man2html?$1+$2"
+		    $HMAN_BROWSER "$CG/man2html?$1+$2"
                 fi ;;
           esac ;;
      *)   echo "bad number of args" ;;
