--- cygpath.cc-orig Sun Feb 24 13:28:27 2002 +++ cygpath.cc Wed Feb 27 14:32:51 2002 @@ -1,5 +1,5 @@ /* cygpath.cc -- convert pathnames between Windows and Unix format - Copyright 1998-2002 Red Hat, Inc. + Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc. This file is part of Cygwin. @@ -21,6 +21,8 @@ details. */ #include #include +static const char version[] = "$Revision: 1.13 $"; + static char *prog_name; static char *file_arg; static char *close_arg; @@ -231,6 +233,28 @@ doit (char *filename) puts (buf); } +static void +print_version () +{ + const char *v = strchr (version, ':'); + int len; + if (!v) + { + v = "?"; + len = 1; + } + else + { + v += 2; + len = strchr (v, ' ') - v; + } + printf ("\ +cygpath (cygwin) %.*s\n\ +Path Conversion Utility\n\ +Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.\n\ +Compiled on %s", len, v, __DATE__); +} + int main (int argc, char **argv) { @@ -257,6 +281,7 @@ main (int argc, char **argv) options_from_file_flag = 0; allusers_flag = 0; output_flag = 0; + o=0; while ((c = getopt_long (argc, argv, (char *) "hac:f:opsSuvwWiDPA", long_options, (int *) NULL)) != EOF) { @@ -341,8 +366,7 @@ main (int argc, char **argv) break; case 'v': - printf ("Cygwin path conversion version 1.2\n"); - printf ("Copyright 1998-2002 Red Hat, Inc.\n"); + print_version(); exit (0); default: