summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2001-08-11 09:38:12 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2001-08-11 09:38:12 +0200
commit627916d32a363913f34b255b0a5dc0e89ffe9408 (patch)
tree48d643ba72e2238faa3493a79434891d111ef6c3 /vdr.c
parentcf15f276f9b7b97311003d2d1dc6dcdb444feb37 (diff)
downloadvdr-627916d32a363913f34b255b0a5dc0e89ffe9408.tar.gz
vdr-627916d32a363913f34b255b0a5dc0e89ffe9408.tar.bz2
New command line option -E
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/vdr.c b/vdr.c
index 15a69de0..b18d838e 100644
--- a/vdr.c
+++ b/vdr.c
@@ -22,7 +22,7 @@
*
* The project's page is at http://www.cadsoft.de/people/kls/vdr
*
- * $Id: vdr.c 1.61 2001/08/05 16:15:51 kls Exp $
+ * $Id: vdr.c 1.62 2001/08/11 09:38:12 kls Exp $
*/
#include <getopt.h>
@@ -84,6 +84,7 @@ int main(int argc, char *argv[])
{ "config", required_argument, NULL, 'c' },
{ "daemon", no_argument, NULL, 'd' },
{ "device", required_argument, NULL, 'D' },
+ { "epgfile", required_argument, NULL, 'E' },
{ "help", no_argument, NULL, 'h' },
{ "log", required_argument, NULL, 'l' },
{ "port", required_argument, NULL, 'p' },
@@ -91,12 +92,12 @@ int main(int argc, char *argv[])
{ "dvd", required_argument, NULL, 'V' },
{ "watchdog", required_argument, NULL, 'w' },
{ "terminal", required_argument, NULL, 't' },
- { 0 }
+ { NULL }
};
int c;
int option_index = 0;
- while ((c = getopt_long(argc, argv, "a:c:dD:hl:p:v:V:w:t:", long_options, &option_index)) != -1) {
+ while ((c = getopt_long(argc, argv, "a:c:dD:E:hl:p:t:v:V:w:", long_options, &option_index)) != -1) {
switch (c) {
case 'a': cDvbApi::SetAudioCommand(optarg);
break;
@@ -113,27 +114,34 @@ int main(int argc, char *argv[])
fprintf(stderr, "vdr: invalid DVB device number: %s\n", optarg);
return 2;
break;
+ case 'E': cSIProcessor::SetEpgDataFileName(*optarg != '-' ? optarg : NULL);
+ break;
case 'h': printf("Usage: vdr [OPTION]\n\n" // for easier orientation, this is column 80|
" -a CMD, --audio=CMD send Dolby Digital audio to stdin of command CMD\n"
" -c DIR, --config=DIR read config files from DIR (default is to read them\n"
" from the video directory)\n"
- " -h, --help display this help and exit\n"
" -d, --daemon run in daemon mode\n"
" -D NUM, --device=NUM use only the given DVB device (NUM = 0, 1, 2...)\n"
" there may be several -D options (default: all DVB\n"
" devices will be used)\n"
+ " -E FILE --epgfile=FILE write the EPG data into the given FILE (default is\n"
+ " %s); use '-E-' to disable this\n"
+ " if FILE is a directory, the default EPG file will be\n"
+ " created in that directory\n"
+ " -h, --help display this help and exit\n"
" -l LEVEL, --log=LEVEL set log level (default: 3)\n"
" 0 = no logging, 1 = errors only,\n"
" 2 = errors and info, 3 = errors, info and debug\n"
" -p PORT, --port=PORT use PORT for SVDRP (default: %d)\n"
" 0 turns off SVDRP\n"
+ " -t TTY, --terminal=TTY controlling tty\n"
" -v DIR, --video=DIR use DIR as video directory (default: %s)\n"
" -V DEV, --dvd=DEV use DEV as the DVD device (default: %s)\n"
" -w SEC, --watchdog=SEC activate the watchdog timer with a timeout of SEC\n"
" seconds (default: %d); '0' disables the watchdog\n"
- " -t TTY, --terminal=TTY controlling tty\n"
"\n"
"Report bugs to <vdr-bugs@cadsoft.de>\n",
+ cSIProcessor::GetEpgDataFileName() ? cSIProcessor::GetEpgDataFileName() : "'-'",
DEFAULTSVDRPPORT,
VideoDirectory,
#ifdef DVDSUPPORT