[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-900
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-900-gce211fb |
Date: |
Mon, 30 May 2016 21:35:52 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-4.1-stable has been updated
via ce211fb7fcf1463619d2b2ef32b8f6c2f4f35459 (commit)
from db17f0d20a03bd851e8e4f005eb6304ad6a93c12 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=ce211fb7fcf1463619d2b2ef32b8f6c2f4f35459
commit ce211fb7fcf1463619d2b2ef32b8f6c2f4f35459
Author: Arnold D. Robbins <address@hidden>
Date: Mon May 30 17:35:37 2016 -0400
Allow FS = "\0" if RS = "".
diff --git a/ChangeLog b/ChangeLog
index 1476f3c..77119e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,11 @@
* main.c (arg_assign): Fully bracket ifdefs around call
to force_number. Thanks to Andrew Schorr for pointing out
that force_number was called only if LC_NUMERIC was defined.
+
+ Lots of files: Update copyright date.
+
+ * field.c (set_FS): Handle FS = "\0" if RS = "". Thanks to
+ Janis Papanagnou for the report.
2016-05-26 Andrew J. Schorr <address@hidden>
diff --git a/field.c b/field.c
index abd08c0..5f5b2b6 100644
--- a/field.c
+++ b/field.c
@@ -1270,8 +1270,12 @@ choose_fs_function:
} else if (fs->stptr[0] == '\\') {
/* yet another special case */
strcpy(buf, "[\\\\\n]");
- } else if (fs->stptr[0] != '\n')
+ } else if (fs->stptr[0] == '\0') {
+ /* and yet another special case */
+ strcpy(buf, "[\\000\n]");
+ } else if (fs->stptr[0] != '\n') {
sprintf(buf, "[%c\n]", fs->stptr[0]);
+ }
}
} else {
if (do_posix)
diff --git a/test/ChangeLog b/test/ChangeLog
index 2ba6231..2e1090c 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,8 @@
+2016-05-30 Arnold D. Robbins <address@hidden>
+
+ * Makefile.am (fsnul1): New test.
+ * fsnul1.awk, fsnul1.in, fsnul1.ok: New files.
+
2016-05-25 Arnold D. Robbins <address@hidden>
* arrayind1.awk: Flush writes to stderr. We hope this helps
diff --git a/test/Makefile.am b/test/Makefile.am
index 5965652..92e8f6e 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -316,6 +316,9 @@ EXTRA_DIST = \
fsfwfs.awk \
fsfwfs.in \
fsfwfs.ok \
+ fsnul1.awk \
+ fsnul1.in \
+ fsnul1.ok \
fsrs.awk \
fsrs.in \
fsrs.ok \
@@ -1056,7 +1059,7 @@ BASIC_TESTS = \
datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress
dynlj \
eofsplit exit2 exitval1 exitval2 exitval3 \
fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \
- fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \
+ fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsnul1 fsrs fsspcoln
\
fstabplus funsemnl funsmnam funstack \
getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \
gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \
diff --git a/test/Makefile.in b/test/Makefile.in
index 7c201ea..34656ec 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -573,6 +573,9 @@ EXTRA_DIST = \
fsfwfs.awk \
fsfwfs.in \
fsfwfs.ok \
+ fsnul1.awk \
+ fsnul1.in \
+ fsnul1.ok \
fsrs.awk \
fsrs.in \
fsrs.ok \
@@ -1312,7 +1315,7 @@ BASIC_TESTS = \
datanonl defref delargv delarpm2 delarprm delfunc dfamb1 dfastress
dynlj \
eofsplit exit2 exitval1 exitval2 exitval3 \
fcall_exit fcall_exit2 fldchg fldchgnf fnamedat fnarray fnarray2 \
- fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsrs fsspcoln \
+ fnaryscl fnasgnm fnmisc fordel forref forsimp fsbs fsnul1 fsrs fsspcoln
\
fstabplus funsemnl funsmnam funstack \
getline getline2 getline3 getline4 getline5 getlnbuf getnr2tb getnr2tm \
gsubasgn gsubtest gsubtst2 gsubtst3 gsubtst4 gsubtst5 gsubtst6 \
@@ -2908,6 +2911,11 @@ fsbs:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+fsnul1:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
fsrs:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/Maketests b/test/Maketests
index c16bdc2..e5bde1d 100644
--- a/test/Maketests
+++ b/test/Maketests
@@ -315,6 +315,11 @@ fsbs:
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
@-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+fsnul1:
+ @echo $@
+ @AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
+ @-$(CMP) "$(srcdir)"/address@hidden _$@ && rm -f _$@
+
fsrs:
@echo $@
@AWKPATH="$(srcdir)" $(AWK) -f address@hidden <
"$(srcdir)"/address@hidden >_$@ 2>&1 || echo EXIT CODE: $$? >>_$@
diff --git a/test/fsnul1.awk b/test/fsnul1.awk
new file mode 100644
index 0000000..5a1b473
--- /dev/null
+++ b/test/fsnul1.awk
@@ -0,0 +1,2 @@
+BEGIN { FS = "\0" ; RS = "" }
+{ print $2 }
diff --git a/test/fsnul1.in b/test/fsnul1.in
new file mode 100644
index 0000000..7dec250
Binary files /dev/null and b/test/fsnul1.in differ
diff --git a/test/fsnul1.ok b/test/fsnul1.ok
new file mode 100644
index 0000000..ab4a981
--- /dev/null
+++ b/test/fsnul1.ok
@@ -0,0 +1 @@
+ho
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
field.c | 6 +++++-
test/ChangeLog | 5 +++++
test/Makefile.am | 5 ++++-
test/Makefile.in | 10 +++++++++-
test/Maketests | 5 +++++
test/fsnul1.awk | 2 ++
test/fsnul1.in | Bin 0 -> 6 bytes
test/fsnul1.ok | 1 +
9 files changed, 36 insertions(+), 3 deletions(-)
create mode 100644 test/fsnul1.awk
create mode 100644 test/fsnul1.in
create mode 100644 test/fsnul1.ok
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-900-gce211fb,
Arnold Robbins <=