aboutsummaryrefslogtreecommitdiffstats
path: root/man/el_cleanup.3
blob: 0eae13b323db7e0a122679d57b0f78d25612ec34 (plain)
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
.TH "el_cleanup" "3" "14 lutego 2019 (v0.3.3)" "bofc.pl"
.SH NAME
.PP
.B el_cleanup
- cleans all resources allocated by
.BR el_init (3)
and
.BR el_option (3)
calls.
.SH SYNOPSIS
.PP
.BI "#include <embedlog.h>"
.PP
.BI "int el_cleanup(void)"
.br
.BI "int el_ocleanup(struct el_options *" options ")"
.SH DESCRIPTION
.PP
.BR el_cleanup (3)
flushes all remaining buffers and frees any resources allocated through the
life of the library.
After clean up, library calls cannot be used without initialization.
.PP
.BR el_ocleanup (3)
works just the same, but accepts custom
.I options
as argument.
.SH RETURN VALUE
.PP
Functions return 0 upon successful cleanup or -1 on errors.
When -1 was returned no resources were freed, and library functions still can be
used.
.SH ERRORS
.PP
.BR el_cleanup (3)
function cannot fail.
.BR el_ocleanup (3)
may return:
.TP
.B EINVAL
Passed options object is not valid
.SH SEE ALSO
.PP
.BR el_init (3),
.BR el_overview (7),
.BR el_option (3),
.BR el_puts (3),
.BR el_print (3),
.BR el_vprint (3),
.BR el_perror (3),
.BR el_pmemory (3),
.BR el_ooption (3),
.BR el_oputs (3),
.BR el_oprint (3),
.BR el_ovprint (3),
.BR el_operror (3),
.BR el_opmemory (3),