Updating ERRNO (The GNU Awk User’s Guide)
From Get docs
Gawk/docs/latest/Updating-ERRNO
Next: Requesting Values, Previous: Printing Messages, Up: Extension API Description [Contents][Index]
17.4.7 Updating ERRNO
The following functions allow you to update the ERRNO
variable:
void update_ERRNO_int(int errno_val);
- Set
ERRNO
to the string equivalent of the error code inerrno_val
. The value should be one of the defined error codes in<errno.h>
, andgawk
turns it into a (possibly translated) string using the Cstrerror()
function. void update_ERRNO_string(const char *string);
- Set
ERRNO
directly to the string value ofERRNO
.gawk
makes a copy of the value ofstring
. void unset_ERRNO(void);
- Unset
ERRNO
.