Changes below:
- Code style fix in usrtc header file - Added autotools stuff for manpages - Added manpage for usrtc_init block: - usrtc_init() - usrtc_create() - usrtc_destroy()master
parent
70072351a2
commit
dfc1b90513
@ -0,0 +1,2 @@
|
||||
man_MANS = usrtc_init.3 usrtc_create.3 usrtc_destroy.3
|
||||
|
@ -0,0 +1,24 @@
|
||||
.TH @F_BLOCK@ 3 "@DoM@ @MONTH@ @YEAR@" "LIBTDATA" "Portable data structures C library manual"
|
||||
.SH NAME
|
||||
.br
|
||||
.SH SYNOPSYS
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
.br
|
||||
.SH BUGS
|
||||
.br
|
||||
.SH EXAMPLE
|
||||
.br
|
||||
.SH RATIONALE
|
||||
.br
|
||||
.SH SEE ALSO
|
||||
.br
|
||||
.SH COPYRIGHT
|
||||
This software licensed under GNU LGPL v2.1 or later. See COPYING for further details.
|
||||
.br
|
||||
(c) Authors of libtdata. See AUTHORS for further details.
|
||||
.SH AUTHOR
|
||||
@GIT_NAME@ (@GIT_EMAIL@)
|
||||
.br
|
@ -0,0 +1 @@
|
||||
usrtc_init.3
|
@ -0,0 +1 @@
|
||||
usrtc_init.3
|
@ -0,0 +1,87 @@
|
||||
.TH USRTC_INIT 3 "21 May 2019" "LIBTDATA" "Portable data structures C library manual"
|
||||
.SH NAME
|
||||
usrtc_init \- Initialize usrtc core structure
|
||||
.br
|
||||
usrtc_create \- Allocate and initialize usrtc core structure
|
||||
.br
|
||||
usrtc_destroy \- Destroy (free) usrtc core structure
|
||||
.br
|
||||
.SH SYNOPSYS
|
||||
.B #include <tdata/usrtc.h>
|
||||
.sp
|
||||
void usrtc_init(usrtc_t *us, int impl, usrtc_count_t maxcount, usrtc_compare_t compare);
|
||||
|
||||
usrtc_t *usrtc_create(int impl, usrtc_count_t maxcount, usrtc_compare_t compare);
|
||||
|
||||
void usrtc_destroy(usrtc_t *us);
|
||||
|
||||
typedef long (*usrtc_compare_t)(const void*, const void*);
|
||||
|
||||
.br
|
||||
.sp
|
||||
.SH DESCRIPTION
|
||||
.B usrtc_init
|
||||
and
|
||||
.B usrtc_create
|
||||
are used to initialize a new usrtc core structure. The difference is
|
||||
.B usrtc_create
|
||||
will allocate
|
||||
.B usrtc_t
|
||||
structure via
|
||||
.B malloc()
|
||||
function, but
|
||||
.B usrtc_init
|
||||
expect already allocated structure. Argument
|
||||
.B impl
|
||||
is used to point the type of search data structure used for this particular usrtc core structure. Possible values are:
|
||||
.br
|
||||
.B * USRTC_LIST:
|
||||
Linked list
|
||||
.br
|
||||
.B * USRTC_BST:
|
||||
Binary search tree
|
||||
.br
|
||||
.B * USRTC_REDBLACK:
|
||||
Redblack tree
|
||||
.br
|
||||
.B * USRTC_SPLAY:
|
||||
Splay tree
|
||||
.br
|
||||
.B * USRTC_AVL:
|
||||
AVL tree
|
||||
.br
|
||||
.B maxcount
|
||||
argument is pointing to a max amount of the nodes within a search data structure.
|
||||
.B compare
|
||||
is a pointer to a compare function.
|
||||
.br
|
||||
.B usrtc_destroy
|
||||
is used to destroy (free) usrtc core structure. This function must be used only for structures allocated via
|
||||
.B usrtc_create
|
||||
function.
|
||||
.br
|
||||
.SH RETURN VALUE
|
||||
Valid pointer to a newly allocated and initialized core structure, otherwise
|
||||
.B NULL.
|
||||
.br
|
||||
.SH BUGS
|
||||
Not known yet.
|
||||
.br
|
||||
.SH EXAMPLE
|
||||
.br
|
||||
.SH RATIONALE
|
||||
Using functions
|
||||
.B usrtc_create
|
||||
and
|
||||
.B usrtc_destroy
|
||||
is deprecating.
|
||||
.br
|
||||
.SH SEE ALSO
|
||||
.br
|
||||
.SH COPYRIGHT
|
||||
This software licensed under GNU LGPL v2.1 or later. See COPYING for further details.
|
||||
.br
|
||||
(c) Authors of libtdata. See AUTHORS for further details.
|
||||
.SH AUTHOR
|
||||
Alexander Vdolainen (alex@vapaa.xyz)
|
||||
.br
|
Loading…
Reference in New Issue