summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2002-09-08 11:46:53 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2002-09-08 11:46:53 +0200
commit1b396902e488e093234ac181bbc0e514dd098942 (patch)
treecbd726e2b26c8280ac4ae4bdbae58c0b05ebae27 /tools.h
parentf47655ef0f1836be0d92a7fa57e3c300922a81ee (diff)
downloadvdr-1b396902e488e093234ac181bbc0e514dd098942.tar.gz
vdr-1b396902e488e093234ac181bbc0e514dd098942.tar.bz2
Skipping unavailable channels when switching with 'Up' and 'Down' keys
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools.h b/tools.h
index ebabb470..f8bf43f2 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.49 2002/08/16 08:52:01 kls Exp $
+ * $Id: tools.h 1.50 2002/09/08 10:22:29 kls Exp $
*/
#ifndef __TOOLS_H
@@ -46,6 +46,7 @@ extern int SysLogLevel;
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 int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; }
template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
ssize_t safe_read(int filedes, void *buffer, size_t size);