$NetBSD: patch-an,v 1.1 2006/05/23 16:07:04 joerg Exp $ --- shell/roff.nw.orig 1998-08-17 02:27:09.000000000 +0200 +++ shell/roff.nw @@ -80,7 +80,8 @@ single quotes and double quotes, so neit other, and quoting each quote is ugly. The pragmatic solution is to copy the awk program into a temporary file, using a shell here-document. <>= -awkfile="/tmp/noweb$$.awk" +awkfile=$(@MKTEMP@ -t noweb) || { echo "$0: Cannot create temporary file" >&2; exit 1; } + trap 'rm -f $awkfile' 0 1 2 10 14 15 cat > $awkfile << 'EOF' <> @@ -664,10 +665,11 @@ base="`basename $1 | sed '/\./s/\.[^.]*$ tagsfile="$base.nwt" (echo ".so $macrodir/tmac.w" if [ -r "$tagsfile" ]; then - cp $tagsfile /tmp/tags.$$ + tagstemp=$(@MKTEMP@ -t tags) || { echo "$0: Cannot create temporary file" >&2; exit 1; } + cp $tagsfile $tagstemp $AWK '<> - <>' /tmp/tags.$$ - rm -f /tmp/tags.$$ + <>' $tagstemp + rm -f $tagstemp fi cat "$@") | ($ROFF $opts 2>$tagsfile)