From 4f915149264b4bc188266b9a2c3e737353338403 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 31 May 2014 06:24:44 +0200 Subject: info: doc libgamma_perror MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- info/libgamma.texinfo | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'info') diff --git a/info/libgamma.texinfo b/info/libgamma.texinfo index 78643ee..98c4ca7 100644 --- a/info/libgamma.texinfo +++ b/info/libgamma.texinfo @@ -606,6 +606,19 @@ error. @code{libgamma_value_of_error} will return zero if the input is @code{NULL} or string that is not the name of a @command{libgamma} error. +The function @code{libgamma_perror} can be used to +print an error to stderr in a @code{perror} fashion. +However @code{libgamma_perror} will not translate the +@command{libgamma} errors into human-readable strings, +it will simply print the name of the error. +@code{libgamma_perror} takes two arguments: +a @code{const char*} that work like the parameter for +@code{perror}, and an @code{int} with the error code. +If the error code is the value of @code{LIBGAMMA_ERRNO_SET} +@code{perror} will be used to print the current error +stored in @code{errno}. If the error code is non-negative +(an @code{errno} value`), that value will be stored in +@code{errno} and @code{perror} will be used to print it. @node GNU Free Documentation License -- cgit v1.2.3-70-g09d2