summaryrefslogtreecommitdiff
path: root/tools.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools.cpp')
-rw-r--r--tools.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/tools.cpp b/tools.cpp
index da83aff..a6c8973 100644
--- a/tools.cpp
+++ b/tools.cpp
@@ -7,10 +7,21 @@
#include "setup.h"
#include "tools.h"
-namespace vdrlive {
-
using namespace std;
+istream& operator>>( istream& is, tChannelID& ret )
+{
+ if ( is.rdbuf()->in_avail() > 0 ) {
+ string line;
+ if ( !getline( is, line ) || ( !line.empty() && !( ret = tChannelID::FromString( line.c_str() ) ).Valid() ) )
+ is.setstate( ios::badbit );
+ cerr << "channel id " << line << endl << endl;
+ }
+ return is;
+}
+
+namespace vdrlive {
+
string FormatDateTime( char const* format, time_t time )
{
struct tm tm_r;