Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 7281 → Rev 7282

/programs/cmm/TWB/absolute_url.h
1,24 → 1,4
 
int UrlIsAbsolute(dword in)
{
if(!strncmp(in,"http:",5)) return true;
if(!strncmp(in,"https:",6)) return true;
if(!strncmp(in,"file:",5)) return true;
if(!strncmp(in,"mailto:",7)) return true;
if(!strncmp(in,"ftp:",4)) return true;
if(!strncmp(in,"WebView:",8)) return true;
if(!strncmp(in,"/sys/",5)) return true;
if(!strncmp(in,"/hd/",4)) return true;
if(!strncmp(in,"/fd/",4)) return true;
if(!strncmp(in,"/rd/",4)) return true;
if(!strncmp(in,"/tmp/",5)) return true;
if(!strncmp(in,"/cd/",4)) return true;
if(!strncmp(in,"/bd/",4)) return true;
if(!strncmp(in,"/usbhd/",7)) return true;
if(!strncmp(in,"/kolibrios/",11)) return true;
return false;
}
 
void GetAbsoluteURL(dword in_URL)
{
int i;
30,7 → 10,7
strcpy(i+1, i+5);
}
 
if (UrlIsAbsolute(in_URL)) return;
if (check_is_the_url_absolute(in_URL)) return;
 
IF (!strcmpn(in_URL,"//", 2))
{
/programs/cmm/TWB/links.h
88,6 → 88,7
return false;
}
if (active==i) return false;
CursorPointer.Load(#CursorFile);
CursorPointer.Set();
if (links[active].underline) DrawBar(links[active].x, -WB1.list.first + links[active].y
+ links[active].h, links[active].w, links[active].underline_h, link_color_inactive);
/programs/cmm/TWB/parce_tag.h
1,5 → 1,82
unsigned int GetNextParam()
bool GetNextParam() {
if (!old_tag_parser_mode)
return GetNextParam_NEW();
else
return GetNextParam_OLD();
}
 
bool GetNextParam_NEW()
{
byte quotes = NULL;
int i;
if (!tagparam) return false;
 
if (debug_mode) {
debug("tagparam: "); debugln(#tagparam);
}
i = strlen(#tagparam) - 1;
 
if (tagparam[i] == '/') i--;
 
while (i>0) && (__isWhite(tagparam[i])) i--;
 
if (tagparam[i] == '"') || (tagparam[i] == '\'')
{
//find VAL end
quotes = tagparam[i];
tagparam[i] = '\0'; i--;
 
//find VAL start and copy
i = strrchr(#tagparam, quotes);
strlcpy(#val, #tagparam + i, sizeof(val));
tagparam[i] = '\0'; i--;
 
//find ATTR end
while (i > 0) && (tagparam[i] != '=') i--;
tagparam[i+1] = '\0';
}
else
{
//find VAL end
//already have
 
//find VAL start and copy
while (i > 0) && (tagparam[i] != '=') i--;
i++;
strlcpy(#val, #tagparam + i, sizeof(val));
tagparam[i] = '\0';
 
//find ATTR end
//already have
}
 
//find ATTR start and copy
while (i>0) && (!__isWhite(tagparam[i])) i--;
strlcpy(#attr, #tagparam + i + 1, sizeof(attr));
tagparam[i] = '\0';
 
strlwr(#attr);
 
if (debug_mode) {
if (quotes) {
debug("quote: "); debugch(quotes); debugln(" ");
}
else {
debugln("unquoted text");
}
sprintf(#param, "val: %s\nattr: %s\n\n", #val, #attr);
debug(#param);
}
 
return true;
}
 
 
 
unsigned int GetNextParam_OLD()
{
byte kavichki=0;
int i = strlen(#tagparam) - 1;
30,7 → 107,7
 
FOR ( ; ((tagparam[i] <>' ') && (i > 0); i--)
{
IF (tagparam[i] == '=') //äåðçêàÿ çàãëóøêà
IF (tagparam[i] == '=') //dirty fix (kludge)
tagparam[i + 1] = 0x00;
}
strlcpy(#attr, #tagparam + i + 1, sizeof(attr));
/programs/cmm/TWB/unicode_tags.h
58,7 → 58,7
"#1031", "\244",
 
"#8470", "N",
"bull", "-", //âîîáùå çäåñü òî÷êà
"bull", "\31", //âîîáùå çäåñü òî÷êà
"percnt","%",
 
0};