aboutsummaryrefslogtreecommitdiffstats
path: root/info/libgamma.texinfo
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-28 06:17:08 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-28 06:20:23 +0200
commit5fdffde89ad7a24001b8aa49c243fbbcd6fedbbf (patch)
treed2dedd186cad15c3983ea3af33fbaacc6f58ba3c /info/libgamma.texinfo
parentnamespace some definitions (diff)
downloadlibgamma-5fdffde89ad7a24001b8aa49c243fbbcd6fedbbf.tar.gz
libgamma-5fdffde89ad7a24001b8aa49c243fbbcd6fedbbf.tar.bz2
libgamma-5fdffde89ad7a24001b8aa49c243fbbcd6fedbbf.tar.xz
info: errors
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'info/libgamma.texinfo')
-rw-r--r--info/libgamma.texinfo48
1 files changed, 48 insertions, 0 deletions
diff --git a/info/libgamma.texinfo b/info/libgamma.texinfo
index 1869145..2a7ea57 100644
--- a/info/libgamma.texinfo
+++ b/info/libgamma.texinfo
@@ -29,6 +29,9 @@ Texts. A copy of the license is included in the section entitled
@end quotation
@end copying
+£>set -u
+£>cd info
+
@ifnottex
@node Top
@top libgamma -- Display server abstraction layer for gamma ramp adjustments
@@ -382,6 +385,10 @@ and for the freedom of all.
@node API
@chapter API
+@menu
+* Errors:: Error codes and how to handle errors.
+@end menu
+
To use @command{libgamma} add ``@code{#include <libgamma.h>}''
to and C file or C header file that requires anything
from @command{libgamma}. @file{libgamma.h} is the only
@@ -446,6 +453,47 @@ You may also want to add checks for update to
+@node Errors
+@section Errors
+
+Many @command{libgamma} functions will return
+@command{libgamma} specific error codes rather
+than setting @code{errno} and return @code{-1}.
+However @code{errno} may have been set, but
+should in such case be ignored unless
+@code{LIBGAMMA_ERRNO_SET} has been returned.
+Other functions do set @code{errno} and return
+@code{-1}. Other functions may store the error
+code. In this case @code{LIBGAMMA_ERRNO_SET}
+cannot be stored but the value that @code{errno}
+had when an error occured can be stored instead
+of a @command{libgamma} specific error codes.
+@code{errno} values are allows positive whereas
+@command{libgamma} specific error codes are
+allows negative. On success zero is returned
+or stored.
+
+If @code{LIBGAMMA_DEVICE_REQUIRE_GROUP} is returned
+the ID of the required group is stored in
+@code{libgamma_group_gid} and the name of that
+group is stored in @code{libgamma_group_name}.
+@code{NULL} is stored if the name of the group
+cannto be determined. @file{libgamma.h} give
+you access to these variables, they are defined
+as @code{gid_t} and @code{const char*} types
+respectively.
+
+@command{libgamma} defines the following error codes
+that its functions may return:
+@table @code
+£>for err in $(libgamma-error-extract --list); do
+@item £{err}
+£>libgamma-error-extract $err | texise
+£>done
+@end table
+
+
+
@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include fdl.texinfo