[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, master, updated. 442fcc98d61531a882e95d9
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, master, updated. 442fcc98d61531a882e95d95f133aa6735df0f90 |
Date: |
Tue, 15 Jan 2013 17:50:37 +0000 |
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, master has been updated
via 442fcc98d61531a882e95d95f133aa6735df0f90 (commit)
from edce216d276505437c9cc156f0db4fa586639d76 (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=442fcc98d61531a882e95d95f133aa6735df0f90
commit 442fcc98d61531a882e95d95f133aa6735df0f90
Author: Arnold D. Robbins <address@hidden>
Date: Tue Jan 15 19:50:14 2013 +0200
Add man page for inplace extension. Update others.
diff --git a/extension/ChangeLog b/extension/ChangeLog
index 33fb645..909e70b 100644
--- a/extension/ChangeLog
+++ b/extension/ChangeLog
@@ -1,3 +1,10 @@
+2013-01-15 Arnold D. Robbins <address@hidden>
+
+ * inplace.3am: New file.
+ * filefuncs.3am, fnmatch.3am, fork.3am, ordchr.3am, readdir.3am,
+ readfile.3am, revoutput.3am, revtwoway.3am, rwarray.3am,
+ time.3am: Update copyright dates, add reference to inplace(3am).
+
2013-01-10 Andrew J. Schorr <address@hidden>
* inplace.c (do_inplace_begin): No need to get the 2nd suffix argument,
diff --git a/extension/filefuncs.3am b/extension/filefuncs.3am
index 396502c..d0eb2ac 100644
--- a/extension/filefuncs.3am
+++ b/extension/filefuncs.3am
@@ -1,4 +1,4 @@
-.TH FILEFUNCS 3am "Dec 25 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH FILEFUNCS 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
filefuncs \- provide some file related functionality to gawk
.SH SYNOPSIS
@@ -331,6 +331,7 @@ distribution for an example.
.IR "GAWK: Effective AWK Programming" ,
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -345,7 +346,7 @@ distribution for an example.
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/fnmatch.3am b/extension/fnmatch.3am
index 61e7f38..e2e8391 100644
--- a/extension/fnmatch.3am
+++ b/extension/fnmatch.3am
@@ -1,4 +1,4 @@
-.TH FNMATCH 3am "Dec 25 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH FNMATCH 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
fnmatch \- compare a string against a filename wildcard
.SH SYNOPSIS
@@ -88,6 +88,7 @@ if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH)
.IR "GAWK: Effective AWK Programming" ,
.IR filefuncs (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -100,7 +101,7 @@ if (fnmatch("*.a", "foo.c", flags) == FNM_NOMATCH)
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/fork.3am b/extension/fork.3am
index 9d89aa5..c87dada 100644
--- a/extension/fork.3am
+++ b/extension/fork.3am
@@ -1,4 +1,4 @@
-.TH FORK 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH FORK 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
fork, wait, waitpid \- basic process management
.SH SYNOPSIS
@@ -59,6 +59,7 @@ else
.IR "GAWK: Effective AWK Programming" ,
.IR filefuncs (3am),
.IR fnmatch (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -73,7 +74,7 @@ else
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/time.3am b/extension/inplace.3am
similarity index 53%
copy from extension/time.3am
copy to extension/inplace.3am
index 42d9bf3..5ca04be 100644
--- a/extension/time.3am
+++ b/extension/inplace.3am
@@ -1,49 +1,57 @@
-.TH TIME 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH INPLACE 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
-time \- time functions for gawk
+inplace \- emulate sed/perl/ruby in-place editing
.SH SYNOPSIS
.ft CW
address@hidden "time"
-.sp
-time = gettimeofday()
-.br
-ret = sleep(amount)
+.nf
address@hidden "inplace"
+
+# Please set INPLACE_SUFFIX to make a backup copy. For example, you may
+# want to set INPLACE_SUFFIX to .bak on the command line or in a BEGIN rule.
+
+BEGINFILE {
+ inplace_begin(FILENAME, INPLACE_SUFFIX)
+}
+
+ENDFILE {
+ inplace_end(FILENAME, INPLACE_SUFFIX)
+}
+.fi
.ft R
.SH DESCRIPTION
The
-.I time
+.I inplace
extension adds two functions named
-.BR gettimeofday() .
+.B inplace_begin()
and
-.BR sleep() ,
-as follows.
-.TP
-.B gettimeofday()
-This function returns the number of seconds since the Epoch
-as a floating-point value. It should have subsecond precision.
-It returns \-1 upon error and sets
-.B ERRNO
-to indicate the problem.
-.TP
-.BI sleep( seconds )
-This function attempts to sleep for the given amount of seconds, which
-may include a fractional portion.
-If
-.I seconds
-is negative, or the attempt to sleep fails,
-then it returns \-1 and sets
-.BR ERRNO .
-Otherwise, the function should return 0 after sleeping
-for the indicated amount of time.
+.BR inplace_end() .
+These functions are meant to be invoked from the
+.I inplace.awk
+wrapper (whose contents are displayed above)
+which is installed when
+.I gawk
+is.
+.PP
+By default, each named file on the command line is
+replaced with a new file of the same name whose contents
+are the results of running the AWK program.
+If the user supplies an AWK variable named
+.B INPLACE_SUFFIX
+in a
+.B BEGIN
+rule or on the command line, then the
+.I inplace
+extension concatenates that suffix onto the original
+filename and uses the result as a filename for renaming
+the original.
... .SH NOTES
... .SH BUGS
.SH EXAMPLE
.ft CW
.nf
address@hidden "time"
-\&...
-printf "It is now %g seconds since the Epoch\en", gettimeofday()
-printf "Pausing for a while... " ; sleep(2.5) ; print "done"
+gawk -i inplace '\f(CIscript\fP' files ...
+.br
+gawk -i inplace -f \f(CIscriptfile\fP files ...
.fi
.ft R
.SH "SEE ALSO"
@@ -56,15 +64,11 @@ printf "Pausing for a while... " ; sleep(2.5) ; print "done"
.IR readfile (3am),
.IR revoutput (3am),
.IR rwarray (3am).
-.PP
-.IR gettimeofday (2),
-.IR nanosleep (2),
-.IR select (2).
.SH AUTHOR
-Arnold Robbins,
-.BR address@hidden .
+Andrew Schorr,
+.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/ordchr.3am b/extension/ordchr.3am
index 86312a3..a2b712f 100644
--- a/extension/ordchr.3am
+++ b/extension/ordchr.3am
@@ -1,4 +1,4 @@
-.TH ORDCHR 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH ORDCHR 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
ordchr \- convert characters to strings and vice versa
.SH SYNOPSIS
@@ -44,6 +44,7 @@ printf("The string value of 65 is %s\en", chr(65))
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR readdir (3am),
.IR readfile (3am),
.IR revoutput (3am),
@@ -53,7 +54,7 @@ printf("The string value of 65 is %s\en", chr(65))
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/readdir.3am b/extension/readdir.3am
index 297e24b..4ba5abc 100644
--- a/extension/readdir.3am
+++ b/extension/readdir.3am
@@ -1,4 +1,4 @@
-.TH READDIR 3am "Nov 18 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH READDIR 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
readdir \- directory input parser for gawk
.SH SYNOPSIS
@@ -67,6 +67,7 @@ BEGIN { FS = "/" }
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readfile (3am),
.IR revoutput (3am),
@@ -80,7 +81,7 @@ BEGIN { FS = "/" }
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/readfile.3am b/extension/readfile.3am
index 8daec42..688d9cd 100644
--- a/extension/readfile.3am
+++ b/extension/readfile.3am
@@ -1,4 +1,4 @@
-.TH READFILE 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH READFILE 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
readfile \- return the entire contents of a file as a string
.SH SYNOPSIS
@@ -37,6 +37,7 @@ if (contents == "" && ERRNO != "") {
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR revoutput (3am),
@@ -46,7 +47,7 @@ if (contents == "" && ERRNO != "") {
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/revoutput.3am b/extension/revoutput.3am
index 61e3412..9c8f062 100644
--- a/extension/revoutput.3am
+++ b/extension/revoutput.3am
@@ -1,4 +1,4 @@
-.TH REVOUTPUT 3am "Oct 14 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH REVOUTPUT 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
revoutput \- Reverse output strings sample extension
.SH SYNOPSIS
@@ -40,6 +40,7 @@ dlrow ,olleh
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -49,7 +50,7 @@ dlrow ,olleh
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/revtwoway.3am b/extension/revtwoway.3am
index 9f2f040..3426971 100644
--- a/extension/revtwoway.3am
+++ b/extension/revtwoway.3am
@@ -1,4 +1,4 @@
-.TH REVTWOWAY 3am "Oct 24 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH REVTWOWAY 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
revtwoway \- Reverse strings sample two-way processor extension
.SH SYNOPSIS
@@ -29,6 +29,7 @@ it may also be mildy amusing.
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -39,7 +40,7 @@ it may also be mildy amusing.
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/rwarray.3am b/extension/rwarray.3am
index 0237397..359d91c 100644
--- a/extension/rwarray.3am
+++ b/extension/rwarray.3am
@@ -1,4 +1,4 @@
-.TH RWARRAY 3am "Nov 04 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH RWARRAY 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
writea, reada \- write and read gawk arrays to/from files
.SH SYNOPSIS
@@ -69,6 +69,7 @@ ret = reada("arraydump.bin", array)
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -78,7 +79,7 @@ ret = reada("arraydump.bin", array)
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
diff --git a/extension/time.3am b/extension/time.3am
index 42d9bf3..aeb5919 100644
--- a/extension/time.3am
+++ b/extension/time.3am
@@ -1,4 +1,4 @@
-.TH TIME 3am "Aug 08 2012" "Free Software Foundation" "GNU Awk Extension
Modules"
+.TH TIME 3am "Jan 15 2013" "Free Software Foundation" "GNU Awk Extension
Modules"
.SH NAME
time \- time functions for gawk
.SH SYNOPSIS
@@ -13,7 +13,7 @@ ret = sleep(amount)
The
.I time
extension adds two functions named
-.BR gettimeofday() .
+.B gettimeofday()
and
.BR sleep() ,
as follows.
@@ -51,6 +51,7 @@ printf "Pausing for a while... " ; sleep(2.5) ; print "done"
.IR filefuncs (3am),
.IR fnmatch (3am),
.IR fork (3am),
+.IR inplace (3am),
.IR ordchr (3am),
.IR readdir (3am),
.IR readfile (3am),
@@ -64,7 +65,7 @@ printf "Pausing for a while... " ; sleep(2.5) ; print "done"
Arnold Robbins,
.BR address@hidden .
.SH COPYING PERMISSIONS
-Copyright \(co 2012
+Copyright \(co 2012, 2013,
Free Software Foundation, Inc.
.PP
Permission is granted to make and distribute verbatim copies of
-----------------------------------------------------------------------
Summary of changes:
extension/ChangeLog | 7 +++
extension/filefuncs.3am | 5 +-
extension/fnmatch.3am | 5 +-
extension/fork.3am | 5 +-
extension/{time.3am => inplace.3am} | 84 ++++++++++++++++++----------------
extension/ordchr.3am | 5 +-
extension/readdir.3am | 5 +-
extension/readfile.3am | 5 +-
extension/revoutput.3am | 5 +-
extension/revtwoway.3am | 5 +-
extension/rwarray.3am | 5 +-
extension/time.3am | 7 ++-
12 files changed, 82 insertions(+), 61 deletions(-)
copy extension/{time.3am => inplace.3am} (53%)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, master, updated. 442fcc98d61531a882e95d95f133aa6735df0f90,
Arnold Robbins <=