Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Jan 2010 23:19:01 +0000 (UTC)
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r201951 - in head: contrib/one-true-awk usr.bin/awk
Message-ID:  <201001092319.o09NJ1c8045624@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ru
Date: Sat Jan  9 23:19:01 2010
New Revision: 201951
URL: http://svn.freebsd.org/changeset/base/201951

Log:
  Update to a 26-Nov-2009 release.

Modified:
  head/contrib/one-true-awk/FIXES
  head/contrib/one-true-awk/b.c
  head/contrib/one-true-awk/lib.c
  head/contrib/one-true-awk/main.c
  head/contrib/one-true-awk/makefile
  head/contrib/one-true-awk/maketab.c
  head/contrib/one-true-awk/proctab.c
  head/contrib/one-true-awk/proto.h
  head/contrib/one-true-awk/run.c
  head/usr.bin/awk/main.c.diff
Directory Properties:
  head/contrib/one-true-awk/   (props changed)

Modified: head/contrib/one-true-awk/FIXES
==============================================================================
--- head/contrib/one-true-awk/FIXES	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/contrib/one-true-awk/FIXES	Sat Jan  9 23:19:01 2010	(r201951)
@@ -25,6 +25,23 @@ THIS SOFTWARE.
 This file lists all bug fixes, changes, etc., made since the AWK book
 was sent to the printers in August, 1987.
 
+Nov 26, 2009:
+	fixed a long-standing issue with when FS takes effect.  a
+	change to FS is now noticed immediately for subsequent splits.
+
+	changed the name getline() to awkgetline() to avoid yet another
+	name conflict somewhere.
+
+Feb 11, 2009:
+	temporarily for now defined HAS_ISBLANK, since that seems to
+	be the best way through the thicket.  isblank arrived in C99,
+	but seems to be arriving at different systems at different
+	times.
+
+Oct 8, 2008:
+	fixed typo in b.c that set tmpvec wrongly.  no one had ever
+	run into the problem, apparently.  thanks to alistair crooks.
+
 Oct 23, 2007:
 	minor fix in lib.c: increase inputFS to 100, change malloc
 	for fields to n+1.  

Modified: head/contrib/one-true-awk/b.c
==============================================================================
--- head/contrib/one-true-awk/b.c	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/contrib/one-true-awk/b.c	Sat Jan  9 23:19:01 2010	(r201951)
@@ -731,6 +731,7 @@ Node *unary(Node *np)
  * to nelson beebe for the suggestion; let's see if it works everywhere.
  */
 
+/* #define HAS_ISBLANK */
 #ifndef HAS_ISBLANK
 
 int (isblank)(int c)
@@ -876,7 +877,7 @@ int cgoto(fa *f, int s, int c)
 					if (q[j] >= maxsetvec) {
 						maxsetvec *= 4;
 						setvec = (int *) realloc(setvec, maxsetvec * sizeof(int));
-						tmpset = (int *) realloc(setvec, maxsetvec * sizeof(int));
+						tmpset = (int *) realloc(tmpset, maxsetvec * sizeof(int));
 						if (setvec == 0 || tmpset == 0)
 							overflo("cgoto overflow");
 					}

Modified: head/contrib/one-true-awk/lib.c
==============================================================================
--- head/contrib/one-true-awk/lib.c	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/contrib/one-true-awk/lib.c	Sat Jan  9 23:19:01 2010	(r201951)
@@ -274,6 +274,7 @@ void fldbld(void)	/* create fields from 
 	}
 	fr = fields;
 	i = 0;	/* number of fields accumulated here */
+	strcpy(inputFS, *FS);
 	if (strlen(inputFS) > 1) {	/* it's a regular expression */
 		i = refldbld(r, inputFS);
 	} else if ((sep = *inputFS) == ' ') {	/* default whitespace */

Modified: head/contrib/one-true-awk/main.c
==============================================================================
--- head/contrib/one-true-awk/main.c	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/contrib/one-true-awk/main.c	Sat Jan  9 23:19:01 2010	(r201951)
@@ -22,7 +22,7 @@ ARISING OUT OF OR IN CONNECTION WITH THE
 THIS SOFTWARE.
 ****************************************************************/
 
-const char	*version = "version 20070501";
+const char	*version = "version 20091126";
 
 #define DEBUG
 #include <stdio.h>

Modified: head/contrib/one-true-awk/makefile
==============================================================================
--- head/contrib/one-true-awk/makefile	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/contrib/one-true-awk/makefile	Sat Jan  9 23:19:01 2010	(r201951)
@@ -31,7 +31,6 @@ CC = gcc -fprofile-arcs -ftest-coverage 
 CC = gcc -Wall -g
 CC = cc
 CC = gcc -O4
-CC = gcc -Wall -g
 
 
 YACC = bison -y

Modified: head/contrib/one-true-awk/maketab.c
==============================================================================
--- head/contrib/one-true-awk/maketab.c	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/contrib/one-true-awk/maketab.c	Sat Jan  9 23:19:01 2010	(r201951)
@@ -102,7 +102,7 @@ struct xx
 	{ CALL, "call", "call" },
 	{ ARG, "arg", "arg" },
 	{ VARNF, "getnf", "NF" },
-	{ GETLINE, "getline", "getline" },
+	{ GETLINE, "awkgetline", "getline" },
 	{ 0, "", "" },
 };
 

Modified: head/contrib/one-true-awk/proctab.c
==============================================================================
--- head/contrib/one-true-awk/proctab.c	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/contrib/one-true-awk/proctab.c	Sat Jan  9 23:19:01 2010	(r201951)
@@ -180,7 +180,7 @@ Cell *(*proctab[93])(Node **, int) = {
 	nullproc,	/* NUMBER */
 	nullproc,	/* STRING */
 	nullproc,	/* REGEXPR */
-	getline,	/* GETLINE */
+	awkgetline,	/* GETLINE */
 	substr,	/* SUBSTR */
 	split,	/* SPLIT */
 	jump,	/* RETURN */

Modified: head/contrib/one-true-awk/proto.h
==============================================================================
--- head/contrib/one-true-awk/proto.h	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/contrib/one-true-awk/proto.h	Sat Jan  9 23:19:01 2010	(r201951)
@@ -149,7 +149,7 @@ extern	Cell	*call(Node **, int);
 extern	Cell	*copycell(Cell *);
 extern	Cell	*arg(Node **, int);
 extern	Cell	*jump(Node **, int);
-extern	Cell	*getline(Node **, int);
+extern	Cell	*awkgetline(Node **, int);
 extern	Cell	*getnf(Node **, int);
 extern	Cell	*array(Node **, int);
 extern	Cell	*awkdelete(Node **, int);

Modified: head/contrib/one-true-awk/run.c
==============================================================================
--- head/contrib/one-true-awk/run.c	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/contrib/one-true-awk/run.c	Sat Jan  9 23:19:01 2010	(r201951)
@@ -388,7 +388,7 @@ Cell *jump(Node **a, int n)	/* break, co
 	return 0;	/* not reached */
 }
 
-Cell *getline(Node **a, int n)	/* get next line from specific input */
+Cell *awkgetline(Node **a, int n)	/* get next line from specific input */
 {		/* a[0] is variable, a[1] is operator, a[2] is filename */
 	Cell *r, *x;
 	extern Cell **fldtab;
@@ -1159,11 +1159,11 @@ Cell *cat(Node **a, int q)	/* a[0] cat a
 			x->sval, y->sval);
 	strcpy(s, x->sval);
 	strcpy(s+n1, y->sval);
+	tempfree(x);
 	tempfree(y);
 	z = gettemp();
 	z->sval = s;
 	z->tval = STR;
-	tempfree(x);
 	return(z);
 }
 

Modified: head/usr.bin/awk/main.c.diff
==============================================================================
--- head/usr.bin/awk/main.c.diff	Sat Jan  9 23:18:49 2010	(r201950)
+++ head/usr.bin/awk/main.c.diff	Sat Jan  9 23:19:01 2010	(r201951)
@@ -11,8 +11,8 @@ diff -u -p -r1.1.1.10 main.c
  THIS SOFTWARE.
  ****************************************************************/
  
--const char	*version = "version 20070501";
-+const char	*version = "version 20070501 (FreeBSD)";
+-const char	*version = "version 20091126";
++const char	*version = "version 20091126 (FreeBSD)";
  
  #define DEBUG
  #include <stdio.h>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001092319.o09NJ1c8045624>