2 * Copyright (c) 1994 david d `zoo' zuhn
3 * Copyright (c) 1994 Free Software Foundation, Inc.
4 * Copyright (c) 1992, Brian Berliner and Jeff Polk
5 * Copyright (c) 1989-1992, Brian Berliner
7 * You may distribute under the terms of the GNU General Public License as
8 * specified in the README file that comes with this CVS source distribution.
10 * version.c - the CVS version number
17 char *config_string = " (client/server)\n";
19 char *config_string = " (client)\n";
23 char *config_string = " (server)\n";
25 char *config_string = "\n";
31 static const char *const version_usage[] =
40 * Output a version string for the client and server.
42 * This function will output the simple version number (for the '--version'
43 * option) or the version numbers of the client and server (using the 'version'
54 usage (version_usage);
57 if (current_parsed_root && current_parsed_root->isremote)
58 (void) fputs ("Client: ", stdout);
61 /* Having the year here is a good idea, so people have
62 some idea of how long ago their version of CVS was
64 (void) fputs (PACKAGE_STRING, stdout);
65 (void) fputs (config_string, stdout);
68 if (current_parsed_root && current_parsed_root->isremote)
70 (void) fputs ("Server: ", stdout);
72 if (supported_request ("version"))
73 send_to_server ("version\012", 0);
76 send_to_server ("noop\012", 0);
77 fputs ("(unknown)\n", stdout);
79 err = get_responses_and_close ();