--- noweb-2.9a.orig/src/lib/toascii.nw +++ noweb-2.9a/src/lib/toascii.nw @@ -28,9 +28,9 @@ Also arranged here is a temporary file for storage of the awk program on an ugly system, as discussed below. <>= -awkfile="tmp/awk$$.tmp" -textfile="/tmp/text$$.tmp" -tagsfile="/tmp/tags$$.tmp" +awkfile=$(tempfile -p awk -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; } +textfile=$(tempfile -p text -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; } +tagsfile=$(tempfile -p tags -s .tmp) || { echo "$0: Cannot create temporary file" >&2; exit 1; } export awkfile textfile tagsfile trap 'rm -f $awkfile $textfile $tagsfile' 0 1 2 10 14 15 @ %def textfile tagsfile awkfile --- noweb-2.9a.orig/src/shell/roff.mm +++ noweb-2.9a/src/shell/roff.mm @@ -214,7 +214,7 @@ .ADDLIST 1a .PRINTLIST -awkfile="/tmp/noweb$$.awk" +awkfile=$(tempfile -p noweb -s .awk) || { echo "$0: Cannot create temporary file" >&2; exit 1; } trap 'rm -f $awkfile' 0 1 2 10 14 15 cat > $awkfile \&<< 'EOF' \c @@ -1628,14 +1628,15 @@ tagsfile="$base.nwt" (echo ".so $macrodir/tmac.w" if [ -r "$tagsfile" ]; then - cp $tagsfile /tmp/tags.$$ + tagstemp=$(tempfile -p tags) || { echo "$0: Cannot create temporary file" >&2; exit 1; } + cp $tagsfile $tagstemp $AWK '\c .USE "action for \*[BEGINCONVQUOTE]tags\*[ENDCONVQUOTE] line" 11c \& \c .USE "functions" 8a -\&' /tmp/tags.$$ - rm -f /tmp/tags.$$ +\&' $tagstemp + rm -f $tagstemp fi cat "$@") | ($ROFF $opts 2>$tagsfile)