diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/ChangeLog | 7 | ||||
-rw-r--r-- | doc/gawk.texi | 32 |
2 files changed, 27 insertions, 12 deletions
diff --git a/doc/ChangeLog b/doc/ChangeLog index 815644ca..568d7c78 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,10 @@ +2012-04-01 Andrew J. Schorr <aschorr@telemetry-investments.com> + + * gawk.texi: Replace documentation of removed functions update_ERRNO and + update_ERRNO_saved with descriptions new functions update_ERRNO_int, + update_ERRNO_string and unset_ERRNO. And fix a couple of examples + to use update_ERRNO_int instead of update_ERRNO. + 2012-03-26 Arnold D. Robbins <arnold@skeeve.com> * gawk.texi: Minor style edits. diff --git a/doc/gawk.texi b/doc/gawk.texi index eaad54d2..7b46026b 100644 --- a/doc/gawk.texi +++ b/doc/gawk.texi @@ -29460,21 +29460,29 @@ This is a convenience macro that calls @code{get_actual_argument()}. @cindex functions, return values@comma{} setting @cindex @code{ERRNO} variable -@cindex @code{update_ERRNO()} internal function -@cindex internal function, @code{update_ERRNO()} -@item void update_ERRNO(void) +@cindex @code{update_ERRNO_int()} internal function +@cindex internal function, @code{update_ERRNO_int()} +@item void update_ERRNO_int(int errno_saved) This function is called from within a C extension function to set -the value of @command{gawk}'s @code{ERRNO} variable, based on the current -value of the C @code{errno} global variable. +the value of @command{gawk}'s @code{ERRNO} variable, based on the error +value provided as the argument. It is provided as a convenience. @cindex @code{ERRNO} variable -@cindex @code{update_ERRNO_saved()} internal function -@cindex internal function, @code{update_ERRNO_saved()} -@item void update_ERRNO_saved(int errno_saved) +@cindex @code{update_ERRNO_string()} internal function +@cindex internal function, @code{update_ERRNO_string()} +@item void update_ERRNO_string(const char *string, enum errno_translate) This function is called from within a C extension function to set -the value of @command{gawk}'s @code{ERRNO} variable, based on the error -value provided as the argument. +the value of @command{gawk}'s @code{ERRNO} variable to a given string. +The second argument determines whether the string is translated before being +installed into @code{ERRNO}. It is provided as a convenience. + +@cindex @code{ERRNO} variable +@cindex @code{unset_ERRNO()} internal function +@cindex internal function, @code{unset_ERRNO()} +@item void unset_ERRNO(void) +This function is called from within a C extension function to set +the value of @command{gawk}'s @code{ERRNO} variable to a null string. It is provided as a convenience. @cindex @code{ENVIRON} array @@ -29838,7 +29846,7 @@ is updated. (void) force_string(newdir); ret = chdir(newdir->stptr); if (ret < 0) - update_ERRNO(); + update_ERRNO_int(errno); @end example Finally, the function returns the return value to the @command{awk} level: @@ -29907,7 +29915,7 @@ If there's an error, it sets @code{ERRNO} and returns: (void) force_string(file); ret = lstat(file->stptr, & sbuf); if (ret < 0) @{ - update_ERRNO(); + update_ERRNO_int(errno); return make_number((AWKNUM) ret); @} @end example |