]> git.puffer.fish Git - mirror/frr.git/commitdiff
Small copyright string and hostname related cleanup.
authorhasso <hasso>
Tue, 19 Oct 2004 20:40:08 +0000 (20:40 +0000)
committerhasso <hasso>
Tue, 19 Oct 2004 20:40:08 +0000 (20:40 +0000)
lib/ChangeLog
lib/Makefile.am
lib/command.c
lib/command.h
lib/print_version.c [deleted file]
lib/version.h.in

index d0a33d40ae495bd0d7c069bf8acecb8bb14d7c1f..8551ad25bbdb2067be421782f1b29f2f8031c5a4 100644 (file)
@@ -1,3 +1,11 @@
+2004-10-19 Hasso Tepper <hasso at quagga.net>
+
+       * version.h.in: Define copyright string QUAGGA_COPYRIGHT.
+       * print_version.c: Remove. print_version () function moved to
+         command.[c|h].
+       * command.c: Use QUAGGA_COPYRIGHT.
+       * Makefile.am: Remove useless version.c and print_version.c files.
+
 2004-10-19 Andrew J. Schorr <aschorr@telemetry-investments.com>
 
        * zclient.c: (zebra_interface_address_read) If the destination address
index 9cb25f776ed66ed6bdcc8c1bdf8c5c668b973c0b..b4d538bdad304a196b491783db0799a0664a3861 100644 (file)
@@ -7,8 +7,8 @@ lib_LTLIBRARIES = libzebra.la
 libzebra_la_LDFLAGS = -version 0:0:0
 
 libzebra_la_SOURCES = \
-       version.c network.c pid_output.c getopt.c getopt1.c daemon.c \
-       print_version.c checksum.c vector.c linklist.c vty.c command.c \
+       network.c pid_output.c getopt.c getopt1.c daemon.c \
+       checksum.c vector.c linklist.c vty.c command.c \
        sockunion.c prefix.c thread.c if.c memory.c buffer.c table.c hash.c \
        filter.c routemap.c distribute.c stream.c str.c log.c plist.c \
        zclient.c sockopt.c smux.c md5.c if_rmap.c keychain.c privs.c \
@@ -27,6 +27,3 @@ pkginclude_HEADERS = \
 
 EXTRA_DIST = regex.c regex-gnu.h
 
-version.c: Makefile
-       echo '' >version.c
-       echo 'const char *host_name = "$(host_alias)";' >>version.c
index 4495d2213c68e186d507a78347c12cfe988ccf00..fc115d95ed9abf502ac15fa62151fa3e99bd3b0c 100644 (file)
@@ -36,13 +36,6 @@ vector cmdvec;
 /* Host information structure. */
 struct host host;
 
-/* Default motd string. */
-const char *default_motd = 
-"\r\n\
-Hello, this is " QUAGGA_PROGNAME " (version " QUAGGA_VERSION ").\r\n\
-Copyright 1996-2004 Kunihiro Ishiguro, et al.\r\n\
-\r\n";
-
 /* Standard command node structures. */
 struct cmd_node auth_node =
 {
@@ -74,6 +67,21 @@ struct cmd_node config_node =
   "%s(config)# ",
   1
 };
+
+/* Default motd string. */
+const char *default_motd =
+"\r\n\
+Hello, this is " QUAGGA_PROGNAME " (version " QUAGGA_VERSION ").\r\n\
+" QUAGGA_COPYRIGHT "\r\n\
+\r\n";
+
+void
+print_version (const char *progname)
+{
+  printf ("%s version %s (%s)\n", progname, QUAGGA_VERSION, host.name);
+  printf ("%s\n", QUAGGA_COPYRIGHT);
+}
+
 \f
 /* Utility function to concatenate argv argument into a single string
    with inserting ' ' character between each argument.  */
@@ -2397,10 +2405,8 @@ DEFUN (show_version,
        SHOW_STR
        "Displays zebra version\n")
 {
-  vty_out (vty, "Quagga %s (%s).%s", QUAGGA_VERSION,
-          host_name,
-          VTY_NEWLINE);
-  vty_out (vty, "Copyright 1996-2002, Kunihiro Ishiguro.%s", VTY_NEWLINE);
+  vty_out (vty, "Quagga %s (%s).%s", QUAGGA_VERSION, host.name, VTY_NEWLINE);
+  vty_out (vty, "%s%s", QUAGGA_COPYRIGHT, VTY_NEWLINE);
 
   return CMD_SUCCESS;
 }
@@ -2412,7 +2418,7 @@ DEFUN (config_help,
        "Description of the interactive help system\n")
 {
   vty_out (vty, 
-          "Zebra VTY provides advanced help feature.  When you need help,%s\
+          "Quagga VTY provides advanced help feature.  When you need help,%s\
 anytime at the command line please press '?'.%s\
 %s\
 If nothing matches, the help list will be empty and you must backup%s\
index 8faf534d0ac4b5b9aad9c491221829e54c662206..8a17bbb44a7b28404fa9d0f23329c683f13be51e 100644 (file)
@@ -309,4 +309,6 @@ int config_help (struct cmd_element *, struct vty *, int, const char *[]);
 char *host_config_file ();
 void host_config_set (char *);
 
+void print_version (const char *);
+
 #endif /* _ZEBRA_COMMAND_H */
diff --git a/lib/print_version.c b/lib/print_version.c
deleted file mode 100644 (file)
index 3d8e679..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Print version function.
- * Copyright (C) 1997, 98 Kunihiro Ishiguro
- *
- * This file is part of GNU Zebra.
- *
- * GNU Zebra is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the
- * Free Software Foundation; either version 2, or (at your option) any
- * later version.
- *
- * GNU Zebra is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING.  If not, write to the Free
- * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.  
- */
-
-#include <zebra.h>
-
-#include <lib/version.h>
-
-void
-print_version (const char *progname)
-{
-  printf ("%s version %s (%s)\n", progname, QUAGGA_VERSION, host_name);
-  printf ("Copyright 1996-2001, Kunihiro Ishiguro\n");
-}
index e8404b2709a59fbd32354329d3441fccb75df976..f63f1940890e9cc06ca4a24d6d782fa9b54c0af3 100644 (file)
@@ -30,9 +30,8 @@
 
 #define QUAGGA_URL "http://www.quagga.net"
 
-extern char *host_name;
+#define QUAGGA_COPYRIGHT "Copyright 1996-2004 Kunihiro Ishiguro, et al."
 
-void print_version (const char *);
 pid_t pid_output (const char *);
 pid_t pid_output_lock (const char *);