head	1.4;
access;
symbols
	RELEASE_4_EOL:1.3
	RELEASE_6_2_0:1.3
	RELEASE_6_1_0:1.3
	RELEASE_5_5_0:1.3
	RELEASE_6_0_0:1.3
	RELEASE_5_4_0:1.3
	RELEASE_4_11_0:1.3
	RELEASE_5_3_0:1.3
	RELEASE_4_10_0:1.3
	RELEASE_5_2_1:1.3
	RELEASE_5_2_0:1.3
	RELEASE_4_9_0:1.3
	RELEASE_5_1_0:1.3
	RELEASE_4_8_0:1.3
	RELEASE_5_0_0:1.3
	RELEASE_4_7_0:1.3
	RELEASE_4_6_2:1.2
	RELEASE_4_6_1:1.2
	RELEASE_4_6_0:1.2
	RELEASE_5_0_DP1:1.2
	RELEASE_4_5_0:1.2
	RELEASE_4_4_0:1.2;
locks; strict;
comment	@# @;


1.4
date	2007.03.04.09.53.09;	author krion;	state dead;
branches;
next	1.3;

1.3
date	2002.06.09.02.30.34;	author dd;	state Exp;
branches;
next	1.2;

1.2
date	2001.07.11.08.53.07;	author dd;	state Exp;
branches;
next	1.1;

1.1
date	2001.05.29.05.28.05;	author kris;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Update to 3.1.5
@
text
@--- doc/gawk.texi.orig	Mon Apr 22 20:26:20 2002
+++ doc/gawk.texi	Mon May 20 23:07:14 2002
@@@@ -97,7 +97,7 @@@@
 @@finalout
 @@end iftex
 
-@@copying
+@@ifinfo
 Copyright @@copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
 @@sp 2
 
@@@@ -122,7 +122,7 @@@@
 software.  Copies published by the Free Software Foundation raise
 funds for GNU development.''
 @@end enumerate
-@@end copying
+@@end ifinfo
 
 @@c Comment out the "smallbook" for technical review.  Saves
 @@c considerable paper.  Remember to turn it back on *before*
@@@@ -184,8 +184,24 @@@@
 
 @@c This one is correct for gawk 3.1.0 from the FSF
 ISBN 1-882114-28-0 @@*
-@@sp 2
-@@insertcopying
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1 or
+any later version published by the Free Software Foundation; with the
+Invariant Sections being ``GNU General Public License'', the Front-Cover
+texts being (a) (see below), and with the Back-Cover Texts being (b)
+(see below).  A copy of the license is included in the section entitled
+``GNU Free Documentation License''.
+
+@@enumerate a
+@@item
+``A GNU Manual''
+
+@@item
+``You have freedom to copy and modify this GNU Manual, like GNU
+software.  Copies published by the Free Software Foundation raise
+funds for GNU development.''
+@@end enumerate
 @@sp 2
 Cover art by Etienne Suvasa.
 @@end titlepage
@@@@ -228,7 +244,9 @@@@
 This file documents @@command{awk}, a program that you can use to select
 particular records in a file and perform operations upon them.
 
-@@insertcopying
+This is Edition @@value{EDITION} of @@cite{@@value{TITLE}: @@value{SUBTITLE}},
+for the @@value{VERSION}.@@value{PATCHLEVEL} (or later) version of the GNU
+implementation of AWK.
 
 @@end ifnottex
 
@@@@ -21418,8 +21436,7 @@@@
 arranges to clean up any temporary files on program exit or upon an
 interrupt.
 
-@@c 2e: For the temp file handling, go with Darrel's ig=${TMP:-/tmp}/igs.$$
-@@c 2e: or something as similar as possible.
+@@c 2e: For the temporary file handling, use mktemp with $@@{TMPDIR:-/tmp@@}.
 
 The next part loops through all the command-line arguments.
 There are several cases of interest:
@@@@ -21440,13 +21457,13 @@@@
 These are saved and passed on to @@command{gawk}.
 
 @@item -f@@r{,} --file@@r{,} --file=@@r{,} -Wfile=
-The @@value{FN} is saved to the temporary file @@file{/tmp/ig.s.$$} with an
+The @@value{FN} is saved to a temporary file with an
 @@samp{@@@@include} statement.
 The @@command{sed} utility is used to remove the leading option part of the
 argument (e.g., @@samp{--file=}).
 
 @@item --source@@r{,} --source=@@r{,} -Wsource=
-The source text is echoed into @@file{/tmp/ig.s.$$}.
+The source text is echoed into a temporary file.
 
 @@item --version@@r{,} -Wversion
 @@command{igawk} prints its version number, runs @@samp{gawk --version}
@@@@ -21457,17 +21474,12 @@@@
 or @@option{-Wsource} arguments are supplied, then the first nonoption argument
 should be the @@command{awk} program.  If there are no command-line
 arguments left, @@command{igawk} prints an error message and exits.
-Otherwise, the first argument is echoed into @@file{/tmp/ig.s.$$}.
+Otherwise, the first argument is echoed into a temporary file.
 In any case, after the arguments have been processed,
-@@file{/tmp/ig.s.$$} contains the complete text of the original @@command{awk}
-program.
+the complete text of the original @@command{awk} program
+is contained in a temporary file.
 
 @@cindex @@command{sed} utility
-@@cindex stream editors
-The @@samp{$$} in @@command{sh} represents the current process ID number.
-It is often used in shell programs to generate unique temporary @@value{FN}s.
-This allows multiple users to run @@command{igawk} without worrying
-that the temporary @@value{FN}s will clash.
 The program is as follows:
 
 @@cindex @@code{igawk.sh} program
@@@@ -21482,6 +21494,18 @@@@
 # Arnold Robbins, arnold@@@@gnu.org, Public Domain
 # July 1993
 
+# Temporary file handling modifications for Owl by
+# Jarno Huuskonen and Solar Designer, still Public Domain
+# May 2001
+
+if [ ! -x /usr/bin/mktemp ]; then
+    echo "$0 needs mktemp to create temporary files."
+    exit 1
+fi
+
+STEMPFILE=`/usr/bin/mktemp $@@{TMPDIR:-/tmp@@}/igawk.s.XXXXXX` || exit 1
+ETEMPFILE=`/usr/bin/mktemp $@@{TMPDIR:-/tmp@@}/igawk.e.XXXXXX` || exit 1
+
 @@c endfile
 @@end ignore
 @@c file eg/prog/igawk.sh
@@@@ -21491,7 +21515,7 @@@@
     shift
 else
     # cleanup on exit, hangup, interrupt, quit, termination
-    trap 'rm -f /tmp/ig.[se].$$' 0 1 2 3 15
+    trap 'rm -f $STEMPFILE $ETEMPFILE' EXIT HUP INT QUIT TERM
 fi
 
 while [ $# -ne 0 ] # loop over arguments
@@@@ -21508,26 +21532,26 @@@@
 
     -[vF]*) opts="$opts '$1'" ;;
 
-    -f)     echo @@@@include "$2" >> /tmp/ig.s.$$
+    -f)     echo @@@@include "$2" >> $STEMPFILE
             shift;;
 
     -f*)    f=`echo "$1" | sed 's/-f//'`
-            echo @@@@include "$f" >> /tmp/ig.s.$$ ;;
+            echo @@@@include "$f" >> $STEMPFILE ;;
 
     -?file=*)    # -Wfile or --file
             f=`echo "$1" | sed 's/-.file=//'`
-            echo @@@@include "$f" >> /tmp/ig.s.$$ ;;
+            echo @@@@include "$f" >> $STEMPFILE ;;
 
     -?file)      # get arg, $2
-            echo @@@@include "$2" >> /tmp/ig.s.$$
+            echo @@@@include "$2" >> $STEMPFILE
             shift;;
 
     -?source=*)  # -Wsource or --source
             t=`echo "$1" | sed 's/-.source=//'`
-            echo "$t" >> /tmp/ig.s.$$ ;;
+            echo "$t" >> $STEMPFILE ;;
 
     -?source)    # get arg, $2
-            echo "$2" >> /tmp/ig.s.$$
+            echo "$2" >> $STEMPFILE
             shift;;
 
     -?version)
@@@@ -21542,7 +21566,7 @@@@
     shift
 done
 
-if [ ! -s /tmp/ig.s.$$ ]
+if [ ! -s $STEMPFILE ]
 then
 @@group
     if [ -z "$1" ]
@@@@ -21551,12 +21575,12 @@@@
          exit 1
 @@end group
     else
-        echo "$1" > /tmp/ig.s.$$
+        echo "$1" > $STEMPFILE
         shift
     fi
 fi
 
-# at this point, /tmp/ig.s.$$ has the program
+# at this point, $STEMPFILE has the program
 @@c endfile
 @@end example
 
@@@@ -21635,7 +21659,7 @@@@
 @@c endfile
 @@end example
 
-The stack is initialized with @@code{ARGV[1]}, which will be @@file{/tmp/ig.s.$$}.
+The stack is initialized with @@code{ARGV[1]}, which will be @@file{$STEMPFILE}.
 The main loop comes next.  Input lines are read in succession. Lines that
 do not start with @@samp{@@@@include} are printed verbatim.
 If the line does start with @@samp{@@@@include}, the @@value{FN} is in @@code{$2}.
@@@@ -21681,7 +21705,7 @@@@
         @@}
         close(input[stackptr])
     @@}
-@@}' /tmp/ig.s.$$ > /tmp/ig.e.$$
+@@}' $STEMPFILE > $ETEMPFILE
 @@c endfile
 @@end example
 
@@@@ -21707,7 +21731,7 @@@@
 
 @@example
 @@c file eg/prog/igawk.sh
-eval gawk -f /tmp/ig.e.$$ $opts -- "$@@@@"
+eval gawk -f $ETEMPFILE $opts -- "$@@@@"
 
 exit $?
 @@c endfile
@


1.3
log
@Update to 3.1.1.

PR:		38712
Submitted by:	KATO Tsuguru <tkato@@prontomail.com>
@
text
@@


1.2
log
@Update to 3.1.0 and take over as maintainer from ports@@.  The only non
vendor-induced change is that this port now installs igawk and awklib
(this accounts for the removal of patch-a{a,b}).  As far as I can
tell, there was never a reason not to do this (other than that
patch-sec1 hardcoded the wrong path to mktemp, so igawk couldn't
work).
@
text
@d1 59
a59 3
--- doc/gawk.texi~	Wed Jul 11 01:44:15 2001
+++ doc/gawk.texi	Wed Jul 11 01:47:18 2001
@@@@ -20336,8 +20336,7 @@@@
d69 1
a69 1
@@@@ -20358,13 +20357,13 @@@@
d85 2
a86 2
@@@@ -20375,17 +20374,12 @@@@
 or @@option{-Wsource} arguments are supplied, then the first non-option argument
d94 1
a94 1
+the complete text of the original @@code{awk} program
d98 1
a98 1
-@@cindex stream editor
d106 1
a106 1
@@@@ -20400,6 +20394,18 @@@@
d125 1
a125 1
@@@@ -20409,7 +20415,7 @@@@
d134 1
a134 1
@@@@ -20426,26 +20432,26 @@@@
d167 1
a167 1
@@@@ -20460,7 +20466,7 @@@@
d176 1
a176 1
@@@@ -20469,12 +20475,12 @@@@
d191 1
a191 1
@@@@ -20553,7 +20559,7 @@@@
d200 1
a200 1
@@@@ -20599,7 +20605,7 @@@@
d209 1
a209 1
@@@@ -20625,7 +20631,7 @@@@
@


1.1
log
@Fix the temporary file handling in igawk.  As far as I can tell, we
don't install this, therefore no PORTREVISION bump is needed.  But I'm
fixing it anyway in case someone changes this port to install it in
the future (perhaps as a result of this commit :-)

Submitted by:	solar@@openwall.com
@
text
@d1 3
a3 4
diff -ur gawk-3.0.6.orig/doc/gawk.texi gawk-3.0.6/doc/gawk.texi
--- doc/gawk.texi.orig	Tue Aug  8 02:57:43 2000
+++ doc/gawk.texi	Sun May 27 04:30:53 2001
@@@@ -16550,8 +16550,7 @@@@
d11 8
a18 8
 The next part loops through all the command line arguments.
 There are several cases of interest.
@@@@ -16576,7 +16575,7 @@@@
 @@itemx --file
 @@itemx --file=
 @@itemx -Wfile=
-The file name is saved to the temporary file @@file{/tmp/ig.s.$$} with an
+The file name is saved to a temporary file with an
d20 1
a20 1
 The @@code{sed} utility is used to remove the leading option part of the
d22 2
a23 4
@@@@ -16584,7 +16583,7 @@@@
 @@item --source
 @@itemx --source=
 @@itemx -Wsource=
d27 6
a32 6
 @@item --version
 @@itemx -Wversion
@@@@ -16596,16 +16595,11 @@@@
 or @@samp{-Wsource}, were supplied, then the first non-option argument
 should be the @@code{awk} program.  If there are no command line
 arguments left, @@code{igawk} prints an error message and exits.
a34 1
 
d36 1
a36 1
-@@file{/tmp/ig.s.$$} contains the complete text of the original @@code{awk}
a37 5
-
-The @@samp{$$} in @@code{sh} represents the current process ID number.
-It is often used in shell programs to generate unique temporary file
-names.  This allows multiple users to run @@code{igawk} without worrying
-that the temporary file names will clash.
d41 10
a50 3
 @@cindex @@code{sed} utility
 Here's the program:
@@@@ -16620,13 +16614,25 @@@@
d58 1
a58 1
+if [ ! -x /bin/mktemp ]; then
d63 2
a64 2
+STEMPFILE=`/bin/mktemp $@@{TMPDIR:-/tmp@@}/igawk.s.XXXXXX` || exit 1
+ETEMPFILE=`/bin/mktemp $@@{TMPDIR:-/tmp@@}/igawk.e.XXXXXX` || exit 1
d66 4
a69 3
 if [ "$1" = debug ]
 then
     set -x
d78 1
a78 1
@@@@ -16643,28 +16649,28 @@@@
a85 1
 @@group
a88 1
 @@end group
d95 1
a95 1
     -?file)    # get arg, $2
d100 1
a100 1
     -?source=*)    # -Wsource or --source
d105 1
a105 1
     -?source)  # get arg, $2
d111 1
a111 1
@@@@ -16679,19 +16685,19 @@@@
d118 1
d120 1
a120 2
     then
          echo igawk: no program! 1>&2
d122 1
a132 1
 @@c @@end group
d134 3
a136 2
@@@@ -16776,7 +16782,7 @@@@
 @@end group
d143 3
a145 3
 
@@@@ -16825,7 +16831,7 @@@@
 @@group
a149 1
 @@end group
d151 4
a154 2
 @@c @@end group
@@@@ -16852,7 +16858,7 @@@@
a155 1
 @@c @@group
@

