This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
{Patch} Setup: Tell where we're downloading from.
- From: Bas van Gompel <cygwin-apps dot buzz at bavag dot tmfweb dot nl>
- To: cygwin-apps at cygwin dot com
- Date: Tue, 8 Nov 2005 22:50:55 +0100 (MET)
- Subject: {Patch} Setup: Tell where we're downloading from.
- Organisation: Ehm...
- Reply-to: cygwin-apps mailing-list <cygwin-apps at cygwin dot com>
Hi,
Here is a patch to make setup tell where files are actually being
downloaded from.
ChangeLog-entry: (Please fix the <at>.)
2005-11-08 Bas van Gompel <patch-cygsup.buzz<at>bavag.tmfweb.nl>
* geturl.cc (init_dialog): Tell where file is downloaded from.
--- setup/geturl.cc 5 May 2005 22:48:35 -0000 2.25
+++ setup/geturl.cc 8 Nov 2005 20:10:35 -0000
@@ -66,16 +66,29 @@ init_dialog (String const &url, int leng
if (is_local_install)
return;
+ int n = 0;
+ char *buf;
+ char *first_component = buf = new_cstr_char_array (url);
+ for (char *ch = first_component; *ch && n < 3 ; ch++)
+ if (*ch == '/')
+ {
+ if (++n == 2)
+ first_component = ch + 1;
+ if (n == 3)
+ *ch = 0;
+ }
char const *last_component = url.c_str();
for (const char *ch = last_component; *ch; ch++)
if (*ch == '/' || *ch == '\\' || *ch == ':')
last_component = ch + 1;
max_bytes = length;
Progress.SetText1("Downloading...");
- Progress.SetText2(last_component);
+ Progress.SetText2((String (last_component) + " from " + first_component).c_str());
Progress.SetText3("Connecting...");
Progress.SetBar1(0);
start_tics = GetTickCount ();
+
+ delete [] buf;
}
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^re