summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-02-24 18:00:00 +0100
committerKlaus Schmidinger <kls (at) cadsoft (dot) de>2002-02-24 18:00:00 +0100
commitfb8e7fa302ef8a73feb6958b0cb32cc54f76e677 (patch)
tree74cf9dd5cd1892aaf1c05db32796eb356d7bc860 /tools.c
parenta1da0e5c5de55009716e2c327dda16c61c1dae83 (diff)
downloadvdr-patch-lnbsharing-vdr-1.0.0pre1.tar.gz
vdr-patch-lnbsharing-vdr-1.0.0pre1.tar.bz2
Version 1.0.0pre1vdr-1.0.0pre1
- Added scanning for EPG data for another 4 days on channels that support this (thanks to Oleg Assovski). - Removed '#define VFAT 1' from recording.c (was a leftover from testing). - Fixed the "Low disk space!" message (thanks to Sergei Haller). - Added the TPID to Hessen-3 in 'channels.conf' (thanks to Sergei Haller). - Fixed a crash when replaying with DEBUG_OSD=1 (thanks to Stefan Huelswitt). - Implemented the "First day" parameter for repeating timers. See FORMATS for information about the enhanced 'timers.conf' file format, and MANUAL for a description of the new item in the "Edit Timer" menu and the enhanced functionality of the "Blue" button in the "Timers" menu. - When deleting a recording that is currently still being recorded, the related timer will now automatically be terminated. If this is a repeating timer, it will receive a "First day" setting that skips the timer for this day. - Fixed closing all unused file descriptors when opening a pipe (thanks to Werner Fink). - Instant recordings now take the EPG data from the point in time at 5 minutes from the start time of the recording. In order for this to work the 'active' parameter of a timer now uses the second bit to indicate that this is an "instant" recording (see FORMATS for details). - Fixed the SVDRP GRAB command in case the video device can't be opened (thanks to Adrian Stabiszewski). - At startup the data written into 'epg.data' is now read into the EPG data structures. In order for this to work, the 'E' record has been extended to (optionally) contain the 'table ID' (see FORMATS for details). - The new SVDRP command PUTE can be used to put EPG data into the EPG list. See FORMATS for details about the required data format. - Taking the German umlauts 'as is' when compiled with VFAT. - The new Setup parameter RecordDolbyDigital can be used to generally turn off recording the Dolby Digital audio channels in case you want to save disk space or don't have the equipment to replay Dolby Digital audio. - Reading the 'setup.conf' file no longer terminates in case of an error, but rather attempts to read the rest of the file. - Removed DVD support from the core VDR source, since the current version from Andreas Schultz is already much further developed (DVD menu navigation) and the concept of "additional players" in VDR is going to change in version 1.1.0, where a new "plugin" interface shall allow the easy implementation of new players without having to patch the core VDR source. Until then, Andreas has agreed to provide his DVD support as a completely external patch. - The contents of the distribution archive now contains the directory name with the current version number, as in 'vdr-1.0.0pre1/...' in order to avoid inadvertently overwriting an existing VDR directory with a new version. - Added a missing error message in SVDRP command LSTC in case the given channel can't be found.
Diffstat (limited to 'tools.c')
-rw-r--r--tools.c35
1 files changed, 16 insertions, 19 deletions
diff --git a/tools.c b/tools.c
index e95bdf8..3764a64 100644
--- a/tools.c
+++ b/tools.c
@@ -4,17 +4,13 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.c 1.57 2002/02/05 18:16:52 kls Exp $
+ * $Id: tools.c 1.59 2002/02/17 12:57:23 kls Exp $
*/
#include "tools.h"
#include <ctype.h>
#include <dirent.h>
#include <errno.h>
-#if defined(DEBUG_OSD)
-#include <ncurses.h>
-#undef ERR //XXX ncurses defines this - but this clashes with newer system header files
-#endif
#include <stdlib.h>
#include <sys/time.h>
#include <time.h>
@@ -466,6 +462,20 @@ bool SpinUpDisk(const char *FileName)
return false;
}
+const char *WeekDayName(int WeekDay)
+{
+ static char buffer[4];
+ WeekDay = WeekDay == 0 ? 6 : WeekDay - 1; // we start with monday==0!
+ if (0 <= WeekDay && WeekDay <= 6) {
+ const char *day = tr("MonTueWedThuFriSatSun");
+ day += WeekDay * 3;
+ strncpy(buffer, day, 3);
+ return buffer;
+ }
+ else
+ return "???";
+}
+
const char *DayDateTime(time_t t)
{
static char buffer[32];
@@ -473,11 +483,7 @@ const char *DayDateTime(time_t t)
time(&t);
struct tm tm_r;
tm *tm = localtime_r(&t, &tm_r);
- int weekday = tm->tm_wday == 0 ? 6 : tm->tm_wday - 1; // we start with monday==0!
- const char *day = tr("MonTueWedThuFriSatSun");
- day += weekday * 3;
- strncpy(buffer, day, 3);
- snprintf(buffer + 3, sizeof(buffer) - 3, " %2d.%02d %02d:%02d", tm->tm_mday, tm->tm_mon + 1, tm->tm_hour, tm->tm_min);
+ snprintf(buffer, sizeof(buffer), "%s %2d.%02d %02d:%02d", WeekDayName(tm->tm_wday), tm->tm_mday, tm->tm_mon + 1, tm->tm_hour, tm->tm_min);
return buffer;
}
@@ -545,9 +551,6 @@ bool cFile::Ready(bool Wait)
bool cFile::AnyFileReady(int FileDes, int TimeoutMs)
{
-#ifdef DEBUG_OSD
- refresh();
-#endif
fd_set set;
FD_ZERO(&set);
for (int i = 0; i < maxFiles; i++) {
@@ -566,9 +569,6 @@ bool cFile::AnyFileReady(int FileDes, int TimeoutMs)
bool cFile::FileReady(int FileDes, int TimeoutMs)
{
-#ifdef DEBUG_OSD
- refresh();
-#endif
fd_set set;
struct timeval timeout;
FD_ZERO(&set);
@@ -582,9 +582,6 @@ bool cFile::FileReady(int FileDes, int TimeoutMs)
bool cFile::FileReadyForWriting(int FileDes, int TimeoutMs)
{
-#ifdef DEBUG_OSD
- refresh();
-#endif
fd_set set;
struct timeval timeout;
FD_ZERO(&set);