Nice rendering of the CVS version as "(cvs 200401181200003000)".
authorobiot <obiot@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 18 Jan 2004 01:41:14 +0000 (01:41 +0000)
committerobiot <obiot@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 18 Jan 2004 01:41:14 +0000 (01:41 +0000)
The make-version.pl script only defines CVSVERSION if this was a build
from CVS.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9701 f5534014-38df-0310-8fa8-9805f1628bb7

gtk/main.c
make-version.pl
mergecap.c
tethereal.c

index 0fd4479e0f24d8860a8dd98aeada921af7ed9a3b..25f0dc2668dad3e92b3c9c1f3c85ec776b687dbd 100644 (file)
@@ -1,6 +1,6 @@
 /* main.c
  *
- * $Id: main.c,v 1.355 2004/01/18 00:40:39 ulfl Exp $
+ * $Id: main.c,v 1.356 2004/01/18 01:41:14 obiot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -208,8 +208,12 @@ about_ethereal( GtkWidget *w _U_, gpointer data _U_ ) {
   snprintf(message, MAX_ABOUT_MSG_LEN,
           "Ethereal - Network Protocol Analyzer\n\n"
           
-          "Version " VERSION CVSVERSION " (C) 1998-2003 Gerald Combs <gerald@ethereal.com>\n\n"
-          
+          "Version " VERSION
+#ifdef CVSVERSION
+          " (cvs " CVSVERSION ")"
+#endif
+          " (C) 1998-2003 Gerald Combs <gerald@ethereal.com>\n\n"
+
        "%s\n"
        "%s\n\n"
 
@@ -1200,8 +1204,12 @@ static void
 print_usage(gboolean print_ver) {
 
   if (print_ver) {
-    fprintf(stderr, "This is GNU " PACKAGE " " VERSION CVSVERSION "\n%s\n%s\n",
-         comp_info_str->str, runtime_info_str->str);
+    fprintf(stderr, "This is GNU " PACKAGE " " VERSION
+#ifdef CVSVERSION
+       " (cvs " CVSVERSION ")"
+#endif
+       "\n%s\n%s\n",
+       comp_info_str->str, runtime_info_str->str);
   }
 #ifdef HAVE_LIBPCAP
   fprintf(stderr, "\n%s [ -vh ] [ -klLnpQS ] [ -a <capture autostop condition> ] ...\n",
@@ -1231,8 +1239,12 @@ show_version(void)
   create_console();
 #endif
 
-  printf("%s %s%s\n%s\n%s\n", PACKAGE, VERSION, CVSVERSION, comp_info_str->str,
-         runtime_info_str->str);
+  printf(PACKAGE " " VERSION
+#ifdef CVSVERSION
+      " (cvs " CVSVERSION ")"
+#endif
+      "\n%s\n%s\n",
+      comp_info_str->str, runtime_info_str->str);
 }
 
 static int
index 590171b9aa437b0e68d4bb939d6c851388fa8daf..ecaf52aa4a473a8bcd15480abc0aa2b18faca405 100755 (executable)
@@ -2,7 +2,7 @@
 #
 # Copyright 2004 Jörg Mayer (see AUTHORS file)
 #
-# $Id: make-version.pl,v 1.2 2004/01/17 13:09:00 jmayer Exp $
+# $Id: make-version.pl,v 1.3 2004/01/18 01:41:13 obiot Exp $
 #
 # Ethereal - Network traffic analyzer
 # By Gerald Combs <gerald@ethereal.com>
@@ -74,9 +74,9 @@ if ($last eq "" && -f "cvsversion") {
        $last = `cat cvsversion`;
 }
 if ( $last ne "" ) {
-       $last = "#define CVSVERSION \"cvs$last\"\n";
+       $last = "#define CVSVERSION \"$last\"\n";
 } else {
-       $last = "#define CVSVERSION \"\"\n";
+       $last = "/* #define CVSVERSION \"\" */\n";
 }
 
 my $needsupdate=0;
index 5abe344d536d553d40123e0ba2f0063d93c45a5e..30bd1dbfab820965405e39cee3671cdbc9efce52 100644 (file)
@@ -1,6 +1,6 @@
 /* Combine two dump files, either by appending or by merging by timestamp
  *
- * $Id: mergecap.c,v 1.12 2004/01/16 20:03:10 jmayer Exp $
+ * $Id: mergecap.c,v 1.13 2004/01/18 01:41:14 obiot Exp $
  *
  * Written by Scott Renfro <scott@renfro.org> based on
  * editcap by Richard Sharpe and Guy Harris
@@ -445,7 +445,11 @@ main(int argc, char *argv[])
       break;
 
     case 'h':
-      fprintf(stderr, "mergecap version %s%s\n", VERSION, CVSVERSION);
+      fprintf(stderr, "mergecap version %s"
+#ifdef CVSVERSION
+         " (cvs " CVSVERSION ")"
+#endif
+         "\n", VERSION);
       usage();
       exit(1);
       break;
index 16a969445845a26c2f93e4b5b4018cf3cf6b6984..ee0125dca7d9343a5e70232e5a3fa91eee2ddc0d 100644 (file)
@@ -1,6 +1,6 @@
 /* tethereal.c
  *
- * $Id: tethereal.c,v 1.218 2004/01/16 20:03:10 jmayer Exp $
+ * $Id: tethereal.c,v 1.219 2004/01/18 01:41:13 obiot Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -236,7 +236,11 @@ print_usage(gboolean print_ver)
   int i;
 
   if (print_ver) {
-    fprintf(stderr, "This is GNU t%s %s%s\n%s\n%s\n", PACKAGE, VERSION, CVSVERSION,
+    fprintf(stderr, "This is GNU t" PACKAGE " " VERSION
+#ifdef CVSVERSION
+       " (cvs " CVSVERSION ")"
+#endif
+       "\n%s\n%s\n",
        comp_info_str->str, runtime_info_str->str);
   }
 #ifdef HAVE_LIBPCAP
@@ -1197,8 +1201,12 @@ main(int argc, char *argv[])
        }
        break;
       case 'v':        /* Show version and exit */
-        printf("t%s %s%s\n%s\n%s\n", PACKAGE, VERSION, CVSVERSION, comp_info_str->str,
-               runtime_info_str->str);
+        printf("t" PACKAGE " " VERSION
+#ifdef CVSVERSION
+           " (cvs " CVSVERSION ")"
+#endif
+           "\n%s\n%s\n",
+           comp_info_str->str, runtime_info_str->str);
         exit(0);
         break;
       case 'w':        /* Write to capture file xxx */