This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
[Patch] cygcheck: warn about empty path-components
- From: Bas van Gompel <cygwin-patches dot buzz at bavag dot tmfweb dot nl>
- To: cygwin-patches at cygwin dot com
- Date: Tue, 5 Oct 2004 07:15:08 +0200 (MET DST)
- Subject: [Patch] cygcheck: warn about empty path-components
- Organisation: Ehm...
- Reply-to: Buzz <ngs at bavag dot tmfweb dot nl>
Hi,
This little patch makes cygcheck warn about empty path-components
(leading/trailing/double ':'/';' in $PATH).
ChangeLog-entry:
2004-10-05 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
* cygcheck.cc (dump_sysinfo): Warn about empty path-components.
--- src/winsup/utils/cygcheck.cc 4 Oct 2004 09:42:08 -0000 1.44
+++ src/winsup/utils/cygcheck.cc 5 Oct 2004 02:19:35 -0000
@@ -957,7 +957,10 @@ dump_sysinfo ()
while (1)
{
for (e = s; *e && *e != sep; e++);
- printf ("\t%.*s\n", e - s, s);
+ if (e-s)
+ printf ("\t%.*s\n", e - s, s);
+ else
+ puts ("\tWarning: Empty path-component");
count_path_items++;
if (!*e)
break;
L8r,
Buzz.
--
) | | ---/ ---/ Yes, this | This message consists of true | I do not
-- | | / / really is | and false bits entirely. | mail for
) | | / / a 72 by 4 +-------------------------------+ any1 but
-- \--| /--- /--- .sigfile. | |perl -pe "s.u(z)\1.as." | me. 4^r