diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2010-11-12 12:23:33 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2010-11-12 12:23:33 +0200 |
commit | 40b3741f63c19e38077d57f4ce4737916ec5073e (patch) | |
tree | 89e086fabdfc738b379901d86733e6c260c22f35 /awklib | |
parent | 00ef0423acd97cb964a2bae54c93a03a8ab50e5e (diff) | |
download | egawk-40b3741f63c19e38077d57f4ce4737916ec5073e.tar.gz egawk-40b3741f63c19e38077d57f4ce4737916ec5073e.tar.bz2 egawk-40b3741f63c19e38077d57f4ce4737916ec5073e.zip |
Bring in development gawk changes.
Diffstat (limited to 'awklib')
-rw-r--r-- | awklib/Makefile.in | 19 | ||||
-rw-r--r-- | awklib/eg/lib/ctime.awk | 2 | ||||
-rw-r--r-- | awklib/eg/lib/groupawk.in | 3 | ||||
-rw-r--r-- | awklib/eg/lib/passwdawk.in | 3 | ||||
-rw-r--r-- | awklib/eg/prog/wc.awk | 4 |
5 files changed, 19 insertions, 12 deletions
diff --git a/awklib/Makefile.in b/awklib/Makefile.in index 80bfb3f8..8a5cdf75 100644 --- a/awklib/Makefile.in +++ b/awklib/Makefile.in @@ -62,15 +62,16 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/arch.m4 \ $(top_srcdir)/m4/codeset.m4 $(top_srcdir)/m4/gettext.m4 \ - $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intmax_t.m4 \ - $(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/isc-posix.m4 \ - $(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \ - $(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \ - $(top_srcdir)/m4/libsigsegv.m4 $(top_srcdir)/m4/longlong.m4 \ - $(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \ - $(top_srcdir)/m4/progtest.m4 $(top_srcdir)/m4/socket.m4 \ - $(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \ - $(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/configure.ac + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intlmacosx.m4 \ + $(top_srcdir)/m4/intmax_t.m4 $(top_srcdir)/m4/inttypes_h.m4 \ + $(top_srcdir)/m4/isc-posix.m4 $(top_srcdir)/m4/lcmessage.m4 \ + $(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \ + $(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libsigsegv.m4 \ + $(top_srcdir)/m4/longlong.m4 $(top_srcdir)/m4/nls.m4 \ + $(top_srcdir)/m4/po.m4 $(top_srcdir)/m4/progtest.m4 \ + $(top_srcdir)/m4/socket.m4 $(top_srcdir)/m4/stdint_h.m4 \ + $(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/ulonglong.m4 \ + $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/awklib/eg/lib/ctime.awk b/awklib/eg/lib/ctime.awk index 0a50d262..f37856c6 100644 --- a/awklib/eg/lib/ctime.awk +++ b/awklib/eg/lib/ctime.awk @@ -4,7 +4,7 @@ function ctime(ts, format) { - format = "%a %b %d %H:%M:%S %Z %Y" + format = "%a %b %e %H:%M:%S %Z %Y" if (ts == 0) ts = systime() # use current time as default return strftime(format, ts) diff --git a/awklib/eg/lib/groupawk.in b/awklib/eg/lib/groupawk.in index 899656bd..a9e10e1f 100644 --- a/awklib/eg/lib/groupawk.in +++ b/awklib/eg/lib/groupawk.in @@ -20,6 +20,7 @@ function _gr_init( oldfs, oldrs, olddol0, grcat, oldrs = RS olddol0 = $0 using_fw = (PROCINFO["FS"] == "FIELDWIDTHS") + using_fpat = (PROCINFO["FS"] == "FPAT") FS = ":" RS = "\n" @@ -50,6 +51,8 @@ function _gr_init( oldfs, oldrs, olddol0, grcat, FS = oldfs if (using_fw) FIELDWIDTHS = FIELDWIDTHS + else if (using_fpat) + FPAT = FPAT RS = oldrs $0 = olddol0 } diff --git a/awklib/eg/lib/passwdawk.in b/awklib/eg/lib/passwdawk.in index 47798ded..323ebf58 100644 --- a/awklib/eg/lib/passwdawk.in +++ b/awklib/eg/lib/passwdawk.in @@ -18,6 +18,7 @@ function _pw_init( oldfs, oldrs, olddol0, pwcat, using_fw) oldrs = RS olddol0 = $0 using_fw = (PROCINFO["FS"] == "FIELDWIDTHS") + using_fpat = (PROCINFO["FS"] == "FPAT") FS = ":" RS = "\n" @@ -33,6 +34,8 @@ function _pw_init( oldfs, oldrs, olddol0, pwcat, using_fw) FS = oldfs if (using_fw) FIELDWIDTHS = FIELDWIDTHS + else if (using_fpat) + FPAT = FPAT RS = oldrs $0 = olddol0 } diff --git a/awklib/eg/prog/wc.awk b/awklib/eg/prog/wc.awk index 8fb48164..d51b9ff2 100644 --- a/awklib/eg/prog/wc.awk +++ b/awklib/eg/prog/wc.awk @@ -34,14 +34,14 @@ BEGIN { } function beginfile(file) { - chars = lines = words = 0 + lines = words = chars = 0 fname = FILENAME } function endfile(file) { - tchars += chars tlines += lines twords += words + tchars += chars if (do_lines) printf "\t%d", lines if (do_words) |