Subversion Repositories Kolibri OS

Rev

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

Rev 7746 Rev 7750
Line 4... Line 4...
4
	int   i;
4
	int   i;
Line 5... Line 5...
5
	
5
	
Line 6... Line 6...
6
	if (!tagparam) return false;
6
	if (!tagparam) return false;
-
 
7
 
7
 
8
	if (debug_mode) {
8
	if (debug_mode) {
9
		debug("tag: "); debugln(#tag);
Line 9... Line 10...
9
		debug("tagparam: "); debugln(#tagparam);
10
		debug("tagparam: "); debugln(#tagparam);
Line 21... Line 22...
21
		quotes = tagparam[i];
22
		quotes = tagparam[i];
22
		tagparam[i] = '\0'; i--;
23
		tagparam[i] = '\0'; i--;
Line 23... Line 24...
23
 
24
 
24
		//find VAL start and copy
25
		//find VAL start and copy
25
		i = strrchr(#tagparam, quotes);
26
		i = strrchr(#tagparam, quotes);
26
		strlcpy(#val, #tagparam + i, sizeof(val));
27
		strlcpy(#val, #tagparam + i, sizeof(val)-1);
Line 27... Line 28...
27
		tagparam[i] = '\0'; i--;
28
		tagparam[i] = '\0'; i--;
28
 
29
 
29
		//find ATTR end
30
		//find ATTR end
Line 36... Line 37...
36
		//already have
37
		//already have
Line 37... Line 38...
37
 
38
 
38
		//find VAL start and copy
39
		//find VAL start and copy
39
		while (i > 0) && (tagparam[i] != '=') i--;
40
		while (i > 0) && (tagparam[i] != '=') i--;
40
		i++;
41
		i++;
41
		strlcpy(#val, #tagparam + i, sizeof(val));
42
		strlcpy(#val, #tagparam + i, sizeof(val)-1);
Line 42... Line 43...
42
		tagparam[i] = '\0';
43
		// tagparam[i] = '\0';
43
 
44
 
44
		//find ATTR end
45
		//find ATTR end
Line 45... Line 46...
45
		//already have
46
		//already have
46
	}
47
	}
47
 
48
 
48
	//find ATTR start and copy
49
	//find ATTR start and copy
Line -... Line 50...
-
 
50
	while (i>0) && (!__isWhite(tagparam[i])) i--;
-
 
51
	strlcpy(#attr, #tagparam + i + 1, sizeof(attr)-1);
-
 
52
	tagparam[i] = '\0';
-
 
53
 
-
 
54
	//fix case: src=./images/KolibriOS_logo2.jpg?sid=e8ece8b38b
-
 
55
	i = strchr(#attr,'=');
-
 
56
	if (!quotes) && (i) {
49
	while (i>0) && (!__isWhite(tagparam[i])) i--;
57
		strlcpy(#val, i+1, sizeof(val)-1);
Line 50... Line 58...
50
	strlcpy(#attr, #tagparam + i + 1, sizeof(attr));
58
		ESBYTE[i+1] = '\0';
51
	tagparam[i] = '\0';
-
 
52
 
59
	}
53
	strlwr(#attr);
-
 
54
 
-
 
55
	if (debug_mode) {
60
 
56
		if (quotes) {
-
 
57
			debug("quote: "); debugch(quotes); debugln(" ");
-
 
58
		}
61
	strlwr(#attr);
59
		else {
62
 
Line 60... Line 63...
60
			debugln("unquoted text");
63
	if (debug_mode) {
61
		}
64
		debug("val: "); debugln(#val);