annotate List.h @ 2:803d6bf22e6d default tip

second commit. it's far to complete..
author kent <kent@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Dec 2009 16:19:56 +0900
parents 5b089096921f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #ifndef _LIST_H
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #define _LIST_H
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 typedef struct _List {
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 void *data;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 struct _List *next;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 struct _List *prev;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 } List;
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
2
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
10 typedef struct _ListIter {
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
11 struct _List *head;
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
12 struct _List *next;
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
13 } ListIter;
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
14
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 List * _listAddFirst(List*, void *);
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 List * _listRemove(List *, void *);
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 void * _listGetnthData(List *, int);
2
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
18 void * _listGetLastData(List *);
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
19 List * _listMoveLasttoFirst(List *);
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 typedef int (*ApplyFn)(void*,void*);
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 void _listApply(List *, ApplyFn, void *);
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
2
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
24
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
25 ListIter * _listIterator(List *);
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
26 void * _listIterNext(ListIter *);
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
27 void _listIterEnd(ListIter *);
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
28 List * _listIterRemoveCurrent(ListIter *);
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
29
803d6bf22e6d second commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents: 0
diff changeset
30
0
5b089096921f first commit.
kent <kent@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 #endif /* !_LIST_H */