2 * Copyright (C) 1986-2005 The Free Software Foundation, Inc.
4 * Portions Copyright (C) 1998-2005 Derek Price, Ximbiot <http://ximbiot.com>,
7 * Portions Copyright (C) 1994 david d `zoo' zuhn
8 * Portions Copyright (C) 1992, Brian Berliner and Jeff Polk
9 * Portions Copyright (C) 1989-1992, Brian Berliner
11 * You may distribute under the terms of the GNU General Public License as
12 * specified in the README file that comes with this CVS source distribution.
14 * version.c - the CVS version number
21 char *config_string = " (client/server)\n";
23 char *config_string = " (client)\n";
27 char *config_string = " (server)\n";
29 char *config_string = "\n";
35 static const char *const version_usage[] =
44 * Output a version string for the client and server.
46 * This function will output the simple version number (for the '--version'
47 * option) or the version numbers of the client and server (using the 'version'
58 usage (version_usage);
60 if (current_parsed_root && current_parsed_root->isremote)
61 (void) fputs ("Client: ", stdout);
63 /* Having the year here is a good idea, so people have
64 some idea of how long ago their version of CVS was
66 (void) fputs (PACKAGE_STRING, stdout);
67 (void) fputs (config_string, stdout);
70 if (current_parsed_root && current_parsed_root->isremote)
72 (void) fputs ("Server: ", stdout);
74 if (supported_request ("version"))
75 send_to_server ("version\012", 0);
78 send_to_server ("noop\012", 0);
79 fputs ("(unknown)\n", stdout);
81 err = get_responses_and_close ();