Added version information to elog.c

SVN revision: 2050
This commit is contained in:
Stefan Ritt 2008-02-18 07:38:54 +00:00
parent 542eca16e8
commit 6ba4b7e94d
4 changed files with 31 additions and 17 deletions

View File

@ -17,6 +17,7 @@ Global
{8D6EBED8-48F3-4719-907E-7BE46A3C0FA4}.Debug|Win32.ActiveCfg = Debug|Win32
{8D6EBED8-48F3-4719-907E-7BE46A3C0FA4}.Release|Win32.ActiveCfg = Release|Win32
{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}.Debug|Win32.ActiveCfg = Debug|Win32
{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}.Debug|Win32.Build.0 = Debug|Win32
{FD6FCAF3-A94B-40FA-AE52-07705DE2E519}.Release|Win32.ActiveCfg = Release|Win32
{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}.Debug|Win32.ActiveCfg = Debug|Win32
{CB6EB7FE-CC3D-4548-B8B8-8DDA05916759}.Debug|Win32.Build.0 = Debug|Win32

View File

@ -44,7 +44,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="\mxml;\openssl\include;"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_SSL"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;HAVE_SSL1"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
UsePrecompiledHeader="0"

View File

@ -4,7 +4,7 @@ Checklist for new ELOG version
On PC6562:
- Put all new options in doc/config.html
- Increse version in elogd.c
- Increse version in elogd.c and elog.c
- Do the same in doc/index.html and index_d.html
- Modify ChangeLog
- Add release date to ChangeLog

View File

@ -9,6 +9,12 @@
\********************************************************************/
#define VERSION "2.7.2"
char svn_revision[] = "$Id$";
/* ELOG identification */
static const char ELOGID[] = "elog " VERSION " built " __DATE__ ", " __TIME__;
#include <stdio.h>
#include <sys/types.h>
#include <fcntl.h>
@ -898,7 +904,9 @@ INT submit_elog(char *host, int port, char *subdir, char *experiment,
/* check response status */
if (strstr(response, "302 Found")) {
if (strstr(response, "Location:")) {
if (strstr(response, "fail"))
if (strstr(response, "has moved"))
printf("Error: elogd server has moved to another location\n");
else if (strstr(response, "fail"))
printf("Error: Invalid user name or password\n");
else {
strncpy(str, strstr(response, "Location:") + 10, sizeof(str));
@ -1010,21 +1018,26 @@ int main(int argc, char *argv[])
strcpy(textfile, argv[++i]);
else {
usage:
printf("%s ", ELOGID);
strcpy(str, svn_revision + 13);
if (strchr(str, ' '))
*strchr(str, ' ') = 0;
printf("revision %s\n", str);
printf("\nusage: elog\n");
printf(" -h <hostname> [-p port] [-s subdir]\n");
printf(" Location where elogd is running\n");
printf(" -l logbook/experiment Name of logbook or experiment\n");
printf(" [-v] for verbose output\n");
printf(" [-w password] write password defined on server\n");
printf(" [-u username password] user name and password\n");
printf(" [-f <attachment>] (up to %d times)\n", MAX_ATTACHMENTS);
printf(" -a <attribute>=<value> (up to %d times)\n", MAX_N_ATTR);
printf(" [-r <id>] Reply to existing message\n");
printf(" [-q] Quote original text on reply\n");
printf(" [-e <id>] Edit existing message\n");
printf(" [-x] Suppress email notification\n");
printf(" [-n 0|1|2] Encoding: 0:ELcode,1:plain,2:HTML\n");
printf(" -m <textfile>] | <text>\n");
printf("elog -h <hostname> [-p port] [-s subdir]\n");
printf(" Location where elogd is running\n");
printf(" -l logbook/experiment Name of logbook or experiment\n");
printf(" [-v] for verbose output\n");
printf(" [-w password] write password defined on server\n");
printf(" [-u username password] user name and password\n");
printf(" [-f <attachment>] (up to %d times)\n", MAX_ATTACHMENTS);
printf(" -a <attribute>=<value> (up to %d times)\n", MAX_N_ATTR);
printf(" [-r <id>] Reply to existing message\n");
printf(" [-q] Quote original text on reply\n");
printf(" [-e <id>] Edit existing message\n");
printf(" [-x] Suppress email notification\n");
printf(" [-n 0|1|2] Encoding: 0:ELcode,1:plain,2:HTML\n");
printf(" -m <textfile>] | <text>\n");
printf("\nArguments with blanks must be enclosed in quotes\n");
printf("The elog message can either be submitted on the command line, piped in like\n");
printf("\"cat text | elog -h ... -l ... -a ...\" or in a file with the -m flag.\n");