`cygpath --version` missing a newline
Igor Pechtchanski
pechtcha@cs.nyu.edu
Thu Sep 12 20:39:00 GMT 2002
Hi,
`cygpath --version` is missing a trailing newline. I'm attaching a patch.
This probably doesn't merit a ChangeLog entry, but I'm providing one
anyway, feel free to disregard it. I also took the opportunity to factor
out the short options array into a global variable. I can split this into
two separate patches, if necessary.
Igor
2002-09-12 Igor Pechtchanski <pechtcha@cs.nyu.edu>
* cygpath.cc (options) New global variable.
(main) Make short options global for easier change.
(print_version) Add a missing newline.
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
It took the computational power of three Commodore 64s to fly to the moon.
It takes a 486 to run Windows 95. Something is wrong here. -- SC sig file
-------------- next part --------------
Index: cygpath.cc
===================================================================
RCS file: /cvs/src/src/winsup/utils/cygpath.cc,v
retrieving revision 1.22
diff -u -p -r1.22 cygpath.cc
--- cygpath.cc 23 Aug 2002 15:46:00 -0000 1.22
+++ cygpath.cc 13 Sep 2002 03:36:19 -0000
@@ -57,6 +57,8 @@ static struct option long_options[] = {
{0, no_argument, 0, 0}
};
+static char options[] = "ac:df:hilmopst:uvwADHPSW";
+
static void
usage (FILE * stream, int status)
{
@@ -534,7 +536,8 @@ print_version ()
cygpath (cygwin) %.*s\n\
Path Conversion Utility\n\
Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.\n\
-Compiled on %s", len, v, __DATE__);
+Compiled on %s\n\
+", len, v, __DATE__);
}
int
@@ -562,7 +565,7 @@ main (int argc, char **argv)
options_from_file_flag = 0;
allusers_flag = 0;
output_flag = 0;
- while ((c = getopt_long (argc, argv, (char *) "ac:df:hilmopst:uvwADHPSW",
+ while ((c = getopt_long (argc, argv, options,
long_options, (int *) NULL)) != EOF)
{
switch (c)
More information about the Cygwin-patches
mailing list