diff options
Diffstat (limited to 'contrib/cvs/src/version.c')
-rw-r--r-- | contrib/cvs/src/version.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/contrib/cvs/src/version.c b/contrib/cvs/src/version.c index c8273fb..5070615 100644 --- a/contrib/cvs/src/version.c +++ b/contrib/cvs/src/version.c @@ -12,7 +12,7 @@ #include "cvs.h" -char *version_string = "Concurrent Versions System (CVS) 1.11"; +char *version_string = "Concurrent Versions System (CVS) 1.11.1p1"; #ifdef CLIENT_SUPPORT #ifdef SERVER_SUPPORT @@ -28,12 +28,23 @@ char *config_string = "\n"; #endif #endif + + static const char *const version_usage[] = { "Usage: %s %s\n", NULL }; + + +/* + * Output a version string for the client and server. + * + * This function will output the simple version number (for the '--version' + * option) or the version numbers of the client and server (using the 'version' + * command). + */ int version (argc, argv) int argc; @@ -45,7 +56,7 @@ version (argc, argv) usage (version_usage); #ifdef CLIENT_SUPPORT - if (client_active) + if (current_parsed_root && current_parsed_root->isremote) (void) fputs ("Client: ", stdout); #endif @@ -56,7 +67,7 @@ version (argc, argv) (void) fputs (config_string, stdout); #ifdef CLIENT_SUPPORT - if (client_active) + if (current_parsed_root && current_parsed_root->isremote) { (void) fputs ("Server: ", stdout); start_server (); |