Totally rearranged device/player/recorder structures

This commit is contained in:
Klaus Schmidinger
2002-06-16 12:57:31 +02:00
parent b005b8fc4a
commit a4bfddd2f9
34 changed files with 3144 additions and 311 deletions

View File

@@ -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; }