📄 _gdsl_list.3
字号:
.TH "Low-level doubly-linked list manipulation module" 3 "22 Jun 2006" "Version 1.4" "gdsl" \" -*- nroff -*-.ad l.nh.SH NAMELow-level doubly-linked list manipulation module \- .PP.SS "Typedefs".in +1c.ti -1c.RI "typedef \fB_gdsl_node_t\fP \fB_gdsl_list_t\fP".br.RI "\fIGDSL low-level doubly-linked list type. \fP".in -1c.SS "Functions".in +1c.ti -1c.RI "\fB_gdsl_list_t\fP \fB_gdsl_list_alloc\fP (const \fBgdsl_element_t\fP E)".br.RI "\fICreate a new low-level list. \fP".ti -1c.RI "void \fB_gdsl_list_free\fP (\fB_gdsl_list_t\fP L, const \fBgdsl_free_func_t\fP FREE_F)".br.RI "\fIDestroy a low-level list. \fP".ti -1c.RI "\fBbool\fP \fB_gdsl_list_is_empty\fP (const \fB_gdsl_list_t\fP L)".br.RI "\fICheck if a low-level list is empty. \fP".ti -1c.RI "\fBulong\fP \fB_gdsl_list_get_size\fP (const \fB_gdsl_list_t\fP L)".br.RI "\fIGet the size of a low-level list. \fP".ti -1c.RI "void \fB_gdsl_list_link\fP (\fB_gdsl_list_t\fP L1, \fB_gdsl_list_t\fP L2)".br.RI "\fILink two low-level lists together. \fP".ti -1c.RI "void \fB_gdsl_list_insert_after\fP (\fB_gdsl_list_t\fP L, \fB_gdsl_list_t\fP PREV)".br.RI "\fIInsert a low-level list after another one. \fP".ti -1c.RI "void \fB_gdsl_list_insert_before\fP (\fB_gdsl_list_t\fP L, \fB_gdsl_list_t\fP SUCC)".br.RI "\fIInsert a low-level list before another one. \fP".ti -1c.RI "void \fB_gdsl_list_remove\fP (\fB_gdsl_node_t\fP NODE)".br.RI "\fIRemove a node from a low-level list. \fP".ti -1c.RI "\fB_gdsl_list_t\fP \fB_gdsl_list_search\fP (\fB_gdsl_list_t\fP L, const \fBgdsl_compare_func_t\fP COMP_F, void *VALUE)".br.RI "\fISearch for a particular node in a low-level list. \fP".ti -1c.RI "\fB_gdsl_list_t\fP \fB_gdsl_list_map_forward\fP (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_map_func_t\fP MAP_F, void *USER_DATA)".br.RI "\fIParse a low-level list in forward order. \fP".ti -1c.RI "\fB_gdsl_list_t\fP \fB_gdsl_list_map_backward\fP (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_map_func_t\fP MAP_F, void *USER_DATA)".br.RI "\fIParse a low-level list in backward order. \fP".ti -1c.RI "void \fB_gdsl_list_write\fP (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_write_func_t\fP WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)".br.RI "\fIWrite all nodes of a low-level list to a file. \fP".ti -1c.RI "void \fB_gdsl_list_write_xml\fP (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_write_func_t\fP WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)".br.RI "\fIWrite all nodes of a low-level list to a file into XML. \fP".ti -1c.RI "void \fB_gdsl_list_dump\fP (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_write_func_t\fP WRITE_F, FILE *OUTPUT_FILE, void *USER_DATA)".br.RI "\fIDump the internal structure of a low-level list to a file. \fP".in -1c.SH "Typedef Documentation".PP .SS "typedef \fB_gdsl_node_t\fP \fB_gdsl_list_t\fP".PPGDSL low-level doubly-linked list type. .PPThis type is voluntary opaque. Variables of this kind could'nt be directly used, but by the functions of this module. .PPDefinition at line 54 of file _gdsl_list.h..SH "Function Documentation".PP .SS "\fB_gdsl_list_t\fP _gdsl_list_alloc (const \fBgdsl_element_t\fP E)".PPCreate a new low-level list. .PPAllocate a new low-level list data structure which have only one node. The node's content is set to E..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4nothing. .RE.PP\fBParameters:\fP.RS 4\fIE\fP The content of the first node of the new low-level list to create. .RE.PP\fBReturns:\fP.RS 4the newly allocated low-level list in case of success. .PPNULL in case of insufficient memory. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_free()\fP .RE.PP.SS "void _gdsl_list_free (\fB_gdsl_list_t\fP L, const \fBgdsl_free_func_t\fP FREE_F)".PPDestroy a low-level list. .PPFlush and destroy the low-level list L. If FREE_F != NULL, then the FREE_F function is used to deallocated each L's element. Otherwise, nothing is done with L's elements..PP\fBNote:\fP.RS 4Complexity: O( |L| ) .RE.PP\fBPrecondition:\fP.RS 4nothing. .RE.PP\fBParameters:\fP.RS 4\fIL\fP The low-level list to destroy. .br\fIFREE_F\fP The function used to deallocated L's nodes contents. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_alloc()\fP .RE.PP.SS "\fBbool\fP _gdsl_list_is_empty (const \fB_gdsl_list_t\fP L)".PPCheck if a low-level list is empty. .PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4nothing. .RE.PP\fBParameters:\fP.RS 4\fIL\fP The low-level list to check. .RE.PP\fBReturns:\fP.RS 4TRUE if the low-level list L is empty. .PPFALSE if the low-level list L is not empty. .RE.PP.SS "\fBulong\fP _gdsl_list_get_size (const \fB_gdsl_list_t\fP L)".PPGet the size of a low-level list. .PP\fBNote:\fP.RS 4Complexity: O( |L| ) .RE.PP\fBPrecondition:\fP.RS 4nothing. .RE.PP\fBParameters:\fP.RS 4\fIL\fP The low-level list to use. .RE.PP\fBReturns:\fP.RS 4the number of elements of L (noted |L|). .RE.PP.SS "void _gdsl_list_link (\fB_gdsl_list_t\fP L1, \fB_gdsl_list_t\fP L2)".PPLink two low-level lists together. .PPLink the low-level list L2 after the end of the low-level list L1. So L1 is before L2..PP\fBNote:\fP.RS 4Complexity: O( |L1| ) .RE.PP\fBPrecondition:\fP.RS 4L1 & L2 must be non-empty _gdsl_list_t. .RE.PP\fBParameters:\fP.RS 4\fIL1\fP The low-level list to link before L2. .br\fIL2\fP The low-level list to link after L1. .RE.PP.SS "void _gdsl_list_insert_after (\fB_gdsl_list_t\fP L, \fB_gdsl_list_t\fP PREV)".PPInsert a low-level list after another one. .PPInsert the low-level list L after the low-level list PREV..PP\fBNote:\fP.RS 4Complexity: O( |L| ) .RE.PP\fBPrecondition:\fP.RS 4L & PREV must be non-empty _gdsl_list_t. .RE.PP\fBParameters:\fP.RS 4\fIL\fP The low-level list to link after PREV. .br\fIPREV\fP The low-level list that will be linked before L. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_insert_before()\fP .PP\fB_gdsl_list_remove()\fP .RE.PP.SS "void _gdsl_list_insert_before (\fB_gdsl_list_t\fP L, \fB_gdsl_list_t\fP SUCC)".PPInsert a low-level list before another one. .PPInsert the low-level list L before the low-level list SUCC..PP\fBNote:\fP.RS 4Complexity: O( |L| ) .RE.PP\fBPrecondition:\fP.RS 4L & SUCC must be non-empty _gdsl_list_t. .RE.PP\fBParameters:\fP.RS 4\fIL\fP The low-level list to link before SUCC. .br\fISUCC\fP The low-level list that will be linked after L. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_insert_after()\fP .PP\fB_gdsl_list_remove()\fP .RE.PP.SS "void _gdsl_list_remove (\fB_gdsl_node_t\fP NODE)".PPRemove a node from a low-level list. .PPUnlink the node NODE from the low-level list in which it is inserted..PP\fBNote:\fP.RS 4Complexity: O( 1 ) .RE.PP\fBPrecondition:\fP.RS 4NODE must be a non-empty _gdsl_node_t. .RE.PP\fBParameters:\fP.RS 4\fINODE\fP The low-level node to unlink from the low-level list in which it's linked. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_insert_after()\fP .PP\fB_gdsl_list_insert_before()\fP .RE.PP.SS "\fB_gdsl_list_t\fP _gdsl_list_search (\fB_gdsl_list_t\fP L, const \fBgdsl_compare_func_t\fP COMP_F, void * VALUE)".PPSearch for a particular node in a low-level list. .PPResearch an element e in the low-level list L, by using COMP_F function to find the first element e equal to VALUE..PP\fBNote:\fP.RS 4Complexity: O( |L| ) .RE.PP\fBPrecondition:\fP.RS 4COMP_F != NULL .RE.PP\fBParameters:\fP.RS 4\fIL\fP The low-level list to use .br\fICOMP_F\fP The comparison function to use to compare L's elements with VALUE to find the element e .br\fIVALUE\fP The value that must be used by COMP_F to find the element e .RE.PP\fBReturns:\fP.RS 4the sub-list starting by e if it's found. .PPNULL if VALUE is not found in L. .RE.PP.SS "\fB_gdsl_list_t\fP _gdsl_list_map_forward (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_map_func_t\fP MAP_F, void * USER_DATA)".PPParse a low-level list in forward order. .PPParse all nodes of the low-level list L in forward order. The MAP_F function is called on each node with the USER_DATA argument. If MAP_F returns GDSL_MAP_STOP, then \fB_gdsl_list_map_forward()\fP stops and returns its last examinated node..PP\fBNote:\fP.RS 4Complexity: O( |L| ) .RE.PP\fBPrecondition:\fP.RS 4MAP_F != NULL. .RE.PP\fBParameters:\fP.RS 4\fIL\fP Th low-level list to map. .br\fIMAP_F\fP The map function. .br\fIUSER_DATA\fP User's datas. .RE.PP\fBReturns:\fP.RS 4the first node for which MAP_F returns GDSL_MAP_STOP. .PPNULL when the parsing is done. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_map_backward()\fP .RE.PP.SS "\fB_gdsl_list_t\fP _gdsl_list_map_backward (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_map_func_t\fP MAP_F, void * USER_DATA)".PPParse a low-level list in backward order. .PPParse all nodes of the low-level list L in backward order. The MAP_F function is called on each node with the USER_DATA argument. If MAP_F returns GDSL_MAP_STOP, then \fB_gdsl_list_map_backward()\fP stops and returns its last examinated node..PP\fBNote:\fP.RS 4Complexity: O( 2 |L| ) .RE.PP\fBPrecondition:\fP.RS 4L must be a non-empty _gdsl_list_t & MAP_F != NULL. .RE.PP\fBParameters:\fP.RS 4\fIL\fP Th low-level list to map. .br\fIMAP_F\fP The map function. .br\fIUSER_DATA\fP User's datas. .RE.PP\fBReturns:\fP.RS 4the first node for which MAP_F returns GDSL_MAP_STOP. .PPNULL when the parsing is done. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_map_forward()\fP .RE.PP.SS "void _gdsl_list_write (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_write_func_t\fP WRITE_F, FILE * OUTPUT_FILE, void * USER_DATA)".PPWrite all nodes of a low-level list to a file. .PPWrite the nodes of the low-level list L to OUTPUT_FILE, using WRITE_F function. Additionnal USER_DATA argument could be passed to WRITE_F..PP\fBNote:\fP.RS 4Complexity: O( |L| ) .RE.PP\fBPrecondition:\fP.RS 4WRITE_F != NULL & OUTPUT_FILE != NULL. .RE.PP\fBParameters:\fP.RS 4\fIL\fP The low-level list to write. .br\fIWRITE_F\fP The write function. .br\fIOUTPUT_FILE\fP The file where to write L's nodes. .br\fIUSER_DATA\fP User's datas passed to WRITE_F. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_write_xml()\fP .PP\fB_gdsl_list_dump()\fP .RE.PP.SS "void _gdsl_list_write_xml (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_write_func_t\fP WRITE_F, FILE * OUTPUT_FILE, void * USER_DATA)".PPWrite all nodes of a low-level list to a file into XML. .PPWrite the nodes of the low-level list L to OUTPUT_FILE, into XML language. If WRITE_F != NULL, then uses WRITE_F function to write L's nodes to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F..PP\fBNote:\fP.RS 4Complexity: O( |L| ) .RE.PP\fBPrecondition:\fP.RS 4OUTPUT_FILE != NULL. .RE.PP\fBParameters:\fP.RS 4\fIL\fP The low-level list to write. .br\fIWRITE_F\fP The write function. .br\fIOUTPUT_FILE\fP The file where to write L's nodes. .br\fIUSER_DATA\fP User's datas passed to WRITE_F. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_write()\fP .PP\fB_gdsl_list_dump()\fP .RE.PP.SS "void _gdsl_list_dump (const \fB_gdsl_list_t\fP L, const \fB_gdsl_node_write_func_t\fP WRITE_F, FILE * OUTPUT_FILE, void * USER_DATA)".PPDump the internal structure of a low-level list to a file. .PPDump the structure of the low-level list L to OUTPUT_FILE. If WRITE_F != NULL, then uses WRITE_F function to write L's nodes to OUTPUT_FILE. Additionnal USER_DATA argument could be passed to WRITE_F..PP\fBNote:\fP.RS 4Complexity: O( |L| ) .RE.PP\fBPrecondition:\fP.RS 4OUTPUT_FILE != NULL. .RE.PP\fBParameters:\fP.RS 4\fIL\fP The low-level list to dump. .br\fIWRITE_F\fP The write function. .br\fIOUTPUT_FILE\fP The file where to write L's nodes. .br\fIUSER_DATA\fP User's datas passed to WRITE_F. .RE.PP\fBSee also:\fP.RS 4\fB_gdsl_list_write()\fP .PP\fB_gdsl_list_write_xml()\fP .RE.PP
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -