aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2010-11-19 12:08:06 +0200
committerArnold D. Robbins <arnold@skeeve.com>2010-11-19 12:08:06 +0200
commit824226e0f4a2079c7447ab17f3a6a483131e1450 (patch)
treea46ea1e0b52b862a26f185460bb3c5963df3a0d0
parent6edb8f2c771b73d2cadf8e8c42b1d85c805b46f5 (diff)
downloadegawk-824226e0f4a2079c7447ab17f3a6a483131e1450.tar.gz
egawk-824226e0f4a2079c7447ab17f3a6a483131e1450.tar.bz2
egawk-824226e0f4a2079c7447ab17f3a6a483131e1450.zip
Remove special treatment of CVS. Update POSIX.STD file.
-rw-r--r--ChangeLog5
-rw-r--r--Makefile.am1
-rw-r--r--Makefile.in1
-rw-r--r--POSIX.NOTES25
-rw-r--r--POSIX.STD186
-rw-r--r--README.cvs21
-rw-r--r--TODO13
-rw-r--r--awklib/ChangeLog4
-rw-r--r--awklib/Makefile.am13
-rw-r--r--awklib/Makefile.in13
-rwxr-xr-xbootstrap.sh9
11 files changed, 57 insertions, 234 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ec4ccb6..5fdb73c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Nov 19 11:57:28 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * bootstrap.sh, Makefile.am: Remove treatment of CVS.
+ * README.cvs: Updated further.
+
Thu Nov 18 23:28:23 2010 Arnold D. Robbins <arnold@skeeve.com>
* configure.ac: Remove `--enable-portals' option. I don't think
diff --git a/Makefile.am b/Makefile.am
index 774861a9..e5d7a2fc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -167,7 +167,6 @@ check-local: gawk$(EXEEXT) pgawk$(EXEEXT)
# A little extra clean up when making distributions.
dist-hook:
cd $(distdir)/extension ; rm -f *.o *.so
- cd $(distdir) ; find . -type d -name CVS | xargs rm -fr
# Special rules for individual files
# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build
diff --git a/Makefile.in b/Makefile.in
index fa8c54b8..fa77ec20 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1035,7 +1035,6 @@ check-local: gawk$(EXEEXT) pgawk$(EXEEXT)
# A little extra clean up when making distributions.
dist-hook:
cd $(distdir)/extension ; rm -f *.o *.so
- cd $(distdir) ; find . -type d -name CVS | xargs rm -fr
# Special rules for individual files
# Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build
diff --git a/POSIX.NOTES b/POSIX.NOTES
deleted file mode 100644
index 5840e309..00000000
--- a/POSIX.NOTES
+++ /dev/null
@@ -1,25 +0,0 @@
-15 November 2010
-----------------
-
-1. POSIX leaves undefined what happens for something like
-
- awk '{ print ; exit }' if=42 /etc/passwd
-
- Mawk diagnoses this. Gawk and BWK awk do not.
-
-2. String comparison with <, <= etc is supposed to take the local collating
- sequence into account. Gawk currently doesn't. This is exacerbated
- by the fact that the standard routines all want zero-terminated
- strings to work on.
-
-3. For printf %c, when passing a numeric value, it is converted to
- a character and printed. I suspect that it should be converted
- to a wide-character and then that wide character's multibyte
- encoding should be printed.
-
- Similarly, when given a string, only the first character of the
- string should be printed. Right now it only prints the first byte.
-
-4. Plain `length' is no longer marked obsolescent; the doc needs updating.
-
-5. The POSIX.STD file needs updating.
diff --git a/POSIX.STD b/POSIX.STD
index e5e01836..31760c48 100644
--- a/POSIX.STD
+++ b/POSIX.STD
@@ -1,182 +1,34 @@
- Copyright (C) 1992, 1995, 1998, 2001, 2006, 2007
+ Copyright (C) 1992, 1995, 1998, 2001, 2006, 2007, 2010
Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
--------------------------------------------------------------------------
-Mon May 7 14:38:32 IDT 2007
+Fri Nov 19 11:59:56 IST 2010
============================
+This file documents several things related to the 2008 POSIX standard
+that I noted after reviewing it.
-Thanks to Andrew Schorr for some of the wording here.
+1. POSIX leaves undefined what happens for something like
-<quote>
-The Open Group awk specification says that a string value shall
-be converted to a numeric value using the ISO C standard atof()
-function. The awk spec is here:
+ awk '{ print ; exit }' if=42 /etc/passwd
- http://www.opengroup.org/onlinepubs/009695399/utilities/awk.html
+ Mawk diagnoses this. Gawk and BWK awk do not. This doesn't seem to be
+ worth the effort to add the code, but at least I'm aware of it.
-And the ISO C standard says that atof() shall work the same way
-as strtod(), and strtod() must recognize the IEEE special values
-for NaN (not-a-number) and Infinity.
-</quote>
+2. The 2001-2004 standards accidentally required support for hexadecimal
+ floating point constants and for Infinity and Not-A-Number (NaN) values.
-As a result, more than one gawk user has come to the conclusion that
-gawk is not standard compliant since it does not support converting
-these special values.
+ The 2008 standard now explicitly allows, but does not require, such
+ support.
-Similar reasoning has led other users to conclude that gawk must also
-support input data in the format of C99-style hexadecimal floating point
-numbers.
+ More discussion is provided in the node `POSIX Floating Point Problems'
+ in gawk.texi.
-I, Arnold Robbins, the gawk maintainer, feel that while these interpretations
-of the standard can be made, they are _unintended_ side effects of the
-change in the POSIX standard to refer to the ISO C99 standard everywhere.
+3. String comparison with <, <= etc is supposed to take the local collating
+ sequence into account. Gawk currently doesn't. This is exacerbated
+ by the fact that the standard routines all want zero-terminated
+ strings to work on.
-With resepct to hexadecimal floating point, historically, AWK has always
-supported the input of only decimal numbers. Adding such a facility is
-likely to break many programs, very badly, and is a very big departure
-from historical practice.
-
-With respect to "NaN" and "Inf" values, many people point out that Unix
-awk and mawk "support the standard" and print such values in their output.
-This is _accidental_ support, since these programs are relying on the
-system library version of strtod/atof to do the work. If compiled on a
-system without such library support, those programs do NOT support the
-special IEEE values.
-
-These special interpretations introduce a large departure from existing
-practice:
-
- # Thanks to Brian Kernighan for this great example
- $ nawk 'BEGIN { print "Nancy Reagan" + 0 }'
- nan
-
-This is just plain wrong. String values with no leading digits must
-continue to convert to numeric zero.
-
-The POSIX people have been asked to clarify these issues, and not recently,
-but have not, to my knowledge, done so. Further discussion is provided
-in the node "POSIX Floating Point Problems" in the gawk manual.
-
----------- Stuff below this line is of historical interest only ----------
-March 2001:
-
-It looks like the revised 1003.2 standard will actually follow the
-rules given below. Hallelujah!
-
-October 1998:
-
-The 1003.2 work has been at a stand-still for ages. Who knows if or
-when a new revision will actually happen...
-
-August 1995:
-
-Although the published 1003.2 standard contained the incorrect
-comparison rules of 11.2 draft as described below, no actual implementation
-of awk (that I know of) actually used those rules.
-
-A revision of the 1003.2 standard is in progress, and in the May 1995
-draft, the rules were fixed (based on my submissions for interpretation
-requests) to match the description given below. Thus, the next version
-of the standard will have a correct description of the comparison
-rules.
-
-June 1992:
-
-Right now, the numeric vs. string comparisons are screwed up in draft
-11.2. What prompted me to check it out was the note in gnu.bug.utils
-which observed that gawk was doing the comparison $1 == "000"
-numerically. I think that we can agree that intuitively, this should
-be done as a string comparison. Version 2.13.2 of gawk follows the
-current POSIX draft. Following is how I (now) think this
-stuff should be done.
-
-1. A numeric literal or the result of a numeric operation has the NUMERIC
- attribute.
-
-2. A string literal or the result of a string operation has the STRING
- attribute.
-
-3. Fields, getline input, FILENAME, ARGV elements, ENVIRON elements and the
- elements of an array created by split() that are numeric strings
- have the STRNUM attribute. Otherwise, they have the STRING attribute.
- Uninitialized variables also have the STRNUM attribute.
-
-4. Attributes propagate across assignments, but are not changed by
- any use. (Although a use may cause the entity to acquire an additional
- value such that it has both a numeric and string value -- this leaves the
- attribute unchanged.)
-
-When two operands are compared, either string comparison or numeric comparison
-may be used, depending on the attributes of the operands, according to the
-following (symmetric) matrix:
-
- +----------------------------------------------
- | STRING NUMERIC STRNUM
---------+----------------------------------------------
- |
-STRING | string string string
- |
-NUMERIC | string numeric numeric
- |
-STRNUM | string numeric numeric
---------+----------------------------------------------
-
-So, the following program should print all OKs.
-
-echo '0e2 0a 0 0b
-0e2 0a 0 0b' |
-$AWK '
-NR == 1 {
- num = 0
- str = "0e2"
-
- print ++test ": " ( (str == "0e2") ? "OK" : "OOPS" )
- print ++test ": " ( ("0e2" != 0) ? "OK" : "OOPS" )
- print ++test ": " ( ("0" != $2) ? "OK" : "OOPS" )
- print ++test ": " ( ("0e2" == $1) ? "OK" : "OOPS" )
-
- print ++test ": " ( (0 == "0") ? "OK" : "OOPS" )
- print ++test ": " ( (0 == num) ? "OK" : "OOPS" )
- print ++test ": " ( (0 != $2) ? "OK" : "OOPS" )
- print ++test ": " ( (0 == $1) ? "OK" : "OOPS" )
-
- print ++test ": " ( ($1 != "0") ? "OK" : "OOPS" )
- print ++test ": " ( ($1 == num) ? "OK" : "OOPS" )
- print ++test ": " ( ($2 != 0) ? "OK" : "OOPS" )
- print ++test ": " ( ($2 != $1) ? "OK" : "OOPS" )
- print ++test ": " ( ($3 == 0) ? "OK" : "OOPS" )
- print ++test ": " ( ($3 == $1) ? "OK" : "OOPS" )
- print ++test ": " ( ($2 != $4) ? "OK" : "OOPS" ) # 15
-}
-{
- a = "+2"
- b = 2
- if (NR % 2)
- c = a + b
- print ++test ": " ( (a != b) ? "OK" : "OOPS" ) # 16 and 22
-
- d = "2a"
- b = 2
- if (NR % 2)
- c = d + b
- print ++test ": " ( (d != b) ? "OK" : "OOPS" )
-
- print ++test ": " ( (d + 0 == b) ? "OK" : "OOPS" )
-
- e = "2"
- print ++test ": " ( (e == b "") ? "OK" : "OOPS" )
-
- a = "2.13"
- print ++test ": " ( (a == 2.13) ? "OK" : "OOPS" )
-
- a = "2.130000"
- print ++test ": " ( (a != 2.13) ? "OK" : "OOPS" )
-
- if (NR == 2) {
- CONVFMT = "%.6f"
- print ++test ": " ( (a == 2.13) ? "OK" : "OOPS" )
- }
-}'
+ THIS SHOULD BE WORKED ON.
diff --git a/README.cvs b/README.cvs
index 341bf54c..7953fd43 100644
--- a/README.cvs
+++ b/README.cvs
@@ -4,14 +4,19 @@ Thu Nov 18 23:26:17 IST 2010
If you are reading this, you are looking in the wrong file. Gawk is
no longer maintained in CVS. It is maintained in git from savannah.gnu.org.
-Please execute ./bootstrap.sh before invoking the usual incantaton of
-`./configure && make && make check'. This version of bootstrap.sh
-should work OK.
-
-Bug reports should be sent to bug-gawk@gnu.org. Note that posting in
-comp.lang.awk is generally a bad idea, no matter what the purpose, but
-especially if you wish to report a gawk bug. Use the above email address.
-Really.
+According to the Savannah website, you can use:
+
+ cvs -d:pserver:anonymous@pserver.git.gnu.org:/gawk.git \
+ co -d gawk master
+
+to get the development version. Most likely if you use:
+
+ cvs -d:pserver:anonymous@pserver.git.gnu.org:/gawk.git \
+ co -d gawk-stable gawk-stable
+
+you'll get the gawk-stable branch. But I haven't tried either of these
+and I can't help you if they don't work. Please move directly to Git
+if you can.
Thanks,
diff --git a/TODO b/TODO
index 85b40c94..10ffe086 100644
--- a/TODO
+++ b/TODO
@@ -9,13 +9,14 @@ Design and implement I/O plugin API.
Implement C function call API per man pages
xgawk features (@load, -l, others)
-Make a git repository!
-Xfer it to savannah
-Tag last CVS revisions
-Remove treatment of CVS directories from makefiles (awklib, check others)
+
+#Make a git repository!
+#Xfer it to savannah
+#Tag last CVS revisions
+#Remove treatment of CVS directories from makefiles (awklib, check others)
# Review POSIX standard
Fix issues related to POSIX
-Revise FS splitting to use FPAT algorithm
+ - use of STRCOLL for comparison
Add tests for pgawk
Add tests for patches in emails
Add doc fix in email
@@ -30,6 +31,7 @@ Review all FIXME and TODO comments
Code Review:
array.c
+awkgram.y
awkprintf.h
cmd.h
command.c
@@ -50,7 +52,6 @@ protos.h
re.c
DONE:
-awkgram.y
awk.h
builtin.c
node.c
diff --git a/awklib/ChangeLog b/awklib/ChangeLog
index c1798179..92d24d8b 100644
--- a/awklib/ChangeLog
+++ b/awklib/ChangeLog
@@ -1,3 +1,7 @@
+Fri Nov 19 11:53:16 2010 Arnold D. Robbins <arnold@skeeve.com>
+
+ * Makefile.am: Remove special handling of CVS directories.
+
Thu May 6 20:55:14 2010 Arnold D. Robbins <arnold@skeeve.com>
* Release 3.1.8: Release tar file made.
diff --git a/awklib/Makefile.am b/awklib/Makefile.am
index 149656ff..e2c98dff 100644
--- a/awklib/Makefile.am
+++ b/awklib/Makefile.am
@@ -60,20 +60,11 @@ clean-local:
$(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi
cd $(srcdir) && \
- mv eg eg.old && \
- rm -fr stamp-eg && \
+ rm -fr eg && \
+ rm -fr stamp-eg && \
$(AWKPROG) -f extract.awk ../doc/gawk.texi ../doc/gawkinet.texi
@echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg
@echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg
- cd $(srcdir) && \
- if [ -d eg.old ] && [ -d eg.old/CVS ] ; then \
- mv eg.old/CVS eg ; \
- mv eg.old/data/CVS eg/data ; \
- mv eg.old/lib/CVS eg/lib ; \
- mv eg.old/misc/CVS eg/misc ; \
- mv eg.old/network/CVS eg/network ; \
- mv eg.old/prog/CVS eg/prog ; \
- rm -fr eg.old ; fi
$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \
$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
diff --git a/awklib/Makefile.in b/awklib/Makefile.in
index 45b9deba..cd721f59 100644
--- a/awklib/Makefile.in
+++ b/awklib/Makefile.in
@@ -608,20 +608,11 @@ clean-local:
$(srcdir)/stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi
cd $(srcdir) && \
- mv eg eg.old && \
- rm -fr stamp-eg && \
+ rm -fr eg && \
+ rm -fr stamp-eg && \
$(AWKPROG) -f extract.awk ../doc/gawk.texi ../doc/gawkinet.texi
@echo 'some makes are stupid and will not check a directory' > $(srcdir)/stamp-eg
@echo 'against a file, so this file is a place holder. gack.' >> $(srcdir)/stamp-eg
- cd $(srcdir) && \
- if [ -d eg.old ] && [ -d eg.old/CVS ] ; then \
- mv eg.old/CVS eg ; \
- mv eg.old/data/CVS eg/data ; \
- mv eg.old/lib/CVS eg/lib ; \
- mv eg.old/misc/CVS eg/misc ; \
- mv eg.old/network/CVS eg/network ; \
- mv eg.old/prog/CVS eg/prog ; \
- rm -fr eg.old ; fi
$(srcdir)/eg/lib/pwcat.c $(srcdir)/eg/lib/grcat.c $(srcdir)/eg/prog/igawk.sh \
$(srcdir)/eg/lib/passwdawk.in $(srcdir)/eg/lib/groupawk.in: stamp-eg; @:
diff --git a/bootstrap.sh b/bootstrap.sh
index 3503a04b..f7db5bcf 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,6 +1,7 @@
#! /bin/sh
-# bootstrap.sh --- touch relevant files to avoid out-of-date issues in CVS sandboxes
+# bootstrap.sh --- touch relevant files to avoid out-of-date issues in
+# Git sandboxes
# Copyright (C) 2007, 2009, 2010 the Free Software Foundation, Inc.
#
@@ -21,15 +22,15 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
-find . -name aclocal.m4 -print | grep -v /CVS/ | xargs touch
-find awklib -type f -print | grep -v /CVS/ | xargs touch
+find . -name aclocal.m4 -print | xargs touch
+find awklib -type f -print | xargs touch
sleep 1
touch configure
sleep 2
touch configh.in
sleep 1
touch test/Maketests
-find . -name Makefile.in -print | grep -v /CVS/ | xargs touch
+find . -name Makefile.in -print | xargs touch
touch doc/*.info
touch po/*.gmo
touch po/stamp-po