From: Mike D. Lowis Date: Fri, 23 Mar 2012 15:13:20 +0000 (-0400) Subject: Updated doxygen docs X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=fd2b63d1b6f05436f8806424ace05c9252c4df54;p=projs%2Flibcds.git Updated doxygen docs --- diff --git a/docs/doxygen/html/annotated.html b/docs/doxygen/html/annotated.html index 7d67859..68515bd 100644 --- a/docs/doxygen/html/annotated.html +++ b/docs/doxygen/html/annotated.html @@ -83,14 +83,17 @@ var searchBox = new SearchBox("searchBox", "search",false,'Search');
Here are the classes, structs, unions and interfaces with brief descriptions:
+ + + - +
bt_nodeA binary tree node
bt_treeA binary tree
ht_nodeA node in a hash table
ht_tableA hash table
nodeA node in a hash table
sll_nodeA linked list node
-Go to the documentation of this file.
+Go to the documentation of this file.
00001 /******************************************************************************
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 
+
-Go to the documentation of this file.
+Go to the documentation of this file.
00001 /******************************************************************************
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 
+
-Go to the documentation of this file.
+Go to the documentation of this file.
00001 /******************************************************************************
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 #include "bt.h"
+00028 
+00029 bt_tree* bt_new(bt_compare_func compare)
+00030 {
+00031 
+00032 }
+00033 
+00034 void bt_free(bt_tree* tree, int free_contents)
+00035 {
+00036 
+00037 }
+00038 
+00039 int bt_compare_ptr(void* obj1, void* obj2)
+00040 {
+00041 
+00042 }
+00043 
+00044 void bt_insert(bt_tree* tree, void* data)
+00045 {
+00046 
+00047 }
+00048 
+00049 void bt_delete(bt_tree* tree, void* data)
+00050 {
+00051 
+00052 }
+00053 
+00054 void* bt_find(bt_tree* tree, void* data)
+00055 {
+00056 
+00057 }
+00058 
+
-Go to the documentation of this file.
+Go to the documentation of this file.
00001 /******************************************************************************
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 #ifndef BT_H
+00028 #define BT_H
+00029 
+00031 typedef int (* bt_compare_func) (void*,void*);
+00032 
+00034 typedef struct bt_node
+00035 {
+00037     void* contents;
+00039     struct bt_node* left;
+00041     struct bt_node* right;
+00042 } bt_node;
+00043 
+00045 typedef struct bt_tree
+00046 {
+00048     bt_node* root;
+00050     bt_compare_func compare;
+00051 } bt_tree;
+00052 
+00064 bt_tree* bt_new(bt_compare_func compare);
+00065 
+00076 void bt_free(bt_tree* tree, int free_contents);
+00077 
+00091 int bt_compare_ptr(void* obj1, void* obj2);
+00092 
+00105 void bt_insert(bt_tree* tree, void* data);
+00106 
+00119 void bt_delete(bt_tree* tree, void* data, int free_contents);
+00120 
+00134 void* bt_find(bt_tree* tree, void* data);
+00135 
+00136 #endif
+
-
H | N
+
B | H | S
-
  H  
-
ht_table   
  N  
-
node   
H | N
+
  B  
+bt_tree   ht_node   
  S  
+sll_node   bt_node   
  H  
+ht_table   
B | H | S
-Go to the documentation of this file.
+Go to the documentation of this file.
00001 /******************************************************************************
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 
+
-Go to the documentation of this file.
+Go to the documentation of this file.
00001 /******************************************************************************
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 
+
@@ -249,6 +251,8 @@ Functions +

Definition at line 55 of file ht.c.

+ @@ -286,6 +290,8 @@ Functions
Returns:
A pointer to the value associated with the provided key.
+

Definition at line 108 of file ht.c.

+ @@ -312,7 +318,7 @@ Functions
Returns:
The hashed value of the key.
-

Definition at line 22 of file ht.c.

+

Definition at line 32 of file ht.c.

Here is the caller graph for this function:
@@ -360,7 +366,7 @@ Here is the caller graph for this function:
Returns:
The newly created table.
-

Definition at line 34 of file ht.c.

+

Definition at line 44 of file ht.c.

Here is the call graph for this function:
@@ -414,7 +420,7 @@ Here is the call graph for this function: -

Definition at line 63 of file ht.c.

+

Definition at line 73 of file ht.c.

@@ -453,7 +459,7 @@ Here is the call graph for this function:
Returns:
A pointer to the resized table.
-

Definition at line 121 of file ht.c.

+

Definition at line 130 of file ht.c.

@@ -462,7 +468,7 @@ Here is the call graph for this function:
Go to the documentation of this file.
00001 /******************************************************************************
-00002  *  Copyright (C) 2011 Michael D. Lowis
-00003  *
-00004  *  This program is free software: you can redistribute it and/or modify
-00005  *  it under the terms of the GNU General Public License as published by
-00006  *  the Free Software Foundation, either version 3 of the License, or
-00007  *  (at your option) any later version.
-00008  *
-00009  *  This program is distributed in the hope that it will be useful,
-00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
-00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-00012  *  GNU General Public License for more details.
-00013  *
-00014  *  You should have received a copy of the GNU General Public License
-00015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-00016  *****************************************************************************/
-00017 #ifndef HASHTABLE_H
-00018 #define HASHTABLE_H
-00019 
-00021 typedef unsigned int (*ht_hash_func) (void*);
-00022 
-00024 typedef struct node
-00025 {
-00027     void* key;
-00029     void* val;
-00031     struct node* next;
-00032 } ht_node;
-00033 
-00035 typedef struct
-00036 {
-00038     unsigned int size;
-00040     ht_node** table;
-00042     ht_hash_func hash_func;
-00043 } ht_table;
-00044 
-00052 unsigned int ht_hash_string(void* key);
-00053 
-00063 ht_table* ht_new(unsigned int size, ht_hash_func fn);
-00064 
-00072 void ht_free(ht_table* table, int free_key, int free_value);
-00073 
-00081 void ht_put(ht_table* table, void* key, void* val);
-00082 
-00091 void* ht_get(ht_table* table, void* key);
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 #ifndef HT_H
+00028 #define HT_H
+00029 
+00031 typedef unsigned int (*ht_hash_func) (void*);
+00032 
+00034 typedef struct ht_node
+00035 {
+00037     void* key;
+00039     void* val;
+00041     struct node* next;
+00042 } ht_node;
+00043 
+00045 typedef struct
+00046 {
+00048     unsigned int size;
+00050     ht_node** table;
+00052     ht_hash_func hash_func;
+00053 } ht_table;
+00054 
+00062 unsigned int ht_hash_string(void* key);
+00063 
+00073 ht_table* ht_new(unsigned int size, ht_hash_func fn);
+00074 
+00082 void ht_free(ht_table* table, int free_key, int free_value);
+00083 
+00091 void ht_put(ht_table* table, void* key, void* val);
 00092 
-00101 void ht_delete(ht_table* table, void* key, int free_key, int free_value);
+00101 void* ht_get(ht_table* table, void* key);
 00102 
-00111 ht_table* ht_resize(ht_table* table, unsigned int size);
+00111 void ht_delete(ht_table* table, void* key, int free_key, int free_value);
 00112 
-00113 #endif
+00121 ht_table* ht_resize(ht_table* table, unsigned int size);
+00122 
+00123 #endif
 
-Go to the documentation of this file.
+Go to the documentation of this file.
00001 /******************************************************************************
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 
+
-Go to the documentation of this file.
+Go to the documentation of this file.
00001 /******************************************************************************
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 
+
+
+
+ bt_compare_func + bt.h +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
Searching...
No Matches
+ + + diff --git a/docs/doxygen/html/search/all_6e.html b/docs/doxygen/html/search/all_6e.html index dd80721..ec17e51 100644 --- a/docs/doxygen/html/search/all_6e.html +++ b/docs/doxygen/html/search/all_6e.html @@ -9,13 +9,11 @@
Loading...
- next - node -
-
-
-
Searching...
diff --git a/docs/doxygen/html/search/all_72.html b/docs/doxygen/html/search/all_72.html index 40dfec1..6a5f899 100644 --- a/docs/doxygen/html/search/all_72.html +++ b/docs/doxygen/html/search/all_72.html @@ -17,6 +17,18 @@ rbt.h +
+
+ right + bt_node +
+
+
+
+ root + bt_tree +
+
Searching...
No Matches
+ + + diff --git a/docs/doxygen/html/search/classes_68.html b/docs/doxygen/html/search/classes_68.html index f5cafb0..58e6efa 100644 --- a/docs/doxygen/html/search/classes_68.html +++ b/docs/doxygen/html/search/classes_68.html @@ -7,9 +7,14 @@
Loading...
+
+
+ ht_node +
+
Searching...
diff --git a/docs/doxygen/html/search/classes_73.html b/docs/doxygen/html/search/classes_73.html new file mode 100644 index 0000000..07e2696 --- /dev/null +++ b/docs/doxygen/html/search/classes_73.html @@ -0,0 +1,25 @@ + + + + + + + +
+
Loading...
+
+
+ sll_node +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/docs/doxygen/html/search/functions_62.html b/docs/doxygen/html/search/functions_62.html new file mode 100644 index 0000000..7e92e6c --- /dev/null +++ b/docs/doxygen/html/search/functions_62.html @@ -0,0 +1,74 @@ + + + + + + + + + + diff --git a/docs/doxygen/html/search/functions_68.html b/docs/doxygen/html/search/functions_68.html index 5437f4e..819cf90 100644 --- a/docs/doxygen/html/search/functions_68.html +++ b/docs/doxygen/html/search/functions_68.html @@ -11,8 +11,8 @@
@@ -20,8 +20,8 @@
ht_free
@@ -29,8 +29,8 @@
ht_get
@@ -56,7 +56,7 @@
ht_put
@@ -65,7 +65,7 @@
ht_resize
diff --git a/docs/doxygen/html/search/functions_73.html b/docs/doxygen/html/search/functions_73.html index 1a38215..be09f29 100644 --- a/docs/doxygen/html/search/functions_73.html +++ b/docs/doxygen/html/search/functions_73.html @@ -7,12 +7,12 @@
Loading...
-
-
+ -
+
+ +
+
+ +
+
+ +
+
+ +
Searching...
No Matches
+ + + diff --git a/docs/doxygen/html/search/typedefs_68.html b/docs/doxygen/html/search/typedefs_68.html index 1a306b4..b38a89f 100644 --- a/docs/doxygen/html/search/typedefs_68.html +++ b/docs/doxygen/html/search/typedefs_68.html @@ -15,7 +15,7 @@
- ht_node + ht_node ht.h
diff --git a/docs/doxygen/html/search/typedefs_73.html b/docs/doxygen/html/search/typedefs_73.html index 3a0b8db..9884e2e 100644 --- a/docs/doxygen/html/search/typedefs_73.html +++ b/docs/doxygen/html/search/typedefs_73.html @@ -9,7 +9,7 @@
Loading...
- sll_node + sll_node sll.h
diff --git a/docs/doxygen/html/search/variables_63.html b/docs/doxygen/html/search/variables_63.html index b1b11f6..b032bf2 100644 --- a/docs/doxygen/html/search/variables_63.html +++ b/docs/doxygen/html/search/variables_63.html @@ -7,10 +7,19 @@
Loading...
+
+
+ compare + bt_tree +
+
Searching...
diff --git a/docs/doxygen/html/search/variables_6b.html b/docs/doxygen/html/search/variables_6b.html index 7abfe07..df8f87b 100644 --- a/docs/doxygen/html/search/variables_6b.html +++ b/docs/doxygen/html/search/variables_6b.html @@ -9,8 +9,8 @@
Loading...
- key - node + key + ht_node
Searching...
diff --git a/docs/doxygen/html/search/variables_6c.html b/docs/doxygen/html/search/variables_6c.html new file mode 100644 index 0000000..cd6897b --- /dev/null +++ b/docs/doxygen/html/search/variables_6c.html @@ -0,0 +1,26 @@ + + + + + + + +
+
Loading...
+
+
+ left + bt_node +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/docs/doxygen/html/search/variables_6e.html b/docs/doxygen/html/search/variables_6e.html index fb0f8d8..ec17e51 100644 --- a/docs/doxygen/html/search/variables_6e.html +++ b/docs/doxygen/html/search/variables_6e.html @@ -9,8 +9,11 @@
Loading...
Searching...
diff --git a/docs/doxygen/html/search/variables_72.html b/docs/doxygen/html/search/variables_72.html new file mode 100644 index 0000000..a48d749 --- /dev/null +++ b/docs/doxygen/html/search/variables_72.html @@ -0,0 +1,32 @@ + + + + + + + +
+
Loading...
+
+
+ right + bt_node +
+
+
+
+ root + bt_tree +
+
+
Searching...
+
No Matches
+ +
+ + diff --git a/docs/doxygen/html/search/variables_76.html b/docs/doxygen/html/search/variables_76.html index c85b40a..638e224 100644 --- a/docs/doxygen/html/search/variables_76.html +++ b/docs/doxygen/html/search/variables_76.html @@ -9,8 +9,8 @@
Loading...
- val - node + val + ht_node
Searching...
diff --git a/docs/doxygen/html/sll_8c.html b/docs/doxygen/html/sll_8c.html index f850ba8..92d332c 100644 --- a/docs/doxygen/html/sll_8c.html +++ b/docs/doxygen/html/sll_8c.html @@ -97,67 +97,64 @@ Include dependency graph for sll.c:
- + - - - - - - - + + + + + + + + + + + + + + + - + - + - +

Functions

sll_nodesll_new (void *contents)
sll_nodesll_new (void *contents)
 Creates a new linked list node with the supplied value.
sll_nodesll_last (sll_node *list)
 Finds and returns the last node in the supplied linked list.
sll_nodesll_get (sll_node *list, int index)
 Return the node at the specified index in a linked list.
sll_nodesll_add (sll_node *list, void *contents)
 Adds a new node to an existing linked list.
sll_nodesll_insert (sll_node *list, int index, void *contents)
sll_nodesll_front (sll_node *list)
 Finds and returns the first node in the supplied linked list.
sll_nodesll_back (sll_node *list)
 Finds and returns the last node in the supplied linked list.
sll_nodesll_index (sll_node *list, int index)
 Return the node at the specified index in a linked list.
sll_nodesll_push_back (sll_node *list, void *contents)
 Adds a new node to the end of an existing linked list.
sll_nodesll_push_front (sll_node *list, void *contents)
 Adds a new node to the front of an existing linked list.
sll_nodesll_pop_back (sll_node *list)
 Removes and returns a pointer to the last element of the list.
sll_nodesll_pop_front (sll_node *list)
 Removes and returns a pointer to the first element of the list.
sll_nodesll_insert (sll_node *list, int index, void *contents)
 Inserts a new node in a linked list at the specified index.
sll_nodesll_delete (sll_node *list, int index, int free_contents)
sll_nodesll_delete (sll_node *list, int index, int free_contents)
 Deletes a node from the supplied list.
void sll_free (sll_node *list, int free_contents)
void sll_free (sll_node *list, int free_contents)
 Frees all memory used by a linked list.
unsigned int sll_length (sll_node *list)
unsigned int sll_length (sll_node *list)
 Returns the number of elements in the list.

Function Documentation

- +
- + - - - - - - - - - - + + - -
sll_node* sll_add sll_node* sll_back (sll_nodelist,
void * contents 
sll_nodelist) )
-

Adds a new node to an existing linked list.

+

Finds and returns the last node in the supplied linked list.

Parameters:
- - +
list
contents
listThe linked list to search.
-
Returns:
Pointer to the newly added node.
+
Returns:
Pointer to the last node in the supplied list.
-

Definition at line 59 of file sll.c.

+

Definition at line 42 of file sll.c.

-Here is the call graph for this function:
+Here is the caller graph for this function:
-
- - +
+ +

@@ -168,9 +165,9 @@ Here is the call graph for this function:
- + - + @@ -206,14 +203,14 @@ Here is the call graph for this function:
Returns:
Pointer to the node that is now at the supplied index.
-

Definition at line 79 of file sll.c.

+

Definition at line 102 of file sll.c.

Here is the call graph for this function:
- +

@@ -226,7 +223,7 @@ Here is the call graph for this function: - + @@ -254,18 +251,46 @@ Here is the call graph for this function: -

Definition at line 96 of file sll.c.

+

Definition at line 119 of file sll.c.

+ + + + +
+
+
sll_node* sll_delete sll_node* sll_delete (sll_nodesll_node list,
void sll_free (sll_nodesll_node list,
+ + + + + + + +
sll_node* sll_front (sll_nodelist)
+
+
+ +

Finds and returns the first node in the supplied linked list.

+
Parameters:
+ + +
listThe linked list to search.
+
+
+
Returns:
Pointer to the last node in the supplied list.
+ +

Definition at line 38 of file sll.c.

- +
- + - + @@ -294,14 +319,14 @@ Here is the call graph for this function:
Returns:
A pointer to the node and the supplied index, NULL if out of range.
-

Definition at line 41 of file sll.c.

+

Definition at line 52 of file sll.c.

Here is the caller graph for this function:
-
- - +
+ +

@@ -312,9 +337,9 @@ Here is the caller graph for this function:
sll_node* sll_get sll_node* sll_index (sll_nodesll_node list,
- + - + @@ -349,27 +374,27 @@ Here is the caller graph for this function:
Returns:
Pointer to the newly inserted node, NULL if index is out of range.
-

Definition at line 65 of file sll.c.

+

Definition at line 88 of file sll.c.

Here is the call graph for this function:
- +

- +
sll_node* sll_insert sll_node* sll_insert (sll_nodesll_node list,
- + - + @@ -377,36 +402,66 @@ Here is the call graph for this function:
-

Finds and returns the last node in the supplied linked list.

+

Returns the number of elements in the list.

+

Loops through the supplied list and returns a count of the number of elements contained in the list.

Parameters:
sll_node* sll_last unsigned int sll_length (sll_nodesll_node list)
- +
listThe linked list to search.
listThe list to be counted.
-
Returns:
Pointer to the last node in the supplied list.
+
Returns:
The number of elements in the list.
+ +

Definition at line 134 of file sll.c.

+ +
+
+ +
+
+ + + + + + + + +
sll_node* sll_new (void * contents)
+
+
-

Definition at line 31 of file sll.c.

+

Creates a new linked list node with the supplied value.

+

This function allocates a new node on the heap and populates the node contents with the supplied contents pointer.

+
Parameters:
+ + +
contentsThe contents of the newly created node.
+
+
+
Returns:
A pointer to the newly created node.
+ +

Definition at line 30 of file sll.c.

Here is the caller graph for this function:
-
- - +
+ +

- +
- + - + @@ -414,56 +469,134 @@ Here is the caller graph for this function:
-

Returns the number of elements in the list.

-

Loops through the supplied list and returns a count of the number of elements contained in the list.

+

Removes and returns a pointer to the last element of the list.

Parameters:
unsigned int sll_length sll_node* sll_pop_back (sll_nodesll_node list)
- + +
listThe list to be counted.
list
contents
-
Returns:
The number of elements in the list.
+
Returns:
Pointer to the newly added node.
-

Definition at line 111 of file sll.c.

+

Definition at line 80 of file sll.c.

- + +
+
+ + + + + + + + +
sll_node* sll_pop_front (sll_nodelist)
+
+
+ +

Removes and returns a pointer to the first element of the list.

+
Parameters:
+ + + +
list
contents
+
+
+
Returns:
Pointer to the newly added node.
+ +

Definition at line 84 of file sll.c.

+ +
+
+
- + + + + + + + - + + + + +
sll_node* sll_new sll_node* sll_push_back (sll_nodelist,
void * contents)contents 
)
-

Creates a new linked list node with the supplied value.

-

Allocates a new node on the heap and populates the node contents with the supplied contents pointer.

+

Adds a new node to the end of an existing linked list.

Parameters:
- + +
contentsThe contents of the newly created node.
list
contents
-
Returns:
A pointer to the newly created node.
+
Returns:
Pointer to the newly added node.
-

Definition at line 23 of file sll.c.

+

Definition at line 70 of file sll.c.

-Here is the caller graph for this function:
+Here is the call graph for this function:
-
- - +
+ +

+
+ + +
+
+ + + + + + + + + + + + + + + + + + +
sll_node* sll_push_front (sll_nodelist,
void * contents 
)
+
+
+ +

Adds a new node to the front of an existing linked list.

+
Parameters:
+ + + +
list
contents
+
+
+
Returns:
Pointer to the newly added node.
+ +

Definition at line 76 of file sll.c.

+
@@ -471,7 +604,7 @@ Here is the caller graph for this function:
Go to the documentation of this file.
00001 /******************************************************************************
-00002  *  Copyright (C) 2011  Michael D. Lowis
-00003  *
-00004  *  This program is free software: you can redistribute it and/or modify
-00005  *  it under the terms of the GNU General Public License as published by
-00006  *  the Free Software Foundation, either version 3 of the License, or
-00007  *  (at your option) any later version.
-00008  *
-00009  *  This program is distributed in the hope that it will be useful,
-00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
-00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-00012  *  GNU General Public License for more details.
-00013  *
-00014  *  You should have received a copy of the GNU General Public License
-00015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-00016  *****************************************************************************/
-00017 #include "sll.h"
-00018 #include <stdlib.h>
-00019 
-00020 /******************************************************************************
-00021  * Public Functions
-00022  ******************************************************************************/
-00023 sll_node* sll_new( void* contents )
-00024 {
-00025     sll_node* list = (sll_node*)malloc( sizeof(sll_node) );
-00026     list->contents = contents;
-00027     list->next = NULL;
-00028     return list;
-00029 }
-00030 
-00031 sll_node* sll_last( sll_node* list )
-00032 {
-00033     sll_node* node = list;
-00034     while((node != NULL) && (node->next != NULL))
-00035     {
-00036         node = node->next;
-00037     }
-00038     return node;
-00039 }
-00040 
-00041 sll_node* sll_get( sll_node* list, int index )
-00042 {
-00043     int current = 0;
-00044     sll_node* node = list;
-00045     sll_node* indexed_node = NULL;
-00046     while ((node != NULL))
-00047     {
-00048         if ( current == index )
-00049         {
-00050             indexed_node = node;
-00051             break;
-00052         }
-00053         node = node->next;
-00054         current++;
-00055     }
-00056     return indexed_node;
-00057 }
-00058 
-00059 sll_node* sll_add( sll_node* list, void* contents )
-00060 {
-00061     sll_node* node = sll_last( list );
-00062     node->next = sll_new( contents );
-00063 }
-00064 
-00065 sll_node* sll_insert( sll_node* list, int index, void* contents )
-00066 {
-00067     int req_index = ((index-1) < 0) ? 0 : index-1;
-00068     sll_node* node = sll_get( list, req_index );
-00069     if(node != NULL)
-00070     {
-00071         sll_node* next_next = node->next;
-00072         node->next = sll_new( contents );
-00073         node->next->next = next_next;
-00074         node = node->next;
-00075     }
-00076     return node;
-00077 }
-00078 
-00079 sll_node* sll_delete( sll_node* list, int index, int free_contents)
-00080 {
-00081     sll_node* node = sll_get( list, (index-1));
-00082     if((node != NULL) && (node->next != NULL))
-00083     {
-00084         sll_node* node_to_delete = node->next;
-00085         node->next = node_to_delete->next;
-00086         if (free_contents)
-00087         {
-00088             free(node_to_delete->contents);
-00089         }
-00090         free(node_to_delete);
-00091         node = node->next;
-00092     }
-00093     return node;
-00094 }
-00095 
-00096 void sll_free( sll_node* list, int free_contents)
-00097 {
-00098     sll_node* node = list;
-00099     while( node != NULL )
-00100     {
-00101         sll_node* next = node->next;
-00102         if (free_contents)
-00103             {
-00104             free(node->contents);
-00105             }
-00106         free(node);
-00107         node = next;
-00108     }
-00109 }
-00110 
-00111 unsigned int sll_length(sll_node* list)
-00112 {
-00113     unsigned int length = 0;
-00114     sll_node* item = list;
-00115     for ( item = list; item != NULL; item = item->next )
-00116     {
-00117         length++;
-00118     }
-00119     return length;
-00120 }
-00121 
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 #include "sll.h"
+00028 #include <stdlib.h>
+00029 
+00030 sll_node* sll_new( void* contents )
+00031 {
+00032     sll_node* list = (sll_node*)malloc( sizeof(sll_node) );
+00033     list->contents = contents;
+00034     list->next = NULL;
+00035     return list;
+00036 }
+00037 
+00038 sll_node* sll_front( sll_node* list )
+00039 {
+00040 }
+00041 
+00042 sll_node* sll_back( sll_node* list )
+00043 {
+00044     sll_node* node = list;
+00045     while((node != NULL) && (node->next != NULL))
+00046     {
+00047         node = node->next;
+00048     }
+00049     return node;
+00050 }
+00051 
+00052 sll_node* sll_index( sll_node* list, int index )
+00053 {
+00054     int current = 0;
+00055     sll_node* node = list;
+00056     sll_node* indexed_node = NULL;
+00057     while ((node != NULL))
+00058     {
+00059         if ( current == index )
+00060         {
+00061             indexed_node = node;
+00062             break;
+00063         }
+00064         node = node->next;
+00065         current++;
+00066     }
+00067     return indexed_node;
+00068 }
+00069 
+00070 sll_node* sll_push_back( sll_node* list, void* contents )
+00071 {
+00072     sll_node* node = sll_back( list );
+00073     node->next = sll_new( contents );
+00074 }
+00075 
+00076 sll_node* sll_push_front( sll_node* list, void* contents )
+00077 {
+00078 }
+00079 
+00080 sll_node* sll_pop_back( sll_node* list )
+00081 {
+00082 }
+00083 
+00084 sll_node* sll_pop_front( sll_node* list )
+00085 {
+00086 }
+00087 
+00088 sll_node* sll_insert( sll_node* list, int index, void* contents )
+00089 {
+00090     int req_index = ((index-1) < 0) ? 0 : index-1;
+00091     sll_node* node = sll_index( list, req_index );
+00092     if(node != NULL)
+00093     {
+00094         sll_node* next_next = node->next;
+00095         node->next = sll_new( contents );
+00096         node->next->next = next_next;
+00097         node = node->next;
+00098     }
+00099     return node;
+00100 }
+00101 
+00102 sll_node* sll_delete( sll_node* list, int index, int free_contents)
+00103 {
+00104     sll_node* node = sll_index( list, (index-1));
+00105     if((node != NULL) && (node->next != NULL))
+00106     {
+00107         sll_node* node_to_delete = node->next;
+00108         node->next = node_to_delete->next;
+00109         if (free_contents)
+00110         {
+00111             free(node_to_delete->contents);
+00112         }
+00113         free(node_to_delete);
+00114         node = node->next;
+00115     }
+00116     return node;
+00117 }
+00118 
+00119 void sll_free( sll_node* list, int free_contents)
+00120 {
+00121     sll_node* node = list;
+00122     while( node != NULL )
+00123     {
+00124         sll_node* next = node->next;
+00125         if (free_contents)
+00126             {
+00127             free(node->contents);
+00128             }
+00129         free(node);
+00130         node = next;
+00131     }
+00132 }
+00133 
+00134 unsigned int sll_length(sll_node* list)
+00135 {
+00136     unsigned int length = 0;
+00137     sll_node* item = list;
+00138     for ( item = list; item != NULL; item = item->next )
+00139     {
+00140         length++;
+00141     }
+00142     return length;
+00143 }
+00144 
 
- - + + - + + - + - - - - - - - + + + + + + + + + + + + + + + - + - + - +

Classes

struct  node
 A node in a hash table. More...
struct  sll_node
 A linked list node. More...

Typedefs

typedef struct node sll_node
typedef struct sll_node sll_node
 A linked list node.

Functions

sll_nodesll_new (void *contents)
sll_nodesll_new (void *contents)
 Creates a new linked list node with the supplied value.
sll_nodesll_last (sll_node *list)
 Finds and returns the last node in the supplied linked list.
sll_nodesll_get (sll_node *list, int index)
 Return the node at the specified index in a linked list.
sll_nodesll_add (sll_node *list, void *contents)
 Adds a new node to an existing linked list.
sll_nodesll_insert (sll_node *list, int index, void *contents)
sll_nodesll_front (sll_node *list)
 Finds and returns the first node in the supplied linked list.
sll_nodesll_back (sll_node *list)
 Finds and returns the last node in the supplied linked list.
sll_nodesll_index (sll_node *list, int index)
 Return the node at the specified index in a linked list.
sll_nodesll_push_back (sll_node *list, void *contents)
 Adds a new node to the end of an existing linked list.
sll_nodesll_push_front (sll_node *list, void *contents)
 Adds a new node to the front of an existing linked list.
sll_nodesll_pop_back (sll_node *list)
 Removes and returns a pointer to the last element of the list.
sll_nodesll_pop_front (sll_node *list)
 Removes and returns a pointer to the first element of the list.
sll_nodesll_insert (sll_node *list, int index, void *contents)
 Inserts a new node in a linked list at the specified index.
sll_nodesll_delete (sll_node *list, int index, int free_contents)
sll_nodesll_delete (sll_node *list, int index, int free_contents)
 Deletes a node from the supplied list.
void sll_free (sll_node *list, int free_contents)
void sll_free (sll_node *list, int free_contents)
 Frees all memory used by a linked list.
unsigned int sll_length (sll_node *list)
unsigned int sll_length (sll_node *list)
 Returns the number of elements in the list.

Typedef Documentation

- +
- +
typedef struct node sll_nodetypedef struct sll_node sll_node
+

A linked list node.

+

Function Documentation

- +
- + - - - - - - - - - - + + - -
sll_node* sll_add sll_node* sll_back (sll_nodelist,
void * contents 
sll_nodelist) )
-

Adds a new node to an existing linked list.

+

Finds and returns the last node in the supplied linked list.

Parameters:
- - +
list
contents
listThe linked list to search.
-
Returns:
Pointer to the newly added node.
+
Returns:
Pointer to the last node in the supplied list.
-

Definition at line 59 of file sll.c.

+

Definition at line 42 of file sll.c.

-Here is the call graph for this function:
+Here is the caller graph for this function:
-
- - +
+ +

@@ -189,9 +189,9 @@ Here is the call graph for this function:
- + - + @@ -227,14 +227,14 @@ Here is the call graph for this function:
Returns:
Pointer to the node that is now at the supplied index.
-

Definition at line 79 of file sll.c.

+

Definition at line 102 of file sll.c.

Here is the call graph for this function:
- +

@@ -247,7 +247,7 @@ Here is the call graph for this function: - + @@ -275,18 +275,46 @@ Here is the call graph for this function: -

Definition at line 96 of file sll.c.

+

Definition at line 119 of file sll.c.

- +
sll_node* sll_delete sll_node* sll_delete (sll_nodesll_node list,
void sll_free (sll_nodesll_node list,
- + - + + + + +
sll_node* sll_get sll_node* sll_front (sll_nodesll_nodelist)
+
+
+ +

Finds and returns the first node in the supplied linked list.

+
Parameters:
+ + +
listThe linked list to search.
+
+
+
Returns:
Pointer to the last node in the supplied list.
+ +

Definition at line 38 of file sll.c.

+ +
+ + +
+
+ + + + + @@ -315,14 +343,14 @@ Here is the call graph for this function:
Returns:
A pointer to the node and the supplied index, NULL if out of range.
-

Definition at line 41 of file sll.c.

+

Definition at line 52 of file sll.c.

Here is the caller graph for this function:
-
- - +
+ +

@@ -333,9 +361,9 @@ Here is the caller graph for this function:
sll_node* sll_index (sll_node list,
- + - + @@ -370,27 +398,27 @@ Here is the caller graph for this function:
Returns:
Pointer to the newly inserted node, NULL if index is out of range.
-

Definition at line 65 of file sll.c.

+

Definition at line 88 of file sll.c.

Here is the call graph for this function:
- +

- +
sll_node* sll_insert sll_node* sll_insert (sll_nodesll_node list,
- + - + @@ -398,36 +426,66 @@ Here is the call graph for this function:
-

Finds and returns the last node in the supplied linked list.

+

Returns the number of elements in the list.

+

Loops through the supplied list and returns a count of the number of elements contained in the list.

Parameters:
sll_node* sll_last unsigned int sll_length (sll_nodesll_node list)
- +
listThe linked list to search.
listThe list to be counted.
-
Returns:
Pointer to the last node in the supplied list.
+
Returns:
The number of elements in the list.
+ +

Definition at line 134 of file sll.c.

+ +
+
+ +
+
+ + + + + + + + +
sll_node* sll_new (void * contents)
+
+
-

Definition at line 31 of file sll.c.

+

Creates a new linked list node with the supplied value.

+

This function allocates a new node on the heap and populates the node contents with the supplied contents pointer.

+
Parameters:
+ + +
contentsThe contents of the newly created node.
+
+
+
Returns:
A pointer to the newly created node.
+ +

Definition at line 30 of file sll.c.

Here is the caller graph for this function:
-
- - +
+ +

- +
- + - + @@ -435,56 +493,134 @@ Here is the caller graph for this function:
-

Returns the number of elements in the list.

-

Loops through the supplied list and returns a count of the number of elements contained in the list.

+

Removes and returns a pointer to the last element of the list.

Parameters:
unsigned int sll_length sll_node* sll_pop_back (sll_nodesll_node list)
- + +
listThe list to be counted.
list
contents
-
Returns:
The number of elements in the list.
+
Returns:
Pointer to the newly added node.
-

Definition at line 111 of file sll.c.

+

Definition at line 80 of file sll.c.

- +
- + + + + + +
sll_node* sll_new sll_node* sll_pop_front (sll_nodelist)
+
+
+ +

Removes and returns a pointer to the first element of the list.

+
Parameters:
+ + + +
list
contents
+
+
+
Returns:
Pointer to the newly added node.
+ +

Definition at line 84 of file sll.c.

+ +
+
+ +
+
+ + + + + + + + + + - + + + + +
sll_node* sll_push_back (sll_nodelist,
void * contents)contents 
)
-

Creates a new linked list node with the supplied value.

-

Allocates a new node on the heap and populates the node contents with the supplied contents pointer.

+

Adds a new node to the end of an existing linked list.

Parameters:
- + +
contentsThe contents of the newly created node.
list
contents
-
Returns:
A pointer to the newly created node.
+
Returns:
Pointer to the newly added node.
-

Definition at line 23 of file sll.c.

+

Definition at line 70 of file sll.c.

-Here is the caller graph for this function:
+Here is the call graph for this function:
-
- - +
+ +

+
+ + +
+
+ + + + + + + + + + + + + + + + + + +
sll_node* sll_push_front (sll_nodelist,
void * contents 
)
+
+
+ +

Adds a new node to the front of an existing linked list.

+
Parameters:
+ + + +
list
contents
+
+
+
Returns:
Pointer to the newly added node.
+ +

Definition at line 76 of file sll.c.

+
@@ -492,7 +628,7 @@ Here is the caller graph for this function:
Go to the documentation of this file.
00001 /******************************************************************************
-00002  *  Copyright (C) 2011  Michael D. Lowis
-00003  *
-00004  *  This program is free software: you can redistribute it and/or modify
-00005  *  it under the terms of the GNU General Public License as published by
-00006  *  the Free Software Foundation, either version 3 of the License, or
-00007  *  (at your option) any later version.
-00008  *
-00009  *  This program is distributed in the hope that it will be useful,
-00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
-00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-00012  *  GNU General Public License for more details.
-00013  *
-00014  *  You should have received a copy of the GNU General Public License
-00015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
-00016  *****************************************************************************/
-00017 #ifndef LINKED_LIST_H
-00018 #define LINKED_LIST_H
-00019 
-00020 typedef struct node
-00021 {
-00022     void* contents;
-00023     struct node* next;
-00024 } sll_node;
-00025 
-00036 sll_node* sll_new( void* contents );
-00037 
-00045 sll_node* sll_last(sll_node* list);
-00046 
-00058 sll_node* sll_get(sll_node* list, int index);
+00002  * Copyright (c) 2012, Michael D. Lowis
+00003  * All rights reserved.
+00004  *
+00005  * Redistribution and use in source and binary forms, with or without
+00006  * modification, are permitted provided that the following conditions are met:
+00007  *
+00008  * * Redistributions of source code must retain the above copyright notice,
+00009  *   this list of conditions and the following disclaimer.
+00010  *
+00011  * * Redistributions in binary form must reproduce the above copyright notice,
+00012  *   this list of conditions and the following disclaimer in the documentation
+00013  *   and/or other materials provided with the distribution.
+00014  *
+00015  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+00016  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+00017  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+00018  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+00019  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+00020  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+00021  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+00022  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+00023  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+00024  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+00025  * POSSIBILITY OF SUCH DAMAGE.
+00026  *****************************************************************************/
+00027 #ifndef SLL_H
+00028 #define SLL_H
+00029 
+00031 typedef struct sll_node
+00032 {
+00034     void* contents;
+00036     struct sll_node* next;
+00037 } sll_node;
+00038 
+00049 sll_node* sll_new( void* contents );
+00050 
+00058 sll_node* sll_front(sll_node* list);
 00059 
-00068 sll_node* sll_add( sll_node* list, void* contents );
-00069 
-00079 sll_node* sll_insert( sll_node* list, int index, void* contents);
-00080 
-00093 sll_node* sll_delete( sll_node* list, int index, int free_contents);
-00094 
-00105 void sll_free( sll_node* list, int free_contents);
-00106 
-00117 unsigned int sll_length(sll_node* list);
-00118 
-00119 #endif
+00067 sll_node* sll_back(sll_node* list);
+00068 
+00080 sll_node* sll_index(sll_node* list, int index);
+00081 
+00090 sll_node* sll_push_back( sll_node* list, void* contents );
+00091 
+00100 sll_node* sll_push_front( sll_node* list, void* contents );
+00101 
+00110 sll_node* sll_pop_back( sll_node* list );
+00111 
+00120 sll_node* sll_pop_front( sll_node* list );
+00121 
+00131 sll_node* sll_insert( sll_node* list, int index, void* contents);
+00132 
+00145 sll_node* sll_delete( sll_node* list, int index, int free_contents);
+00146 
+00157 void sll_free( sll_node* list, int free_contents);
+00158 
+00169 unsigned int sll_length(sll_node* list);
+00170 
+00171 #endif
 
Collaboration graph
- +
[legend]

List of all members.

@@ -103,7 +103,7 @@ Collaboration diagram for ht_table: Public Attributes unsigned int size  Size of the internal table.
-ht_node ** table +ht_node ** table  Pointer to the internal hashing table.
ht_hash_func hash_func  Function used for hashing elements.
@@ -111,7 +111,7 @@ Public Attributes

Detailed Description

A hash table.

-

Definition at line 35 of file ht.h.

+

Definition at line 45 of file ht.h.


Member Data Documentation

@@ -126,7 +126,7 @@ Public Attributes

Function used for hashing elements.

-

Definition at line 42 of file ht.h.

+

Definition at line 52 of file ht.h.

@@ -143,7 +143,7 @@ Public Attributes

Size of the internal table.

-

Definition at line 38 of file ht.h.

+

Definition at line 48 of file ht.h.

@@ -152,7 +152,7 @@ Public Attributes
- +
ht_node** ht_table::tableht_node** ht_table::table
@@ -160,7 +160,7 @@ Public Attributes

Pointer to the internal hashing table.

-

Definition at line 40 of file ht.h.

+

Definition at line 50 of file ht.h.

@@ -172,7 +172,7 @@ Public Attributes
This is the complete list of members for node, including all inherited members. - - +
contentsnode
keynode
nextnode
nextnode
valnode
Collaboration graph
- -
[legend]

List of all members.

@@ -104,31 +102,15 @@ Public Attributes void * key  Pointer to the key.
void * val - Pointer to tke value.
-struct nodenext - Pointer to the next node in the collision chain.
-void * contents + Pointer to the value.
+struct nodenext + Pointer to the next node in the collision chain.

Detailed Description

A node in a hash table.

-

Definition at line 24 of file ht.h.

+

Definition at line 34 of file ht.h.


Member Data Documentation

- -
-
- - - - -
void* node::contents
-
-
- -

Definition at line 22 of file sll.h.

- -
-
@@ -142,16 +124,16 @@ Public Attributes

Pointer to the key.

-

Definition at line 27 of file ht.h.

+

Definition at line 37 of file ht.h.

- +
- +
struct node * node::nextstruct node* node::next
@@ -159,7 +141,7 @@ Public Attributes

Pointer to the next node in the collision chain.

-

Definition at line 31 of file ht.h.

+

Definition at line 41 of file ht.h.

@@ -174,22 +156,21 @@ Public Attributes
-

Pointer to tke value.

+

Pointer to the value.

-

Definition at line 29 of file ht.h.

+

Definition at line 39 of file ht.h.

-
The documentation for this struct was generated from the following files: