summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-06-16 12:57:31 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-06-16 12:57:31 +0200
commita4bfddd2f995ad03409de005bc3015437c10aa06 (patch)
treed5959a667bcdb4b7aec55940aaaecfd398de3bb8 /tools.h
parentb005b8fc4a15926ab6f82c7ac19e5b13d811df5f (diff)
downloadvdr-a4bfddd2f995ad03409de005bc3015437c10aa06.tar.gz
vdr-a4bfddd2f995ad03409de005bc3015437c10aa06.tar.bz2
Totally rearranged device/player/recorder structures
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools.h b/tools.h
index 0c29e7cb..e107f185 100644
--- a/tools.h
+++ b/tools.h
@@ -4,13 +4,13 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 1.46 2002/05/18 15:10:10 kls Exp $
+ * $Id: tools.h 1.47 2002/06/10 16:30:00 kls Exp $
*/
#ifndef __TOOLS_H
#define __TOOLS_H
-//#include <errno.h>
+#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <string.h>
@@ -18,6 +18,8 @@
#include <sys/stat.h>
#include <sys/types.h>
+typedef unsigned char uchar;
+
extern int SysLogLevel;
#define esyslog(a...) void( (SysLogLevel > 0) ? syslog(LOG_ERR, a) : void() )
@@ -36,6 +38,9 @@ extern int SysLogLevel;
#define DELETENULL(p) (delete (p), p = NULL)
+#define CHECK(s) { if ((s) < 0) LOG_ERROR; } // used for 'ioctl()' calls
+#define FATALERRNO (errno != EAGAIN && errno != EINTR)
+
template<class T> inline T min(T a, T b) { return a <= b ? a : b; }
template<class T> inline T max(T a, T b) { return a >= b ? a : b; }
template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }