873fc290d5
1. possibility to open HTTPS sites via gate.aspero.pro (invisible for user), not working for files 2. rewrite parse tag function to fix broken URLs on page in some cases ("/user" instead of "/user/") 3. fix hand cursor appearance, fix progress bar on page load 4. load homepage on submitting empty url in adressbox 5. F12 - debug on, F11 - old tag parser on 6. unify page/file downloading code git-svn-id: svn://kolibrios.org@7282 a494cfbc-eb01-0410-851d-a64ba20cac60
91 lines
1.4 KiB
C
91 lines
1.4 KiB
C
char *unicode_tags[]={
|
||
"nbsp", " ",
|
||
"#38", " ",
|
||
"#160", " ",
|
||
|
||
"copy", "(c)",
|
||
"#169", "(c)",
|
||
|
||
"trade", "[TM]",
|
||
|
||
"reg", "(r)",
|
||
"#174", "(r)",
|
||
|
||
"bdquo", ",,",
|
||
|
||
"amp", "&",
|
||
"#38", "&",
|
||
|
||
"lt", "<",
|
||
"#60", "<",
|
||
|
||
"gt", ">",
|
||
"#62", ">",
|
||
|
||
"minus", "-",
|
||
"ndash", "-",
|
||
"mdash", "-", //--
|
||
"#8722", "-",
|
||
"#8211", "-",
|
||
"#151", "-",
|
||
"#149", "-",
|
||
"#9642", "-", //square in the middle of the line
|
||
|
||
"rsquo", "'",
|
||
"#39", "'",
|
||
"#96", "'",
|
||
"#8217", "'",
|
||
|
||
"quot", "\"",
|
||
"#34", "\"",
|
||
"ldquo", "\"",
|
||
"rdquo", "\"",
|
||
"#8222", "\"",
|
||
"#8221", "\"",
|
||
|
||
"laquo", "<<",
|
||
"#171", "<<",
|
||
"raquo", ">>",
|
||
"#187", ">>",
|
||
|
||
"uarr", "\24",
|
||
"darr", "\25",
|
||
"rarr", "\26",
|
||
"larr", "\27",
|
||
|
||
"#1028", "\242",
|
||
"#1030", "I",
|
||
"#1031", "\244",
|
||
|
||
"#8470", "N",
|
||
"bull", "\31", //âîîáùå çäåñü òî÷êà
|
||
"percnt","%",
|
||
|
||
0};
|
||
|
||
|
||
byte unicode_chars[] = "€<EFBFBD>‚ƒ„…†‡ˆ‰Š‹Œ<EFBFBD>Ž<EFBFBD><EFBFBD>‘’“”•–—˜™š›œ<EFBFBD>žŸ ¡¢£¤¥¦§¨©ª«¬®¯àáâãäåæçèéêëìíîïðñh£\243i\105\244\0";
|
||
|
||
unsigned char GetUnicodeSymbol()
|
||
{
|
||
int j;
|
||
|
||
for (j=0; unicode_tags[j]!=0; j+=2;)
|
||
{
|
||
if (!strcmp(#tag, unicode_tags[j]))
|
||
{
|
||
strcat(#line, unicode_tags[j+1]);
|
||
return NULL;
|
||
}
|
||
}
|
||
|
||
j = atoi(#tag + 1) - 1040;
|
||
if (tag[1] == '1') && (j>=0) && (j<=72) && (strlen(#tag) == 5)
|
||
{
|
||
return unicode_chars[j];
|
||
}
|
||
|
||
strcat(#line,#tag); //âûâîäèì íà ýêðàí íåîáðàáîòàííûé òåã, òàê áðàóçåðû çà÷åì-òî äåëàþò
|
||
return NULL;
|
||
}
|