diff options
author | Mattias Andrée <maandree@kth.se> | 2017-06-10 12:09:10 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2017-06-10 12:09:10 +0200 |
commit | 232b5f8635b8b9960c92e7d65c8d6b409e50f6e3 (patch) | |
tree | 3842b42a2092855b61b9e54cdc855c52fe582c41 /libcolour_proper.3 | |
parent | m (diff) | |
download | libcolour-232b5f8635b8b9960c92e7d65c8d6b409e50f6e3.tar.gz libcolour-232b5f8635b8b9960c92e7d65c8d6b409e50f6e3.tar.bz2 libcolour-232b5f8635b8b9960c92e7d65c8d6b409e50f6e3.tar.xz |
Add libcolour_proper.3
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'libcolour_proper.3')
-rw-r--r-- | libcolour_proper.3 | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/libcolour_proper.3 b/libcolour_proper.3 new file mode 100644 index 0000000..e93d866 --- /dev/null +++ b/libcolour_proper.3 @@ -0,0 +1,47 @@ +.TH LIBCOLOUR_PROPER 3 libcolour +.SH NAME +libcolour_proper - Set any member that is set incorrectly +.SH SYNOPSIS +.nf +#include <libcolour.h> + +int \fBlibcolour_proper_f\fP(libcolour_colour_f_t *\fIcolour\fP); +int \fBlibcolour_proper_lf\fP(libcolour_colour_lf_t *\fIcolour\fP); +int \fBlibcolour_proper_llf\fP(libcolour_colour_llf_t *\fIcolour\fP); + +#define \fBlibcolour_proper\fP(\fIcolour\fP)\\ + (_Generic((\fIcolour\fP),\\ + libcolour_colour_f_t *: \fBlibcolour_proper_f\fP(\fIcolour\fP),\\ + libcolour_colour_lf_t *: \fBlibcolour_proper_lf\fP(\fIcolour\fP),\\ + libcolour_colour_llf_t *: \fBlibcolour_proper_llf\fP(\fIcolour\fP))) + /* list is incomplete */ +.fi +.SH DESCRIPTION +.B libcolour_proper +and its non-generic functions sets any member or +submember of +.I colour +that is set incorrectly. When calling the macro +.B libcolour_proper +(but not the non-generic function), +.I colour.model +is set to the correct value if the type +.I colour +is one of the colour +.IR struct s +and not on the the +.IR union s. +.SH RETURN VALUES +Upon successful completion, the functions returns 0. +Otherwise the function return -1 with +.I errno +set to indicate the error. +.SH ERRORS +.TP +.B EDOM +The function tried to invert an non-invertable matrix. +.SH SEE ALSO +.BR libcolour (7) +.SH AUTHORS +Mattias Andrée +.RI < maandree@kth.se > |