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
ERRNOto the string equivalent of the error code inerrno_val. The value should be one of the defined error codes in<errno.h>, andgawkturns it into a (possibly translated) string using the Cstrerror()function. void update_ERRNO_string(const char *string);- Set
ERRNOdirectly to the string value ofERRNO.gawkmakes a copy of the value ofstring. void unset_ERRNO(void);- Unset
ERRNO.