aboutsummaryrefslogtreecommitdiffstats
path: root/doc/man/libcoopgamma_ramps_unmarshal.3
blob: 34393cf2310bd4aa62672a9e915e8eb60d41164c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.TH LIBCOOPGAMMA_RAMPS_UNMARSHAL 3 LIBCOOPGAMMA
.SH "NAME"
libcoopgamma_ramps_unmarshal - Unmarshal a member type of libcoopgamma_ramps_t
.SH "SYNOPSIS"
.nf
#include <libcoopgamma.h>

int libcoopgamma_ramps_unmarshal(void *restrict \fIthis\fP, void *restrict \fIbuffer\fP,
                                 size_t *restrict \fIn\fP);
.fi
.P
Link with
.IR -lcoopgamma .
.SH "DESCRIPTION"
The
.BR libcoopgamma_ramps_unmarshal ()
function unmarshals
.I this
from a
.I buffer .
The number of read bytes from
.I buffer
is stored in
.I *n
on success.
.P
.I this
must be of any of the following types, and not casted
to any other type such as
.I void*
or
.IR libcoopgamma_ramps_t:
.IR libcoopgamma_ramps8_t ,
.IR libcoopgamma_ramps16_t ,
.IR libcoopgamma_ramps32_t ,
.IR libcoopgamma_ramps64_t ,
.IR libcoopgamma_rampsf_t ,
or
.IR libcoopgamma_rampsd_t .
.P
None if the parameters may be
.IR NULL .
.I this
does not have to be initialised.
.P
On failure,
.I this
should be deinitialised using
.BR libcoopgamma_ramps_destroy (3).
.P
Undefined behaviour is invoked if the
beginning of
.I buffer
does not contain data stored by
.BR libcoopgamma_ramps_marshal (3).
.SH "RETURN VALUES"
The
.BR libcoopgamma_ramps_unmarshal ()
function returns one of the following
values:
.TP
.IR LIBCOOPGAMMA_SUCCESS " (= 0)"
The function was successful.
.TP
.IR LIBCOOPGAMMA_INCOMPATIBLE_DOWNGRADE " (> 0)"
The data in
.I buffer
was stored by an earlier version of
.BR libcoopgamma (7)
that is no longer supported.
.TP
.IR LIBCOOPGAMMA_INCOMPATIBLE_UPGRADE " (> 0)"
The data in
.I buffer
was stored by a newer version of
.BR libcoopgamma (7)
that stores the data in an incompatible format.
.TP
.IR LIBCOOPGAMMA_ERRNO_SET "(= -1)"
An other error was encountered.
.I errno
has been set appropriately.
.SH "ERROR"
The
.BR libcoopgamma_ramps_marshal ()
function may fail, and returned
.I LIBCOOPGAMMA_ERRNO_SET
for any reason specified for
.BR malloc (3).
.SH "SEE ALSO"
.BR libcoopgamma_ramps_destroy (3),
.BR libcoopgamma_ramps_marshal (3),
.BR libcoopgamma_filter_unmarshal (3),
.BR libcoopgamma_crtc_info_unmarshal (3),
.BR libcoopgamma_filter_query_unmarshal (3),
.BR libcoopgamma_queried_filter_unmarshal (3),
.BR libcoopgamma_filter_table_unmarshal (3),
.BR libcoopgamma_error_unmarshal (3),
.BR libcoopgamma_context_unmarshal (3),
.BR libcoopgamma_async_context_unmarshal (3)