Date: Sun Sep 21 11:22:10 CEST 2003
User: Jani Taskinen
Directory: srm/main
Log Message:
[0.15]
- Command line options are now same in debug and normal builds.
Modified files:
srm/main/main.c (version: 1.81)
[FILE: /srm/main/main.c]
--- srm/main/main.c:1.80 Fri Sep 19 15:32:52 2003 GMT
+++ srm/main/main.c Sun Sep 21 07:22:10 2003 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.80 2003/09/19 17:32:52 sniper Exp $ */
+/* $Id: cvstemp,v 1.81 2003/09/21 09:22:10 sniper Exp $ */
/* The contents of this file are subject to the Vulcan Logic Public
* License Version 1.1 (the "License"); you may not use this file
@@ -62,62 +62,57 @@
static int srm_caught_signal = -1;
int srm_shutdown;
static int srm_no_signal_handling = 0;
-#ifdef SRM_DEBUG
-static int srm_no_fork = 1;
-static int srm_log_to_screen = 1;
-#else
static int srm_no_fork = 0;
static int srm_log_to_screen = 0;
-#endif
static void srm_show_usage (void)
{
-#ifdef SRM_DEBUG
- printf ("Usage: srmd [-h] [-S] [-L] [-V]\n");
- printf (" -L Do not log to screen but to the logfile\n");
-#else
- printf ("Usage: srmd [-h] [-S] [-L] [-V] [-X]\n");
+ printf ("Usage: srmd [-S] [-L] [-X]\n");
+ printf (" [-v|-V|-h]\n");
+ printf ("Options:\n");
+ printf (" -S Disable signal handling\n");
printf (" -L Log to screen instead of the logfile\n");
printf (" -X Do not fork into background\n");
-#endif
- printf (" -h Show this help message\n");
- printf (" -S Disable signal handling\n");
- printf (" -V Show the version number\n");
+ printf ("\n");
+ printf (" -v Display version information and exit\n");
+ printf (" -V Display detailed version information and exit\n");
+ printf (" -h Display this help message and exit\n");
+ printf ("\n");
}
static int srm_parse_commandline (int argc, char* argv[])
{
int arg;
- while ((arg = getopt (argc, argv, "hLSVX")) != -1) {
+ while ((arg = getopt (argc, argv, "hLSvVX")) != -1) {
switch (arg) {
case 'h':
srm_show_usage();
exit(0);
break;
- case 'L':
-#ifdef SRM_DEBUG
- srm_log_to_screen = 0;
-#else
- srm_log_to_screen = 1;
-#endif
- break;
- case 'S':
- srm_no_signal_handling = 1;
+ case 'v':
+ printf ("SRM version %s\n", SRM_VERSION);
+ exit (0);
break;
case 'V':
+ printf ("SRM version %s %u", SRM_VERSION, SRM_API_VERSION);
#ifdef SRM_DEBUG
- printf ("SRM version %s %u (debug build)\n", SRM_VERSION, SRM_API_VERSION);
-#else
- printf ("SRM version %s %u\n", SRM_VERSION, SRM_API_VERSION);
+ printf (" (DEBUG)");
#endif
+ printf ("\nbuilt uname: %s", SRM_UNAME);
+ printf ("\nbuilt date: %s %s\n", __DATE__, __TIME__);
+ printf ("\nCopyright (c) 2000-2003 The Vulcan Logic Group.\n\n");
exit (0);
break;
-#ifndef SRM_DEBUG
+ case 'L':
+ srm_log_to_screen = 1;
+ break;
+ case 'S':
+ srm_no_signal_handling = 1;
+ break;
case 'X':
srm_no_fork = 1;
break;
-#endif
default:
return SRM_FAILED;
}
Received on Sun Sep 21 11:22:11 2003
This archive was generated by hypermail 2.1.8 : Tue Jan 06 2009 - 08:00:03 CET