Subversion Repositories Kolibri OS

Rev

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

Rev 6021 Rev 7163
Line 1... Line 1...
1
int UrlIsAbsolute(dword in)
1
int UrlIsAbsolute(dword in)
2
{
2
{
3
	if(!strncmp(in,"http:",5)) return true;
3
	if(!strncmp(in,"http:",5)) return true;
4
	if(!strncmp(in,"https:",6)) return true;
4
	if(!strncmp(in,"https:",6)) return true;
-
 
5
	if(!strncmp(in,"file:",5)) return true;
5
	if(!strncmp(in,"mailto:",7)) return true;
6
	if(!strncmp(in,"mailto:",7)) return true;
6
	if(!strncmp(in,"ftp:",4)) return true;
7
	if(!strncmp(in,"ftp:",4)) return true;
7
	if(!strncmp(in,"WebView:",8)) return true;
8
	if(!strncmp(in,"WebView:",8)) return true;
8
	if(!strncmp(in,"/sys/",5)) return true;
9
	if(!strncmp(in,"/sys/",5)) return true;
9
	if(!strncmp(in,"/hd/",4)) return true;
10
	if(!strncmp(in,"/hd/",4)) return true;
Line 29... Line 30...
29
	}
30
	}
30
 
31
 
Line 31... Line 32...
31
	if (UrlIsAbsolute(in_URL)) return;
32
	if (UrlIsAbsolute(in_URL)) return;
Line -... Line 33...
-
 
33
 
-
 
34
	IF (!strcmpn(in_URL,"//", 2)) 
-
 
35
	{
-
 
36
		//strcpy(#newurl, "http:");
-
 
37
		//strcat(#newurl, in_URL);
-
 
38
		sprintf(#newurl, "http:%s", in_URL);
-
 
39
		strcpy(orig_URL, #newurl);
-
 
40
		return;
-
 
41
	}
32
	
42
	
33
	IF (!strcmpn(in_URL,"./", 2)) in_URL+=2;
43
	IF (!strcmpn(in_URL,"./", 2)) in_URL+=2;
34
	if (!http_transfer) 
44
	if (!http_transfer) 
35
	{
45
	{
36
		strcpy(#newurl, history.current());
46
		strcpy(#newurl, history.current());