projects
/
tedtools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
5fe19b0
)
add pop/push cells into list
author
teodor
<teodor>
Thu, 21 Jan 2010 13:33:17 +0000
(13:33 +0000)
committer
teodor
<teodor>
Thu, 21 Jan 2010 13:33:17 +0000
(13:33 +0000)
glist.c
patch
|
blob
|
history
glist.h
patch
|
blob
|
history
diff --git
a/glist.c
b/glist.c
index
ba9fc9d
..
4422fd6
100644
(file)
--- a/
glist.c
+++ b/
glist.c
@@
-103,11
+103,21
@@
GListPush(GList *l, void *ptr) {
return insertCell(l, GLIST_TAIL(l), makeCell(ptr));
}
return insertCell(l, GLIST_TAIL(l), makeCell(ptr));
}
+GList*
+GListPushCell(GList *l, GListCell* c) {
+ return insertCell(l, GLIST_TAIL(l), c);
+}
+
GList*
GListUnshift(GList *l, void *ptr) {
return insertCell(l, NULL, makeCell(ptr));
}
GList*
GListUnshift(GList *l, void *ptr) {
return insertCell(l, NULL, makeCell(ptr));
}
+GList*
+GListUnshiftCell(GList *l, GListCell* c) {
+ return insertCell(l, NULL, c);
+}
+
GList*
GListDelete(GList *l, GListCell *c) {
if (GLIST_LENGTH(l) <= 0)
GList*
GListDelete(GList *l, GListCell *c) {
if (GLIST_LENGTH(l) <= 0)
diff --git
a/glist.h
b/glist.h
index
3221fe0
..
beb685d
100644
(file)
--- a/
glist.h
+++ b/
glist.h
@@
-58,8
+58,10
@@
typedef struct GList {
GListCell* GListPop(GList *l);
GList* GListPush(GList *l, void *ptr);
GListCell* GListPop(GList *l);
GList* GListPush(GList *l, void *ptr);
+GList* GListPushCell(GList *l, GListCell* c);
GListCell* GListShift(GList *l);
GList* GListUnshift(GList *l, void *ptr);
GListCell* GListShift(GList *l);
GList* GListUnshift(GList *l, void *ptr);
+GList* GListUnshiftCell(GList *l, GListCell* c);
GList* GListInsert(GList *l, GListCell *prev, void *ptr);
GList* GListDelete(GList *l, GListCell *c);
GListCell* GListGet(GList *l, int n);
GList* GListInsert(GList *l, GListCell *prev, void *ptr);
GList* GListDelete(GList *l, GListCell *c);
GListCell* GListGet(GList *l, int n);