aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/luaproc/list.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-23 23:36:30 +1000
committerDavid Walter Seikel2012-01-23 23:36:30 +1000
commit6523585c66c04cea54df50013df8886b589847d8 (patch)
tree0b22aee7064166d88595eda260ca2d17c0773da5 /libraries/luaproc/list.h
parentUpdate the EFL to what I'm actually using, coz I'm using some stuff not yet r... (diff)
downloadSledjHamr-6523585c66c04cea54df50013df8886b589847d8.zip
SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.gz
SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.bz2
SledjHamr-6523585c66c04cea54df50013df8886b589847d8.tar.xz
Add luaproc and LuaJIT libraries.
Two versions of LuaJIT, the stable release, and the dev version. Try the dev version first, until ih fails badly.
Diffstat (limited to 'libraries/luaproc/list.h')
-rw-r--r--libraries/luaproc/list.h76
1 files changed, 76 insertions, 0 deletions
diff --git a/libraries/luaproc/list.h b/libraries/luaproc/list.h
new file mode 100644
index 0000000..6aa21c0
--- /dev/null
+++ b/libraries/luaproc/list.h
@@ -0,0 +1,76 @@
1/***************************************************
2
3Copyright 2008 Alexandre Skyrme, Noemi Rodriguez, Roberto Ierusalimschy
4
5Permission is hereby granted, free of charge, to any person obtaining a copy
6of this software and associated documentation files (the "Software"), to deal
7in the Software without restriction, including without limitation the rights
8to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9copies of the Software, and to permit persons to whom the Software is
10furnished to do so, subject to the following conditions:
11
12The above copyright notice and this permission notice shall be included in
13all copies or substantial portions of the Software.
14
15THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21THE SOFTWARE.
22
23*****************************************************
24
25[list.h]
26
27****************************************************/
28
29#ifndef _LIST_H_
30#define _LIST_H_
31
32#define LIST_COUNT_ERROR -1
33
34/* node pointer type */
35typedef struct stnode *node;
36
37/* list pointer type */
38typedef struct stlist *list;
39
40/* create new (empty) list */
41list list_new( void );
42
43/* create new node */
44node list_new_node( void *data );
45
46/* add node to list */
47node list_add( list lst, node n );
48
49/* search for a node */
50node list_search( list lst, void *data );
51
52/* remove node from list */
53void list_remove( list lst, node n );
54
55/* destroy list */
56void list_destroy( list lst );
57
58/* return list's first node */
59node list_head( list lst );
60
61/* return node's next node */
62node list_next( node n );
63
64/* return a node's data */
65void *list_data( node n );
66
67/* pop the head node from the list */
68node list_pop_head( list lst );
69
70/* destroy a node */
71void list_destroy_node( node n );
72
73/* return a list's node count */
74int list_node_count( list lst );
75
76#endif