summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/tools.h b/tools.h
index 43f85254..9f87bbde 100644
--- a/tools.h
+++ b/tools.h
@@ -4,12 +4,13 @@
* See the main source file 'osm.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.1 2000/02/19 13:36:48 kls Exp $
+ * $Id: tools.h 1.2 2000/03/05 16:14:05 kls Exp $
*/
#ifndef __TOOLS_H
#define __TOOLS_H
+#include <stdio.h>
#include <syslog.h>
//TODO
@@ -17,6 +18,14 @@
#define esyslog syslog
#define isyslog syslog
+#define SECSINDAY 86400
+
+#define DELETENULL(p) (delete (p), p = NULL)
+
+char *readline(FILE *f);
+int time_ms(void);
+bool MakeDirs(const char *FileName);
+
class cListObject {
private:
cListObject *prev, *next;
@@ -38,6 +47,8 @@ public:
virtual ~cListBase();
void Add(cListObject *Object);
void Del(cListObject *Object);
+ void Move(int From, int To);
+ void Move(cListObject *From, cListObject *To);
void Clear(void);
cListObject *Get(int Index);
int Count(void);
@@ -47,8 +58,7 @@ template<class T> class cList : public cListBase {
public:
T *Get(int Index) { return (T *)cListBase::Get(Index); }
T *First(void) { return (T *)objects; }
+ T *Next(T *object) { return (T *)object->Next(); }
};
-int time_ms(void);
-
#endif //__TOOLS_H