diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2000-12-28 12:57:16 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2000-12-28 12:57:16 +0100 |
commit | 4e354bc9a0f9a67e842932b1de9da889488c8a2b (patch) | |
tree | a07ad700367cef6a4058aecb6e6e47549c4fb9ed /tools.h | |
parent | be137ee37f0e9f6f9a90b3c57922b7d65fbde5d2 (diff) | |
download | vdr-4e354bc9a0f9a67e842932b1de9da889488c8a2b.tar.gz vdr-4e354bc9a0f9a67e842932b1de9da889488c8a2b.tar.bz2 |
Implemented 'on disk editing'
Diffstat (limited to 'tools.h')
-rw-r--r-- | tools.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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(); } }; |