summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-12-28 12:57:16 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2000-12-28 12:57:16 +0100
commit4e354bc9a0f9a67e842932b1de9da889488c8a2b (patch)
treea07ad700367cef6a4058aecb6e6e47549c4fb9ed /tools.h
parentbe137ee37f0e9f6f9a90b3c57922b7d65fbde5d2 (diff)
downloadvdr-4e354bc9a0f9a67e842932b1de9da889488c8a2b.tar.gz
vdr-4e354bc9a0f9a67e842932b1de9da889488c8a2b.tar.bz2
Implemented 'on disk editing'
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools.h b/tools.h
index b76d7e95..83f3fa0c 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.21 2000/12/03 15:32:54 kls Exp $
+ * $Id: tools.h 1.22 2000/12/10 11:49:42 kls Exp $
*/
#ifndef __TOOLS_H
@@ -31,6 +31,8 @@ extern int SysLogLevel;
#define DELETENULL(p) (delete (p), p = NULL)
+template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; };
+
void writechar(int filedes, char c);
char *readline(FILE *f);
char *strn0cpy(char *dest, const char *src, size_t n);
@@ -98,6 +100,8 @@ template<class T> class cList : public cListBase {
public:
T *Get(int Index) const { return (T *)cListBase::Get(Index); }
T *First(void) const { return (T *)objects; }
+ T *Last(void) const { return (T *)lastObject; }
+ T *Prev(const T *object) const { return (T *)object->Prev(); }
T *Next(const T *object) const { return (T *)object->Next(); }
};