c49e6c
--- Original/backends/dvi	2003-01-13 18:14:10.000000000 +0100
c49e6c
+++ Changes/backends/dvi	2007-05-21 14:10:42.000000000 +0200
c49e6c
@@ -6,31 +6,31 @@
c49e6c
 export TEXINPUTS
c49e6c
 
c49e6c
 # Convert to TeX
c49e6c
-$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
c49e6c
+$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then exit 1
c49e6c
 fi
c49e6c
 
c49e6c
 # Convert from TeX to DVI
c49e6c
-jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
c49e6c
+jadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then
c49e6c
-  cat ${SGML_FILE_NAME}.tmp
c49e6c
-  rm ${SGML_FILE_NAME}.tmp
c49e6c
-  rm ${SGML_FILE_NAME}.tex
c49e6c
+  cat "${SGML_FILE_NAME}.tmp"
c49e6c
+  rm "${SGML_FILE_NAME}.tmp"
c49e6c
+  rm "${SGML_FILE_NAME}.tex"
c49e6c
   exit 2
c49e6c
 fi
c49e6c
-rm ${SGML_FILE_NAME}.tmp
c49e6c
+rm "${SGML_FILE_NAME}.tmp"
c49e6c
 
c49e6c
 # If there are unresolved references, re-run jadetex, twice 
c49e6c
-if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
c49e6c
+if egrep '^LaTeX Warning: There were undefined references.$' "${SGML_FILE_NAME}.log" >/dev/null 2>&1
c49e6c
 then
c49e6c
-    jadetex ${SGML_FILE_NAME}.tex >/dev/null
c49e6c
-    jadetex ${SGML_FILE_NAME}.tex >/dev/null
c49e6c
+    jadetex "${SGML_FILE_NAME}.tex" >/dev/null
c49e6c
+    jadetex "${SGML_FILE_NAME}.tex" >/dev/null
c49e6c
 fi
c49e6c
-rm ${SGML_FILE_NAME}.log
c49e6c
-rm ${SGML_FILE_NAME}.aux
c49e6c
-rm ${SGML_FILE_NAME}.tex
c49e6c
-rm ${SGML_FILE_NAME}.out
c49e6c
+rm "${SGML_FILE_NAME}.log"
c49e6c
+rm "${SGML_FILE_NAME}.aux"
c49e6c
+rm "${SGML_FILE_NAME}.tex"
c49e6c
+rm "${SGML_FILE_NAME}.out"
c49e6c
 
c49e6c
 exit 0
c49e6c
--- Original/backends/html	2000-07-21 20:15:22.000000000 +0200
c49e6c
+++ Changes/backends/html	2007-05-21 14:11:32.000000000 +0200
c49e6c
@@ -3,7 +3,7 @@
c49e6c
 # This program is under GPL license. See LICENSE file for details.
c49e6c
 
c49e6c
 # Convert to HTML
c49e6c
-$SGML_JADE -t sgml $SGML_ARGUMENTS
c49e6c
+$SGML_JADE -t sgml $SGML_ARGUMENTS "$SGML_FILE"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then exit 1
c49e6c
 fi
c49e6c
--- Original/backends/pdf	2003-03-17 18:47:11.000000000 +0100
c49e6c
+++ Changes/backends/pdf	2007-05-21 14:13:58.000000000 +0200
c49e6c
@@ -6,26 +6,26 @@
c49e6c
 export TEXINPUTS
c49e6c
 
c49e6c
 # Convert to TeX
c49e6c
-$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
c49e6c
+$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then exit 1
c49e6c
 fi
c49e6c
 
c49e6c
 # Convert from TeX to PDF
c49e6c
-pdfjadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
c49e6c
+pdfjadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then
c49e6c
-  cat ${SGML_FILE_NAME}.tmp
c49e6c
-  rm ${SGML_FILE_NAME}.tmp
c49e6c
-  rm ${SGML_FILE_NAME}.tex
c49e6c
+  cat "${SGML_FILE_NAME}.tmp"
c49e6c
+  rm "${SGML_FILE_NAME}.tmp"
c49e6c
+  rm "${SGML_FILE_NAME}.tex"
c49e6c
   exit 2
c49e6c
 fi
c49e6c
-rm ${SGML_FILE_NAME}.tmp
c49e6c
+rm "${SGML_FILE_NAME}.tmp"
c49e6c
 
c49e6c
 # Unconditionally re-run pdfjadetex, twice 
c49e6c
-pdfjadetex ${SGML_FILE_NAME}.tex >/dev/null
c49e6c
-pdfjadetex ${SGML_FILE_NAME}.tex >/dev/null
c49e6c
-rm -f ${SGML_FILE_NAME}.log ${SGML_FILE_NAME}.aux \
c49e6c
-      ${SGML_FILE_NAME}.tex ${SGML_FILE_NAME}.out
c49e6c
+pdfjadetex "${SGML_FILE_NAME}.tex" >/dev/null
c49e6c
+pdfjadetex "${SGML_FILE_NAME}.tex" >/dev/null
c49e6c
+rm -f "${SGML_FILE_NAME}.log" "${SGML_FILE_NAME}.aux" \
c49e6c
+      "${SGML_FILE_NAME}.tex" "${SGML_FILE_NAME}.out"
c49e6c
 
c49e6c
 exit 0
c49e6c
--- Original/backends/ps	2003-03-17 18:51:48.000000000 +0100
c49e6c
+++ Changes/backends/ps	2007-05-21 14:16:51.000000000 +0200
c49e6c
@@ -6,30 +6,30 @@
c49e6c
 export TEXINPUTS
c49e6c
 
c49e6c
 # Convert to TeX
c49e6c
-$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
c49e6c
+$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then exit 1
c49e6c
 fi
c49e6c
 
c49e6c
 # Convert from TeX to DVI
c49e6c
-jadetex ${SGML_FILE_NAME}.tex >${SGML_FILE_NAME}.tmp
c49e6c
+jadetex "${SGML_FILE_NAME}.tex" > "${SGML_FILE_NAME}.tmp"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then
c49e6c
-  cat ${SGML_FILE_NAME}.tmp
c49e6c
-  rm ${SGML_FILE_NAME}.tmp
c49e6c
-  rm ${SGML_FILE_NAME}.tex
c49e6c
+  cat "${SGML_FILE_NAME}.tmp"
c49e6c
+  rm "${SGML_FILE_NAME}.tmp"
c49e6c
+  rm "${SGML_FILE_NAME}.tex"
c49e6c
   exit 2
c49e6c
 fi
c49e6c
-rm ${SGML_FILE_NAME}.tmp
c49e6c
+rm "${SGML_FILE_NAME}.tmp"
c49e6c
 
c49e6c
 # If there are unresolved references, re-run jadetex, twice 
c49e6c
-if egrep '^LaTeX Warning: There were undefined references.$' ${SGML_FILE_NAME}.log >/dev/null 2>&1
c49e6c
+if egrep '^LaTeX Warning: There were undefined references.$' "${SGML_FILE_NAME}.log" >/dev/null 2>&1
c49e6c
 then
c49e6c
-    jadetex ${SGML_FILE_NAME}.tex >/dev/null
c49e6c
-    jadetex ${SGML_FILE_NAME}.tex >/dev/null
c49e6c
+    jadetex "${SGML_FILE_NAME}.tex" >/dev/null
c49e6c
+    jadetex "${SGML_FILE_NAME}.tex" >/dev/null
c49e6c
 fi
c49e6c
-rm -f ${SGML_FILE_NAME}.log ${SGML_FILE_NAME}.aux \
c49e6c
-	${SGML_FILE_NAME}.tex ${SGML_FILE_NAME}.out
c49e6c
+rm -f "${SGML_FILE_NAME}.log" "${SGML_FILE_NAME}.aux" \
c49e6c
+	"${SGML_FILE_NAME}.tex" "${SGML_FILE_NAME}.out"
c49e6c
 
c49e6c
 # Convert from DVI to PostScript
c49e6c
 PAPERSIZE="-t letter"
c49e6c
@@ -38,12 +38,12 @@
c49e6c
   PAPERSIZE="-t a4"
c49e6c
 fi
c49e6c
 
c49e6c
-dvips -R -q $PAPERSIZE ${SGML_FILE_NAME}.dvi -o ${SGML_FILE_NAME}.ps
c49e6c
+dvips -R -q $PAPERSIZE "${SGML_FILE_NAME}.dvi" -o "${SGML_FILE_NAME}.ps"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then
c49e6c
-  rm ${SGML_FILE_NAME}.dvi
c49e6c
+  rm "${SGML_FILE_NAME}.dvi"
c49e6c
   exit 3
c49e6c
 fi
c49e6c
-rm ${SGML_FILE_NAME}.dvi
c49e6c
+rm "${SGML_FILE_NAME}.dvi"
c49e6c
 
c49e6c
 exit 0
c49e6c
--- Original/backends/rtf	2000-07-21 20:15:22.000000000 +0200
c49e6c
+++ Changes/backends/rtf	2007-05-21 14:18:37.000000000 +0200
c49e6c
@@ -3,7 +3,7 @@
c49e6c
 # This program is under GPL license. See LICENSE file for details.
c49e6c
 
c49e6c
 # Convert to RTF
c49e6c
-$SGML_JADE -t rtf -o ${SGML_FILE_NAME}.rtf $SGML_ARGUMENTS
c49e6c
+$SGML_JADE -t rtf -o "${SGML_FILE_NAME}.rtf" $SGML_ARGUMENTS "$SGML_FILE"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then exit 1
c49e6c
 fi
c49e6c
--- Original/backends/tex	2000-07-21 20:15:22.000000000 +0200
c49e6c
+++ Changes/backends/tex	2007-05-21 14:21:12.000000000 +0200
c49e6c
@@ -3,7 +3,7 @@
c49e6c
 # This program is under GPL license. See LICENSE file for details.
c49e6c
 
c49e6c
 # Convert to TeX
c49e6c
-$SGML_JADE -t tex -o ${SGML_FILE_NAME}.tex $SGML_ARGUMENTS
c49e6c
+$SGML_JADE -t tex -o "${SGML_FILE_NAME}.tex" $SGML_ARGUMENTS "$SGML_FILE"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then exit 1
c49e6c
 fi
c49e6c
--- Original/backends/txt	2004-02-11 14:58:03.000000000 +0100
c49e6c
+++ Changes/backends/txt	2007-05-21 14:22:33.000000000 +0200
c49e6c
@@ -23,7 +23,7 @@
c49e6c
 trap 'rm -f "$HTML"; exit' 0 1 2 3 7 13 15
c49e6c
 
c49e6c
 # Convert to HTML
c49e6c
-$SGML_JADE -V nochunks -t sgml ${SGML_ARGUMENTS} >${HTML}
c49e6c
+$SGML_JADE -V nochunks -t sgml ${SGML_ARGUMENTS} "$SGML_FILE" >${HTML}
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then exit 1
c49e6c
 fi
c49e6c
--- Original/bin/jw.in	2003-04-30 18:21:49.000000000 +0200
c49e6c
+++ Changes/bin/jw.in	2007-05-21 14:28:58.000000000 +0200
c49e6c
@@ -246,7 +246,7 @@ then
c49e6c
   echo -e $SGML_HELP_MESSAGE >&2
c49e6c
   exit 1
c49e6c
 fi
c49e6c
-if [ ! -s $SGML_FRONTEND ]
c49e6c
+if [ ! -s "$SGML_FRONTEND" ]
c49e6c
 then
c49e6c
   echo "`basename $0`: There is no frontend called \"$SGML_FRONTEND\"." >&2
c49e6c
   exit 2
c49e6c
@@ -270,14 +270,14 @@
c49e6c
   echo -e $SGML_HELP_MESSAGE >&2
c49e6c
   exit 1
c49e6c
 fi
c49e6c
-if [ ! -s $SGML_FILE ]
c49e6c
+if [ ! -s "$SGML_FILE" ]
c49e6c
 then
c49e6c
   echo "`basename $0`: Cannot open \"$SGML_FILE\"." >&2
c49e6c
   exit 3
c49e6c
 fi
c49e6c
 
c49e6c
 # Separate the file name and the extension (if any)
c49e6c
-SGML_FILE_NAME=`basename $SGML_FILE`
c49e6c
+SGML_FILE_NAME=`basename "$SGML_FILE"`
c49e6c
 SGML_FILE_NAME=${SGML_FILE_NAME%.*}
c49e6c
 
c49e6c
 # Determine if we are in an XML file
c49e6c
@@ -416,7 +416,7 @@
c49e6c
 fi
c49e6c
 
c49e6c
 # Prepare the parser's arguments
c49e6c
-SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET $SGML_OPTIONS $SGML_WARNINGS $SGML_DECL $SGML_FILE"
c49e6c
+SGML_ARGUMENTS="$SGML_INCLUDE -i $SGML_TYPE -d $SGML_STYLESHEET $SGML_OPTIONS $SGML_WARNINGS $SGML_DECL"
c49e6c
 
c49e6c
 # Call the backend
c49e6c
 echo "Using catalogs: `echo $SGML_CATALOG_FILES | sed 's/:/, /g'`"
c49e6c
@@ -430,7 +430,7 @@
c49e6c
 then
c49e6c
 	sh $SGML_BACKEND
c49e6c
 else
c49e6c
-	sh $SGML_BACKEND >$SGML_FILE_NAME.html
c49e6c
+	sh $SGML_BACKEND >"$SGML_FILE_NAME.html"
c49e6c
 fi
c49e6c
 SGML_RETURN=$?
c49e6c
 cd "$SGML_CURRENT_DIRECTORY"
c49e6c
diff -urNp docbook-utils-0.6.14-orig/backends/man.in docbook-utils-0.6.14/backends/man.in
c49e6c
--- docbook-utils-0.6.14-orig/backends/man.in	2003-02-11 13:56:23.000000000 +0100
c49e6c
+++ docbook-utils-0.6.14/backends/man.in	2009-07-24 15:07:04.000000000 +0200
c49e6c
@@ -7,7 +7,7 @@ HELPER=$SGML_BASE_DIR/docbook/utils-@VER
c49e6c
 TMPDIR=`mktemp -d /tmp/man.XXXXXX` || \
c49e6c
  { echo >&2 "man backend: could not create secure temporary directory"; exit 1;}
c49e6c
 trap 'rm -rf "${TMPDIR}"' EXIT
c49e6c
-nsgmls $SGML_FILE > "${TMPDIR}/nsgmls.tmp"
c49e6c
+nsgmls "$SGML_FILE" > "${TMPDIR}/nsgmls.tmp"
c49e6c
 sgmlspl $HELPER <"${TMPDIR}/nsgmls.tmp" 2>"${TMPDIR}/errs"
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then
c49e6c
diff -urNp docbook-utils-0.6.14-orig/backends/texi.in docbook-utils-0.6.14/backends/texi.in
c49e6c
--- docbook-utils-0.6.14-orig/backends/texi.in	2002-08-05 23:20:56.000000000 +0200
c49e6c
+++ docbook-utils-0.6.14/backends/texi.in	2009-07-24 15:08:02.000000000 +0200
c49e6c
@@ -3,7 +3,7 @@
c49e6c
 # This program is under GPL license. See LICENSE file for details.
c49e6c
 
c49e6c
 # Convert to texinfo
c49e6c
-nsgmls $SGML_FILE | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
c49e6c
+nsgmls "$SGML_FILE" | sgmlspl $SGML_BASE_DIR/docbook/utils-@VERSION@/helpers/docbook2texi-spec.pl >$SGML_FILE_NAME.texi
c49e6c
 if [ $? -ne 0 ]
c49e6c
 then exit 1
c49e6c
 fi