gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, non-fatal-io-2, updated. gawk-4.1.0-1098


From: Arnold Robbins
Subject: [gawk-diffs] [SCM] gawk branch, non-fatal-io-2, updated. gawk-4.1.0-1098-g7f9f665
Date: Sun, 08 Feb 2015 18:01:50 +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, non-fatal-io-2 has been updated
       via  7f9f66525d7d82816eba352efdf58497373a47bf (commit)
      from  0e38201f5879cc91c90876b2b9b219a308e3a2d2 (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=7f9f66525d7d82816eba352efdf58497373a47bf

commit 7f9f66525d7d82816eba352efdf58497373a47bf
Author: Arnold D. Robbins <address@hidden>
Date:   Sun Feb 8 20:01:32 2015 +0200

    Use "NONFATAL" for nonfatal I/O.

diff --git a/ChangeLog b/ChangeLog
index 61362b7..0727c92 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
-<<<<<<< HEAD
+2015-02-08         Arnold D. Robbins     <address@hidden>
+
+       * io.c: Make it "NONFATAL" everywhere.
+
 2015-02-08         Andrew J. Schorr     <address@hidden>
 
        * awk.h (RED_NON_FATAL): Removed.
@@ -17,7 +20,7 @@
        * awk.h (is_non_fatal_std): Declare new function.
        * io.c (is_non_fatal_std): New function.
        * builtin.c (efwrite): Call it.
-=======
+
 2015-02-07         Arnold D. Robbins     <address@hidden>
 
        * regcomp.c, regex.c, regex.h, regex_internal.c, regex_internal.h,
@@ -119,7 +122,6 @@
        * awkgram.y (extensions_used): New variable. Set it on @load.
        (do_add_scrfile): Set it on -l.
        (process_deferred): Check it also.
->>>>>>> master
 
 2014-12-24         Arnold D. Robbins     <address@hidden>
 
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 5d8c4a5..3840f93 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,6 +1,7 @@
 2015-02-08         Arnold D. Robbins     <address@hidden>
 
        * gawktexi.in: O'Reilly fixes.
+       Make non-fatal i/o use "NONFATAL".
 
 2015-02-06         Arnold D. Robbins     <address@hidden>
 
diff --git a/doc/gawk.info b/doc/gawk.info
index d83370e..118c814 100644
--- a/doc/gawk.info
+++ b/doc/gawk.info
@@ -7226,10 +7226,10 @@ error message of your choosing before exiting.  You can 
do this in one
 of two ways:
 
    * For all output files, by assigning any value to
-     `PROCINFO["nonfatal"]'.
+     `PROCINFO["NONFATAL"]'.
 
    * On a per-file basis, by assigning any value to `PROCINFO[FILENAME,
-     "nonfatal"]'.  Here, FILENAME is the name of the file to which you
+     "NONFATAL"]'.  Here, FILENAME is the name of the file to which you
      wish output to be nonfatal.
 
    Once you have enabled nonfatal output, you must check `ERRNO' after
@@ -7239,7 +7239,7 @@ attempting the output. For example:
 
      $ gawk '
      > BEGIN {
-     >     PROCINFO["nonfatal"] = 1
+     >     PROCINFO["NONFATAL"] = 1
      >     ERRNO = 0
      >     print "hi" > "/no/such/file"
      >     if (ERRNO) {
@@ -7253,9 +7253,9 @@ attempting the output. For example:
 program code detect the problem and handle it.
 
    This mechanism works also for standard output and standard error.
-For standard output, you may use `PROCINFO["-", "nonfatal"]' or
-`PROCINFO["/dev/stdout", "nonfatal"]'.  For standard error, use
-`PROCINFO["/dev/stderr", "nonfatal"]'.
+For standard output, you may use `PROCINFO["-", "NONFATAL"]' or
+`PROCINFO["/dev/stdout", "NONFATAL"]'.  For standard error, use
+`PROCINFO["/dev/stderr", "NONFATAL"]'.
 
 
 File: gawk.info,  Node: Output Summary,  Next: Output Exercises,  Prev: 
Nonfatal,  Up: Printing
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 81568fe..1a23912 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -10458,11 +10458,11 @@ You can do this in one of two ways:
 
 @itemize @bullet
 @item
-For all output files, by assigning any value to @code{PROCINFO["nonfatal"]}.
+For all output files, by assigning any value to @code{PROCINFO["NONFATAL"]}.
 
 @item
 On a per-file basis, by assigning any value to
address@hidden@var{filename}, "nonfatal"]}.
address@hidden@var{filename}, "NONFATAL"]}.
 Here, @var{filename} is the name of the file to which
 you wish output to be nonfatal.
 @end itemize
@@ -10475,7 +10475,7 @@ see if something went wrong.  It is also a good idea to 
initialize
 @example
 $ @kbd{gawk '}
 > @kbd{BEGIN @{}
-> @kbd{    PROCINFO["nonfatal"] = 1}
+> @kbd{    PROCINFO["NONFATAL"] = 1}
 > @kbd{    ERRNO = 0}
 > @kbd{    print "hi" > "/no/such/file"}
 > @kbd{    if (ERRNO) @{}
@@ -10490,9 +10490,9 @@ Here, @command{gawk} did not produce a fatal error; 
instead
 it let the @command{awk} program code detect the problem and handle it.
 
 This mechanism works also for standard output and standard error.
-For standard output, you may use @code{PROCINFO["-", "nonfatal"]}
-or @code{PROCINFO["/dev/stdout", "nonfatal"]}.  For standard error, use
address@hidden"/dev/stderr", "nonfatal"]}.
+For standard output, you may use @code{PROCINFO["-", "NONFATAL"]}
+or @code{PROCINFO["/dev/stdout", "NONFATAL"]}.  For standard error, use
address@hidden"/dev/stderr", "NONFATAL"]}.
 
 @node Output Summary
 @section Summary
diff --git a/doc/gawktexi.in b/doc/gawktexi.in
index e127f42..1e833fe 100644
--- a/doc/gawktexi.in
+++ b/doc/gawktexi.in
@@ -9954,11 +9954,11 @@ You can do this in one of two ways:
 
 @itemize @bullet
 @item
-For all output files, by assigning any value to @code{PROCINFO["nonfatal"]}.
+For all output files, by assigning any value to @code{PROCINFO["NONFATAL"]}.
 
 @item
 On a per-file basis, by assigning any value to
address@hidden@var{filename}, "nonfatal"]}.
address@hidden@var{filename}, "NONFATAL"]}.
 Here, @var{filename} is the name of the file to which
 you wish output to be nonfatal.
 @end itemize
@@ -9971,7 +9971,7 @@ see if something went wrong.  It is also a good idea to 
initialize
 @example
 $ @kbd{gawk '}
 > @kbd{BEGIN @{}
-> @kbd{    PROCINFO["nonfatal"] = 1}
+> @kbd{    PROCINFO["NONFATAL"] = 1}
 > @kbd{    ERRNO = 0}
 > @kbd{    print "hi" > "/no/such/file"}
 > @kbd{    if (ERRNO) @{}
@@ -9986,9 +9986,9 @@ Here, @command{gawk} did not produce a fatal error; 
instead
 it let the @command{awk} program code detect the problem and handle it.
 
 This mechanism works also for standard output and standard error.
-For standard output, you may use @code{PROCINFO["-", "nonfatal"]}
-or @code{PROCINFO["/dev/stdout", "nonfatal"]}.  For standard error, use
address@hidden"/dev/stderr", "nonfatal"]}.
+For standard output, you may use @code{PROCINFO["-", "NONFATAL"]}
+or @code{PROCINFO["/dev/stdout", "NONFATAL"]}.  For standard error, use
address@hidden"/dev/stderr", "NONFATAL"]}.
 
 @node Output Summary
 @section Summary
diff --git a/io.c b/io.c
index db8a0a2..f975353 100644
--- a/io.c
+++ b/io.c
@@ -1069,15 +1069,17 @@ getredirect(const char *str, int len)
 bool
 is_non_fatal_std(FILE *fp)
 {
-       if (in_PROCINFO("nonfatal", NULL, NULL))
+       static const char nonfatal[] = "NONFATAL";
+
+       if (in_PROCINFO(nonfatal, NULL, NULL))
                return true;
 
        /* yucky logic. sigh. */
        if (fp == stdout) {
-               return (   in_PROCINFO("-", "nonfatal", NULL) != NULL
-                       || in_PROCINFO("/dev/stdout", "nonfatal", NULL) != 
NULL);
+               return (   in_PROCINFO("-", nonfatal, NULL) != NULL
+                       || in_PROCINFO("/dev/stdout", nonfatal, NULL) != NULL);
        } else if (fp == stderr) {
-               return (in_PROCINFO("/dev/stderr", "nonfatal", NULL) != NULL);
+               return (in_PROCINFO("/dev/stderr", nonfatal, NULL) != NULL);
        }
 
        return false;
@@ -1088,8 +1090,8 @@ is_non_fatal_std(FILE *fp)
 bool
 is_non_fatal_redirect(const char *str)
 {
-       return in_PROCINFO("nonfatal", NULL, NULL) != NULL
-              || in_PROCINFO(str, "nonfatal", NULL) != NULL;
+       return in_PROCINFO("NONFATAL", NULL, NULL) != NULL
+              || in_PROCINFO(str, "NONFATAL", NULL) != NULL;
 }
 
 /* close_one --- temporarily close an open file to re-use the fd */
diff --git a/test/ChangeLog b/test/ChangeLog
index b0979d8..e888c66 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-08         Arnold D. Robbins     <address@hidden>
+
+       * nonfatal1.awk, nonfatal2.awk: String is now "NONFATAL".
+
 2015-02-06         Arnold D. Robbins     <address@hidden>
 
        * Makefile.am (nonfatal1, nonfatal2): New tests.
diff --git a/test/nonfatal1.awk b/test/nonfatal1.awk
index 8366128..bf821d4 100644
--- a/test/nonfatal1.awk
+++ b/test/nonfatal1.awk
@@ -1,5 +1,5 @@
 BEGIN {
-       PROCINFO["nonfatal"]
+       PROCINFO["NONFATAL"]
        print |& "/inet/tcp/0/ti10/357"
        print ERRNO
 }
diff --git a/test/nonfatal2.awk b/test/nonfatal2.awk
index f5db71c..fedbba4 100644
--- a/test/nonfatal2.awk
+++ b/test/nonfatal2.awk
@@ -1,5 +1,5 @@
 BEGIN {
-       PROCINFO["nonfatal"] = 1
+       PROCINFO["NONFATAL"] = 1
        print > "/dev/no/such/file"
        print ERRNO
 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          |    8 +++++---
 doc/ChangeLog      |    1 +
 doc/gawk.info      |   12 ++++++------
 doc/gawk.texi      |   12 ++++++------
 doc/gawktexi.in    |   12 ++++++------
 io.c               |   14 ++++++++------
 test/ChangeLog     |    4 ++++
 test/nonfatal1.awk |    2 +-
 test/nonfatal2.awk |    2 +-
 9 files changed, 38 insertions(+), 29 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]