Subversion Repositories Kolibri OS

Rev

Rev 7752 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7752 Rev 7755
Line 1... Line 1...
1
void GetAbsoluteURL(dword in_URL)
1
dword GetAbsoluteURL(dword in_URL)
2
{
2
{
3
	int i;
3
	int i;
4
	dword orig_URL = in_URL;
4
	dword orig_URL = in_URL;
5
	char newurl[URL_SIZE];
5
	char newurl[URL_SIZE+1];
Line 6... Line 6...
6
 
6
 
7
	while (i=strstr(in_URL, "&"))
7
	while (i=strstr(in_URL, "&"))
8
	{
8
	{
9
		strcpy(i+1, i+5);
9
		strcpy(i+1, i+5);
Line 10... Line 10...
10
	}
10
	}
Line 11... Line 11...
11
 
11
 
12
	if (check_is_the_url_absolute(in_URL)) return;
12
	if (check_is_the_url_absolute(in_URL)) return orig_URL;
13
 
13
 
14
	IF (!strncmp(in_URL,"//", 2)) 
14
	IF (!strncmp(in_URL,"//", 2)) 
15
	{
15
	{
16
		strcpy(#newurl, "http:");
16
		strcpy(#newurl, "http:");
17
		strcat(#newurl, in_URL);
17
		strcat(#newurl, in_URL);
Line 18... Line 18...
18
		strcpy(orig_URL, #newurl);
18
		strcpy(orig_URL, #newurl);
19
		return;
19
		return orig_URL;
20
	}
20
	}
Line 53... Line 53...
53
	if (newurl[strlen(#newurl)-1]<>'/') strcat(#newurl, "/"); 
53
	if (newurl[strlen(#newurl)-1]<>'/') strcat(#newurl, "/"); 
Line 54... Line 54...
54
	
54
	
55
	strcat(#newurl, in_URL);
55
	strcat(#newurl, in_URL);
-
 
56
	strcpy(orig_URL, #newurl);
56
	strcpy(orig_URL, #newurl);
57
	return orig_URL;