summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/my_list.h
authorpohly <pohly>2004-08-24 20:52:45 (UTC)
committer pohly <pohly>2004-08-24 20:52:45 (UTC)
commit73253e93327cf4ef0932de1b4afb56af22a0f37e (patch) (side-by-side diff)
tree1c9a7a6dd3341e036a894d348a3372525d29acec /noncore/apps/opie-reader/my_list.h
parente90847c784c48bd21bf8768cb38edb853b832697 (diff)
downloadopie-73253e93327cf4ef0932de1b4afb56af22a0f37e.zip
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.gz
opie-73253e93327cf4ef0932de1b4afb56af22a0f37e.tar.bz2
updated source to opie-reader 0.7g
Diffstat (limited to 'noncore/apps/opie-reader/my_list.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-reader/my_list.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/my_list.h b/noncore/apps/opie-reader/my_list.h
index f180d3d..52e6472 100644
--- a/noncore/apps/opie-reader/my_list.h
+++ b/noncore/apps/opie-reader/my_list.h
@@ -1,6 +1,10 @@
#ifndef __MY_LIST_H
#define __MY_LIST_H
+#ifndef NULL
+#define NULL 0
+#endif
+
template<class T>
class CList
{
@@ -30,6 +34,14 @@ class CList
}
T& first() { return front->data; }
T& last() { return back->data; }
+ T pop()
+ {
+ T data = front->data;
+ node* n = front;
+ front = front->next;
+ delete n;
+ return data;
+ }
T* operator[](int n)
{
node* current = front;