$NetBSD: patch-af,v 1.1 2006/05/23 16:07:04 joerg Exp $ --- shell/noroff.orig 1999-02-16 22:58:52.000000000 +0100 +++ shell/noroff @@ -35,9 +35,10 @@ fi base="`basename $1 | sed '/\./s/\.[^.]*$//'`" tagsfile="$base.nwt" +tmpfile=$(@MKTEMP@ tags) || exit 1 (echo ".so $macrodir/tmac.w" if [ -r "$tagsfile" ]; then - cp $tagsfile /tmp/tags.$$ + cp $tagsfile $tmpfile $AWK '{ if (sub(/^###TAG### / , "")) tags[$1] = $2 else if (sub(/^###BEGINCHUNKS###/, "")) printf ".de CLIST\n.CLISTBEGIN\n" @@ -88,8 +89,8 @@ if [ -r "$tagsfile" ]; then # print str3 # print convquote(str3) # } - function tag(s) { if (s in tags) return tags[s]; else return "???" }' /tmp/tags.$$ - rm -f /tmp/tags.$$ + function tag(s) { if (s in tags) return tags[s]; else return "???" }' $tmpfile + rm -f $tmpfile fi cat "$@") | ($ROFF $opts 2>$tagsfile)