aboutsummaryrefslogtreecommitdiffstats
path: root/man/el_cleanup.3
blob: a7bb31327a5e7474c3ee64b4c21b389d57df6465 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
.TH "el_cleanup" "3" "10 June 2019 (v9999)" "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 *" el ")"
.br
.BI "int el_destroy(struct el *" el ")"
.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 el
object as argument.
.PP
.BR el_destroy (3)
works just the same, but must be used when
.I el
object has been created with
.BR el_new (3)
function.
.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)
and
.BR el_destroy (3)
may return:
.TP
.B EINVAL
Passed el object is not valid
.SH SEE ALSO
.PP
.BR el_overview (7),
.BR el_flush (3),
.BR el_init (3),
.BR el_new (3),
.BR el_oflush (3),
.BR el_oinit (3),
.BR el_ooption (3),
.BR el_operror (3),
.BR el_opmemory (3),
.BR el_opmemory_table (3),
.BR el_oprint (3),
.BR el_option (3),
.BR el_oputs (3),
.BR el_ovprint (3),
.BR el_perror (3),
.BR el_pmemory (3),
.BR el_pmemory_table (3),
.BR el_print (3),
.BR el_puts (3),
.BR el_vprint (3).