Subversion Repositories Kolibri OS

Compare Revisions

No changes between revisions

Regard whitespace Rev 3066 → Rev 3067

/programs/cmm/browser/include/acid_0.1.htm
0,0 → 1,131
<!--doctype html public "-//w3c//dtd html 4.0 transitional//ru"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>Òåñò Acid 0.1</title>
</head>
 
<body bgcolor="#000000" link="#0066FF" text="#FFFFFF">
 
<img src="background.gif" alt="background">
 
<b>Ýòî òåñòîâàÿ ñòðàíèöà äëÿ ïðîâåðêè HTML Viewer</b><br />
<br />
Ýòà ïðîãðàììà ïîääåðæèâàåò âñå ïîïóëÿðíûå êîäèðîâêè: cp1251, koi-8, cp866, Unicode.<br><br>
 
<b>
<font color="#FF0000">C</font>
<font color="#FFC005">r</font>
<font color="#F6F574">e</font>
<font color="#9EFC36">a</font>
<font color="#29FDFD">t</font>
<font color="#36A8FC">e</font>
<font color="blueviolet">d </font>
<font color="#C911FF">b</font>
<font color= #C911FF >y </font>
<font color="#C911FF">L</font>
<font color="#36A8FC">e</font>
<font color="#29FDFD">e</font>
<font color="#9EFC36">n</font>
<font color="#FFC005">c</font>
<font color="red">y</font><br>
</b>
Æèòîìèð 2008-2012
 
<p>
Íåáîëüøîé ñïèñîê:<ol>
<li><q>Ýòîò òåêñò â êàâû÷êàõ</q></li>
<li><u>Ýòî ïîä÷åðêíóòûé òåêñò</u></li>
<li><s>Ýòî ïåðå÷åðêíóòûé òåêñò</s></li>
<li><i>Ýòî íàêëîííûé òåêñò</i></li>
<li><strong>Ýòî òåêñò ñ óñèëåííûì âûäåëåíèåì</strong></li>
<li><b><u><s><font color="#6495ED">Êó÷à òåãîâ</font></s></u></b></ol>
</p>
<br>
 
<pre>
Àòü!
Äâà!
Òðè!
 
Àâòîð ñåãî òâîðåíèÿ íå èçâåñòåí.
 
</pre>
<!--ýòîãî òåêñòà çäåñü <íåò>-->
 
<font color=#777777>
<a href='/SYS/index.htm'>Index.htm</a><br>
<a href='./index.htm'>Index.htm</a><br>
<a href='/sys/index.htm'>Íåçàêðûòûé òåã à - Index.htm<br>
<a href="/sys/kernel.mnt">Kernel.mnt</a><br>
<a href="index.htm#2.1.4">index.htm#2.1.4</a><br>
<a href="http://bash.im">http://bash.im</a><br>
<a href="mailto:leency@mail.ru">Mail to leency</a><br>
<a href="#2.1.4">#2.1.4</a><br>
<a href="background.gif">Ôîíîâàÿ êàðòèíêà</a><br>
</font>
<a href='1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
1111111111111111111111111111111111111111111111111111111111111111
'>Î÷åíü äëèííûé àäðåñ ñòðîêè</a><br>
 
 
 
<hr color="#758999">
 ýòîì òåêñòå åñòü ïåðåõîä íà ñëåäóþùóþ ñòðîêó, íî áðàóçåð
åãî äîëæåí ïðîèãíîðèðîâàòü. Åùå ìíîãî ïðîáåëîâ. À òóò åñòü
òàáû. Êîå-êàêèå ñèìâîëû: &quot; &amp; &lt; &gt; &#149; &nbsp; &copy; &reg; &bdquo; &ldquo; &#151; ¯æà÷îê ³íøîãî áîêó ð. ªâôðàò ç'¿â ´ðóíò òà ºâðåéñüêèé ´åðáàëàéô.
<hr color="grey">
 
</body>
</html>
/programs/cmm/browser/include/colors.h
0,0 → 1,193
//Íàäî áóäåò ïåðåäåëàòü íà "äåðåâî ïîèñêà" èëè, ÷òî-òî ïîäîáíîå
//áóäåò íå÷èòàáåëüíî, çàòî ìåíüøå è áûñòåå
 
struct color_spec {
char *name;
int rgb;
};
 
struct color_spec color_specs[] = {
"aliceblue", 0xF0F8FF,
"antiquewhite", 0xFAEBD7,
"aqua", 0x00FFFF,
"aquamarine", 0x7FFFD4,
"azure", 0xF0FFFF,
"beige", 0xF5F5DC,
"bisque", 0xFFE4C4,
"black", 0x000000,
"blanchedalmond",0xFFEBCD,
"blue", 0x0000FF,
"blueviolet", 0x8A2BE2,
"brown", 0xA52A2A,
"burlywood", 0xDEB887,
"cadetblue", 0x5F9EA0,
"chartreuse", 0x7FFF00,
"chocolate", 0xD2691E,
"coral", 0xFF7F50,
"cornflowerblue",0x6495ED,
"cornsilk", 0xFFF8DC,
"crimson", 0xDC143C,
"cyan", 0x00FFFF,
"darkblue", 0x00008B,
"darkcyan", 0x008B8B,
"darkgoldenrod", 0xB8860B,
"darkgray", 0xA9A9A9,
"darkgreen", 0x006400,
"darkkhaki", 0xBDB76B,
"darkmagenta", 0x8B008B,
"darkolivegreen",0x556B2F,
"darkorange", 0xFF8C00,
"darkorchid", 0x9932CC,
"darkred", 0x8B0000,
"darksalmon", 0xE9967A,
"darkseagreen", 0x8FBC8F,
"darkslateblue", 0x483D8B,
"darkslategray", 0x2F4F4F,
"darkturquoise", 0x00CED1,
"darkviolet", 0x9400D3,
"deeppink", 0xFF1493,
"deepskyblue", 0x00BFFF,
"dimgray", 0x696969,
"dodgerblue", 0x1E90FF,
"firebrick", 0xB22222,
"floralwhite", 0xFFFAF0,
"forestgreen", 0x228B22,
"fuchsia", 0xFF00FF,
"gainsboro", 0xDCDCDC,
"ghostwhite", 0xF8F8FF,
"gold", 0xFFD700,
"goldenrod", 0xDAA520,
"gray", 0x808080,
"green", 0x008000,
"greenyellow", 0xADFF2F,
"honeydew", 0xF0FFF0,
"hotpink", 0xFF69B4,
"indianred", 0xCD5C5C,
"indigo", 0x4B0082,
"ivory", 0xFFFFF0,
"khaki", 0xF0E68C,
"lavender", 0xE6E6FA,
"lavenderblush", 0xFFF0F5,
"lawngreen", 0x7CFC00,
"lemonchiffon", 0xFFFACD,
"lightblue", 0xADD8E6,
"lightcoral", 0xF08080,
"lightcyan", 0xE0FFFF,
"lightgoldenrodyellow", 0xFAFAD2,
"lightgreen", 0x90EE90,
"lightgrey", 0xD3D3D3,
"lightpink", 0xFFB6C1,
"lightsalmon", 0xFFA07A,
"lightseagreen", 0x20B2AA,
"lightskyblue", 0x87CEFA,
"lightslategray",0x778899,
"lightsteelblue",0xB0C4DE,
"lightyellow", 0xFFFFE0,
"lime", 0x00FF00,
"limegreen", 0x32CD32,
"linen", 0xFAF0E6,
"magenta", 0xFF00FF,
"maroon", 0x800000,
"mediumaquamarine",0x66CDAA,
"mediumblue", 0x0000CD,
"mediumorchid", 0xBA55D3,
"mediumpurple", 0x9370DB,
"mediumseagreen",0x3CB371,
"mediumslateblue",0x7B68EE,
"mediumspringgreen",0x00FA9A,
"mediumturquoise",0x48D1CC,
"mediumvioletred",0xC71585,
"midnightblue", 0x191970,
"mintcream", 0xF5FFFA,
"mistyrose", 0xFFE4E1,
"moccasin", 0xFFE4B5,
"navajowhite", 0xFFDEAD,
"navy", 0x000080,
"oldlace", 0xFDF5E6,
"olive", 0x808000,
"olivedrab", 0x6B8E23,
"orange", 0xFFA500,
"orangered", 0xFF4500,
"orchid", 0xDA70D6,
"palegoldenrod", 0xEEE8AA,
"palegreen", 0x98FB98,
"paleturquoise", 0xAFEEEE,
"palevioletred", 0xDB7093,
"papayawhip", 0xFFEFD5,
"peachpuff", 0xFFDAB9,
"peru", 0xCD853F,
"pink", 0xFFC0CB,
"plum", 0xDDA0DD,
"powderblue", 0xB0E0E6,
"purple", 0x800080,
"red", 0xFF0000,
"rosybrown", 0xBC8F8F,
"royalblue", 0x4169E1,
"saddlebrown", 0x8B4513,
"salmon", 0xFA8072,
"sandybrown", 0xF4A460,
"seagreen", 0x2E8B57,
"seashell", 0xFFF5EE,
"sienna", 0xA0522D,
"silver", 0xC0C0C0,
"skyblue", 0x87CEEB,
"slateblue", 0x6A5ACD,
"slategray", 0x708090,
"snow", 0xFFFAFA,
"springgreen", 0x00FF7F,
"steelblue", 0x4682B4,
"tan", 0xD2B48C,
"teal", 0x008080,
"thistle", 0xD8BFD8,
"tomato", 0xFF6347,
"turquoise", 0x40E0D0,
"violet", 0xEE82EE,
"wheat", 0xF5DEB3,
"white", 0xFFFFFF,
"whitesmoke", 0xF5F5F5,
"yellow", 0xFFFF00,
"yellowgreen", 0x9ACD32,
0};
 
dword StrToCol(char* htmlcolor)
{
dword j=1,
color=0,
textlen=0;
char ch=0x00;
 
if (ESBYTE[htmlcolor]<>'#') return text_colors[0];
 
textlen = strlen(htmlcolor);
 
if (textlen==7) || (textlen==4)
{
FOR (; j<textlen; j++)
{
ch=ESBYTE[htmlcolor+j];
IF ((ch>='0') && (ch<='9')) ch -= '0';
IF ((ch>='A') && (ch<='F')) ch -= 'A'-10;
IF ((ch>='a') && (ch<='f')) ch -= 'a'-10;
color = color*0x10 + ch;
if (textlen==4) color = color*0x10 + ch; //#abc ->> #aabbcc (ñëàâà âèêèïåäèè!!1)
}
return color;
}
return text_colors[0];
}
 
dword GetColor(char* color_str)
{
int ii;
 
if (ESBYTE[color_str] == '#')
return StrToCol(color_str);
else
for (ii=0; color_specs[ii].name!=0; ii++)
{
if (!strcmp(color_str, color_specs[ii].name)) return color_specs[ii].rgb;
}
 
return text_colors[0];
}
/programs/cmm/browser/include/history.h
0,0 → 1,59
struct UrlsHistory {
dword CurrentUrl();
void AddUrl();
byte GoBack();
byte GoForward();
};
 
UrlsHistory BrowserHistory;
 
struct path_string {
char Item[4096];
};
 
#define MAX_HISTORY_NUM 40
path_string history_list[MAX_HISTORY_NUM];
int history_num;
int history_current;
 
dword UrlsHistory::CurrentUrl()
{
return #history_list[history_current].Item;
}
 
void UrlsHistory::AddUrl() //òóò íóæåí ââîäèìûé ýëåìåíò - äëÿ óíèâåðñàëüíîñòè
{
int i;
if (history_num>0) && (!strcmp(#URL,#history_list[history_current].Item)) return;
 
if (history_current>=MAX_HISTORY_NUM-1)
{
history_current/=2;
for (i=0; i<history_current; i++;)
{
strcpy(#history_list[i].Item, #history_list[MAX_HISTORY_NUM-i].Item);
}
}
history_current++;
strcpy(#history_list[history_current].Item, #URL);
history_num=history_current;
}
 
 
byte UrlsHistory::GoBack()
{
if (history_current<=1) return 0;
history_current--;
strcpy(#URL, #history_list[history_current].Item);
return 1;
}
 
 
byte UrlsHistory::GoForward()
{
if (history_current==history_num) return 0;
history_current++;
strcpy(#URL, #history_list[history_current].Item);
return 1;
}
/programs/cmm/browser/include/menu_rmb.h
0,0 → 1,99
//Leency - 2012
 
#define ITEM_HEIGHT 18
#define ITEM_WIDTH 138
 
char *ITEMS_LIST[]={
"View in Tinypad F3",52,
"WIN F5",REFRESH,
"DOS Ctrl+D",04,
"KOI Ctrl+K",11,
"UTF Ctrl+U",21,
"Line breaks ON" ,01,
"Free image cache" ,02,
"TrueType fonts" ,05,
0};
 
 
proc_info MenuForm;
 
void menu_rmb()
{
mouse mm;
int items_num, items_cur;
int id1, key, i;
SetEventMask(100111b);
 
loop() switch(WaitEvent())
{
case evMouse:
mm.get();
 
GetProcessInfo(#MenuForm, SelfInfo);
id1=GetProcessSlot(MenuForm.ID);
if (id1<>GetActiveProcess()) ExitProcess();
id1=mm.y/ITEM_HEIGHT;
if (id1<0) || (id1+1>items_num) || (mm.x<0) || (mm.x>ITEM_WIDTH) break;
if (mm.lkm) || (mm.pkm)
{
WB1.Scan(ITEMS_LIST[items_cur*2+1]);
ExitProcess();
}
if (items_cur<>id1)
{
items_cur=id1;
goto _ITEMS_DRAW;
}
break;
case evButton:
id1=GetButtonID()-10;
WB1.Scan(ITEMS_LIST[id1*2+1]);
ExitProcess();
break;
case evKey:
key = GetKey();
if (key==27) ExitProcess();
if (key==178) && (items_cur)
{
items_cur--;
goto _ITEMS_DRAW;
}
if (key==177) && (items_cur+1<items_num)
{
items_cur++;
goto _ITEMS_DRAW;
}
if (key==13)
{
WB1.Scan(ITEMS_LIST[items_cur*2+1]);
ExitProcess();
}
break;
case evReDraw:
while (ITEMS_LIST[items_num*2]) items_num++;
DefineAndDrawWindow(Form.left+m.x,Form.top+m.y+GetSkinHeight()+3,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x01,0x10FFFFFF,0,0x01fffFFF);
 
DrawRectangle(0,0,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x777777); //îáîäîê
_ITEMS_DRAW:
for (i=0; i<items_num; i++;)
{
if (i<>items_cur) EDX=0xFFFFFF; else EDX=0x94AECE;
DrawBar(1, i*ITEM_HEIGHT+1, ITEM_WIDTH-1, ITEM_HEIGHT, EDX);
WriteText(8,i*ITEM_HEIGHT+6,0x80,0x000000,ITEMS_LIST[i*2],0);
if (ITEMS_LIST[i*2+1]==1) && (pre_text==2) DrawBar(ITEM_WIDTH-18, i*ITEM_HEIGHT+8, 4, 4, 0x444444);
if (ITEMS_LIST[i*2+1]==5) && (use_truetype==1) DrawBar(ITEM_WIDTH-18, i*ITEM_HEIGHT+8, 4, 4, 0x444444);
}
DrawBar(33, cur_encoding+1*ITEM_HEIGHT+8, 4, 4, 0x444444); //ïîêàçûâàåò âûáðàíóþ êîäèðîâêó
}
}
 
 
 
 
 
/programs/cmm/browser/include/parce_tag.h
0,0 → 1,50
unsigned int GetNextParam()
{
byte kavichki = false;
int i = strlen(#tagparam) - 1;
if (!tagparam) return 0;
WHILE((i > 0) && ((tagparam[i] == '"') || (tagparam[i] == ' ') || (tagparam[i] == '\'') || (tagparam[i] == '/')))
{
IF (tagparam[i] == '"') || (tagparam[i] == '\'') kavichki=tagparam[i];
tagparam[i] = 0x00;
i--;
}
 
if (kavichki)
{
i=strrchr(#tagparam, kavichki);
if (i>sizeof(options))
strcpy(#options, #tagparam + sizeof(options));
else
strcpy(#options, #tagparam + i);
}
else
{
WHILE((i > 0) && (tagparam[i] <>'=')) i--; //i=strrchr(#tagparam, '=')+1;
i++;
if (i>sizeof(options))
strcpy(#options, #tagparam + sizeof(options));
else
strcpy(#options, #tagparam + i);
 
WHILE (options[0] == ' ') strcpy(#options, #options+1);
}
tagparam[i] = 0x00;
 
FOR ( ; ((tagparam[i] <>' ') && (i > 0); i--)
{
IF (tagparam[i] == '=') //äåðçêàÿ çàãëóøêà
tagparam[i + 1] = 0x00;
}
 
if (i>sizeof(parametr))
strcpy(#parametr, #tagparam + sizeof(parametr));
else
strcpy(#parametr, #tagparam + i + 1);
 
tagparam[i] = 0x00;
return 1;
}
/programs/cmm/browser/include/some_code.h
0,0 → 1,66
//êíîïêè
#define BACK 300
#define FORWARD 301
#define REFRESH 302
#define HOME 303
#define NEWTAB 304
#define GOTOURL 305
#define SEARCHWEB 306
#define ID1 178
#define ID2 177
 
#define _WIN 0
#define _DOS 1
#define _KOI 2
#define _UTF 3
 
dword get_URL_part(int len) {
char temp1[sizeof(URL)];
strcpy(#temp1, #URL);
temp1[len] = 0x00;
return #temp1;
}
 
inline byte chTag(dword text) {return strcmp(#tag,text);}
 
 
void GetURLfromPageLinks(int id)
{
int i, j = 0;
for (i = 0; i <= id - 401; i++)
{
do
{
j++;
if (j>=strlen(#page_links)) return; //íå ñàìîå óäà÷íîå ðåøåíèå
}
while (page_links[j] <>'|');
}
page_links[j] = 0x00;
strcpy(#URL, #page_links+strrchr(#page_links, '|'));
}
 
 
//Ó íàñ íåò íàêëîííûõ øðèôòîâ, ïîýòîìó äåëàåì êîñòûëü èç
//ïàëî÷åê äëÿ ìîðîæåíîãî è æåâàòåëüíîé ðåçèíêè:
//Ñíèìàåì îáëàñòü ýêðàíà è âûâîäèì å¸ îáðàòíî ïîëîñêàìè ñî ñìåùåíèåì,
//÷òî äà¸ò ïåðåêîñ êàðòèíêè
//Ïðè íàëè÷èè ôîíà è ò.ï. ïðîÿâèòñÿ âñÿ êîñòûëüíîñòü ðåøåíèÿ :)
 
inline void Skew(dword x,y,w,h)
{
dword italic_buf;
int tile_height=2, //áóäåì âûâîäèòü äâóõïèêñåëüíûìè ïîëîñêàìè
shift=-2, //ñ äâóõïèêñåëüíûì ñìåùåíèåì
i, skin_height;
 
italic_buf = mem_Alloc(w*h*3);
skin_height = GetSkinHeight();
CopyScreen(italic_buf, x+Form.left+2, y+Form.top+skin_height, w, h);
 
FOR (i=0;i*tile_height<h;i++)
PutImage(w*3*tile_height*i+italic_buf,w,tile_height,x+shift-i+1,i*tile_height+y);
mem_Free(italic_buf);
}
/programs/cmm/browser/include/unicode_tags.h
0,0 → 1,89
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", "-",
 
"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", "-", //âîîáùå çäåñü òî÷êà
"percnt","%",
 
0};
 
 
byte unicode_chars[] = "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯àáâãäåæçèéêëìíîïðñ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;
}
}
rez = atoi(#tag + 1) - 1040;
if (tag[1] == '1') && (rez>=0) && (rez<=72) && (strlen(#tag) == 5)
{
return unicode_chars[rez];
}
strcat(#line,#tag); //âûâîäèì íà ýêðàí íåîáðàáîòàííûé òåã, òàê áðàóçåðû çà÷åì-òî äåëàþò
return NULL;
}
/programs/cmm/browser/include/.
Property changes:
Added: tsvn:logminsize
+5
\ No newline at end of property