--- site.cc.old 2004-08-29 22:29:40.000000000 +0530 +++ site.cc 2004-10-12 13:27:57.479174400 +0530 @@ -100,8 +100,15 @@ SiteSetting::save() } void -site_list_type::init (String const &newurl) +site_list_type::init (String const &newsite) { + /* extract the components of the site */ + /* ftp://sunsite.dk/mirrors/cygwin;sunsite.dk;Europe;Denmark */ + String newurl = String(strtok(newsite.cstr(), ";")); + strtok(NULL, ";"); /* domain value not used; skip */ + char *area = strtok(NULL, ";"); + char *location = strtok(NULL, ";"); + url = newurl; char *dots = newurl.cstr(); @@ -113,8 +120,11 @@ site_list_type::init (String const &newu *dot = 0; } displayed_url = String (dots); + if (area) { + String loc = String(" (") + area + ", " + location + ")"; + displayed_url += loc; /* Display location info also */ + } - dot = dots + strlen (dots); char *dpsave, *dp = new char[2 * newurl.size() + 3]; dpsave = dp; @@ -138,9 +148,9 @@ site_list_type::init (String const &newu delete[] dpsave; } -site_list_type::site_list_type (String const &newurl) +site_list_type::site_list_type (String const &newsite) { - init (newurl); + init (newsite); } site_list_type::site_list_type (site_list_type const &rhs) @@ -220,9 +230,6 @@ get_site_list (HINSTANCE h, HWND owner) *eol = 0; if (bol[0] != '#' && bol[0] > ' ') { - char *semi = strchr (bol, ';'); - if (semi) - *semi = 0; site_list_type newsite (bol); SiteList::iterator i = find (all_site_list.begin(), all_site_list.end(), newsite);