1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Version number defined via a macro

This commit is contained in:
Klaus Schmidinger 2000-07-29 18:19:49 +02:00
parent 8bb3fffa5e
commit 44237c3701
3 changed files with 8 additions and 6 deletions

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: config.h 1.11 2000/07/23 17:17:10 kls Exp $ * $Id: config.h 1.12 2000/07/29 18:18:00 kls Exp $
*/ */
#ifndef __CONFIG_H #ifndef __CONFIG_H
@ -17,6 +17,8 @@
#include "dvbapi.h" #include "dvbapi.h"
#include "tools.h" #include "tools.h"
#define VDRVERSION "0.6"
#define MaxBuffer 10000 #define MaxBuffer 10000
enum eKeys { // "Up" and "Down" must be the first two keys! enum eKeys { // "Up" and "Down" must be the first two keys!

View File

@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured * and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection. * graphical interface that sits on top of an SVDRP connection.
* *
* $Id: svdrp.c 1.2 2000/07/24 16:43:51 kls Exp $ * $Id: svdrp.c 1.3 2000/07/29 18:19:49 kls Exp $
*/ */
#define _GNU_SOURCE #define _GNU_SOURCE
@ -369,7 +369,7 @@ void cSVDRP::CmdHelp(const char *Option)
} }
} }
else { else {
Reply(-214, "This is VDR version 0.6"); //XXX dynamically insert version number Reply(-214, "This is VDR version %s", VDRVERSION);
Reply(-214, "Topics:"); Reply(-214, "Topics:");
const char **hp = HelpPages; const char **hp = HelpPages;
while (*hp) { while (*hp) {
@ -598,7 +598,7 @@ void cSVDRP::Process(void)
//TODO how can we get the *full* hostname? //TODO how can we get the *full* hostname?
gethostname(buffer, sizeof(buffer)); gethostname(buffer, sizeof(buffer));
time_t now = time(NULL); time_t now = time(NULL);
Reply(220, "%s SVDRP VideoDiskRecorder 0.6; %s", buffer, ctime(&now));//XXX dynamically insert version number Reply(220, "%s SVDRP VideoDiskRecorder %s; %s", VDRVERSION, buffer, ctime(&now));
} }
int rbytes = readstring(filedes, buffer, sizeof(buffer) - 1); int rbytes = readstring(filedes, buffer, sizeof(buffer) - 1);
if (rbytes > 0) { if (rbytes > 0) {

4
vdr.c
View File

@ -22,7 +22,7 @@
* *
* The project's page is at http://www.cadsoft.de/people/kls/vdr * The project's page is at http://www.cadsoft.de/people/kls/vdr
* *
* $Id: vdr.c 1.25 2000/07/28 15:55:31 kls Exp $ * $Id: vdr.c 1.26 2000/07/29 18:19:12 kls Exp $
*/ */
#include <getopt.h> #include <getopt.h>
@ -131,7 +131,7 @@ int main(int argc, char *argv[])
abort(); abort();
#endif #endif
} }
isyslog(LOG_INFO, "started"); isyslog(LOG_INFO, "VDR version %s started", VDRVERSION);
// DVB interfaces: // DVB interfaces: