Index: ossp-pkg/var/var.pod RCS File: /v/ossp/cvs/ossp-pkg/var/var.pod,v rcsdiff -q -kk '-r1.4' '-r1.5' -u '/v/ossp/cvs/ossp-pkg/var/var.pod,v' 2>/dev/null --- var.pod 2001/11/19 15:38:47 1.4 +++ var.pod 2001/11/19 16:15:32 1.5 @@ -39,6 +39,8 @@ var_rc_t var_expand(const char *input, size_t input_len, char **result, size_t *result_len, var_cb_t lookup, void *lookup_context, const var_config_t *config, int force_expand); +const char *var_strerror(var_rc_t rc); + =head1 DESCRIPTION The routines included in this library, var_unescape() and @@ -244,6 +246,16 @@ error codes described in section "CODES RETURNED BY THE LIBRARY" if the function call failed. +=head1 THE VAR_STRERROR FUNCTION + +In order to make life for application developers easier, the helper +function var_strerror() has been provided, which can be used to map +any of the error codes returned by the OSSP var library into a +clear-text message describing the reason for failure. Please note that +errors coming from the callback, such as VAR_ERR_CALLBACK and those +based on it, cannot be mapped and will yield the message "unknown +error". + =head1 COMBINING VAR_UNESCAPE AND VAR_EXPAND For maximum power and flexibility, you will want to use both routines