diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2002-09-08 11:46:53 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2002-09-08 11:46:53 +0200 |
commit | 1b396902e488e093234ac181bbc0e514dd098942 (patch) | |
tree | cbd726e2b26c8280ac4ae4bdbae58c0b05ebae27 /tools.h | |
parent | f47655ef0f1836be0d92a7fa57e3c300922a81ee (diff) | |
download | vdr-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.h | 3 |
1 files changed, 2 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.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); |