diff --git a/programs/cmm/TWB/TWB.c b/programs/cmm/TWB/TWB.c
new file mode 100644
index 0000000000..ffc5f0ce16
--- /dev/null
+++ b/programs/cmm/TWB/TWB.c
@@ -0,0 +1,781 @@
+
+int downloader_id;
+
+dword
+ buf,
+ filesize,
+ blink;
+
+char download_path[]="/rd/1/.download";
+char search_path[]="http://nigma.ru/index.php?s=";
+
+
+struct TWebBrowser {
+ int left, top, width, height, line_h;
+ void Scan(int);
+ void GetNewUrl();
+ void OpenPage();
+ void ReadHtml(byte);
+ void ShowPage();
+ void ParseHTML(dword);
+ void WhatTextStyle(int left1, top1, width1);
+ void DrawPage();
+ void DrawScroller();
+};
+TWebBrowser WB1;
+
+byte rez, b_text, i_text, u_text, s_text, pre_text, blq_text, li_text,
+ link, ignor_text, li_tab, cur_encoding, text_align;
+
+enum { ALIGN_LEFT, ALIGN_CENTER, ALIGN_RIGHT};
+
+dword text_colors[300],
+ text_color_index,
+ link_color,
+ bg_color;
+
+int stroka,
+ stolbec,
+ tab_len,
+ anchor_line_num;
+
+char line[500],
+ tag[100],
+ tagparam[10000],
+ parametr[1200],
+ options[4096],
+ anchor[256];
+
+#include "..\TWB\history.h"
+#include "..\TWB\colors.h"
+#include "..\TWB\unicode_tags.h"
+#include "..\TWB\img_cache.h"
+#include "..\TWB\some_code.h"
+#include "..\TWB\parce_tag.h"
+#include "..\TWB\draw_buf.h"
+
+//=======================================================================
+
+
+void TWebBrowser::DrawPage()
+{
+ int start_x, start_y, line_length, magrin_left=5;
+
+ if (!header)
+ {
+ strcpy(#header, #line);
+ strcat(#header, " -");
+ strcat(#header, #version);
+ line = 0;
+ return;
+ }
+
+ if (stroka >= 0) && (stroka - 2 < lines.visible) && (line) && (!anchor)
+ {
+ start_x = stolbec * 6 + left + magrin_left;
+ start_y = stroka * 10 + top + magrin_left;
+ line_length = strlen(#line) * 6;
+
+ WriteBufText(start_x, 0, 0x88, text_colors[text_color_index], #line, drawbuf);
+ IF (b_text) WriteBufText(start_x+1, 0, 0x88, text_colors[text_color_index], #line, drawbuf);
+ IF (i_text) DrawBufSkew(start_x, 0, line_length, line_h);
+ IF (s_text) DrawBufBar(start_x, 4, line_length, 1, text_colors[text_color_index]);
+ IF (u_text) DrawBufBar(start_x, 8, line_length, 1, text_colors[text_color_index]);
+ IF (link) {
+ UnsafeDefineButton(start_x-2, start_y, line_length + 3, 9, blink + BT_HIDE, 0xB5BFC9);
+ DrawBufBar(start_x, 8, line_length, 1, text_colors[text_color_index]);
+ }
+ stolbec += strlen(#line);
+ }
+}
+//=======================================================================
+
+void TWebBrowser::Scan(int id)
+{
+ if (id >= 400)
+ {
+ GetURLfromPageLinks(id);
+
+ //#1
+ if (URL[0] == '#')
+ {
+ strcpy(#anchor, #URL+strrchr(#URL, '#'));
+
+ strcpy(#URL, BrowserHistory.CurrentUrl());
+
+ lines.first=lines.all-lines.visible;
+ ShowPage();
+ return;
+ }
+ //liner.ru#1
+ if (strrchr(#URL, '#')<>-1)
+ {
+ strcpy(#anchor, #URL+strrchr(#URL, '#'));
+ URL[strrchr(#URL, '#')-1] = 0x00; //
+ }
+
+ GetNewUrl();
+
+ if (!strcmp(#URL + strlen(#URL) - 4, ".gif")) || (!strcmp(#URL + strlen(#URL) - 4, ".png")) || (!strcmp(#URL + strlen(#URL) - 4, ".jpg"))
+ {
+ //if (strstr(#URL,"http:"))
+ RunProgram("/sys/media/kiv", #URL);
+ strcpy(#editURL, BrowserHistory.CurrentUrl());
+ strcpy(#URL, BrowserHistory.CurrentUrl());
+ return;
+ }
+ if (!strcmpn(#URL,"mailto:", 7))
+ {
+ RunProgram("@notify", #URL);
+ strcpy(#editURL, BrowserHistory.CurrentUrl());
+ strcpy(#URL, BrowserHistory.CurrentUrl());
+ return;
+ }
+
+ OpenPage();
+ return;
+ }
+
+ IF(lines.all < lines.visible) SWITCH(id) //
+ { CASE 183: CASE 184: CASE 180: CASE 181: return; }
+
+ switch (id)
+ {
+ case 011: //Ctrk+K
+ ReadHtml(_KOI);
+ break;
+ case 021: //Ctrl+U
+ ReadHtml(_UTF);
+ break;
+ case 004: //Ctrl+D
+ ReadHtml(_DOS);
+ break;
+ case 002: //free img cache
+ FreeImgCache();
+ break;
+ case BACK:
+ if (!BrowserHistory.GoBack()) return;
+ OpenPage();
+ return;
+ case FORWARD:
+ if (!BrowserHistory.GoForward()) return;
+ OpenPage();
+ return;
+ case 052: //F3
+ if (strcmp(get_URL_part(5),"http:")<>0) RunProgram("/rd/1/tinypad", #URL); else RunProgram("/rd/1/tinypad", #download_path);
+ return;
+ case 054: //F5
+ IF(address_box.flags & 0b10) break;
+ case REFRESH:
+ if (GetProcessSlot(downloader_id)<>0)
+ {
+ KillProcess(downloader_id);
+ pause(20);
+ Draw_Window();
+ return;
+ }
+ anchor_line_num=lines.first; // :
+ anchor[0]='|';
+ OpenPage();
+ return;
+ case 014: //Ctrl+N
+ case 020: //Ctrl+T
+ case NEWTAB:
+ MoveSize(190,80,OLD,OLD);
+ RunProgram(#program_path, #URL);
+ return;
+
+ case HOME:
+ strcpy(#editURL, "http://kolibrios.org/en/index.htm");
+ case GOTOURL:
+ case 0x0D: //enter
+ // ttp://? , . , .
+ //strstr() 0 0. .
+ if ((strstr(#editURL,"ttp://")==0) && (editURL[0]!='/')) strcpy(#URL,"http://"); else URL[0] = 0;
+ strcat(#URL, #editURL);
+ OpenPage();
+ return;
+ case SEARCHWEB:
+ strcpy(#URL, #search_path);
+ strcat(#URL, #editURL);
+ OpenPage();
+ return;
+
+ case ID1: //
+ IF(lines.first <= 0) return;
+ lines.first--;
+ break;
+ case ID2: //
+ IF(lines.visible + lines.first >= lines.all) return;
+ lines.first++;
+ break;
+ case 183: //PgDown
+ IF(lines.first == lines.all - lines.visible) return;
+ lines.first += lines.visible + 2;
+ IF(lines.visible + lines.first > lines.all) lines.first = lines.all - lines.visible;
+ break;
+ case 184: //PgUp
+ IF(lines.first == 0) return;
+ lines.first -= lines.visible - 2;
+ IF(lines.first < 0) lines.first = 0;
+ break;
+ case 180: //home
+ IF(lines.first == 0) return;
+ lines.first = 0;
+ break;
+ case 181: //end
+ IF (lines.first == lines.all - lines.visible) return;
+ lines.first = lines.all - lines.visible;
+ break;
+ default:
+ return;
+ }
+ ParseHTML(buf);
+}
+
+
+char *ABSOLUTE_LINKS[]={ "http:", "mailto:", "ftp:", "/sys/", "/kolibrios/", "/rd/", "/bd", "/hd", "/cd", "/tmp", "/usbhd", 0};
+//dword TWebBrowser::GetNewUrl(dword CUR_URL, NEW_URL){
+void TWebBrowser::GetNewUrl(){
+ int i, len;
+
+ for (i=0; ABSOLUTE_LINKS[i]; i++)
+ {
+ len=strlen(ABSOLUTE_LINKS[i]);
+ if (!strcmpn(#URL, ABSOLUTE_LINKS[i], len)) return;
+ }
+
+ IF (!strcmpn(#URL,"./", 2)) strcpy(#URL, #URL+2); // :)
+ strcpy(#editURL, BrowserHistory.CurrentUrl()); //
+
+ if (URL[0] == '/')
+ {
+ i = strchr(#editURL+8, '/');
+ editURL[i+7]=0;
+ strcpy(#URL, #URL+1);
+ }
+
+ _CUT_ST_LEVEL_MARK:
+
+ if (editURL[strrchr(#editURL, '/')-2]<>'/') // http://
+ {
+ editURL[strrchr(#editURL, '/')] = 0x00; // /
+ }
+
+ IF (!strcmp(get_URL_part(3),"../")) //
+ {
+ strcpy(#URL,#URL+3);
+ editURL[strrchr(#editURL, '/')-1] = 0x00; // /
+ goto _CUT_ST_LEVEL_MARK;
+ }
+
+ if (editURL[strlen(#editURL)-1]<>'/') strcat(#editURL, "/");
+
+ strcat(#editURL, #URL); //
+ strcpy(#URL, #editURL);
+}
+
+
+
+void TWebBrowser::ReadHtml(byte encoding)
+{
+ if (!strcmp(get_URL_part(5),"http:")))
+ file_size stdcall (#download_path);
+ else
+ file_size stdcall (#URL);
+
+ filesize = EBX;
+ if (!filesize) return;
+
+ mem_Free(buf);
+ buf = mem_Alloc(filesize);
+ if (!strcmp(get_URL_part(5),"http:")))
+ ReadFile(0, filesize, buf, #download_path);
+ else
+ ReadFile(0, filesize, buf, #URL);
+
+ cur_encoding = encoding;
+ if (encoding==_WIN) wintodos(buf);
+ if (encoding==_UTF) utf8rutodos(buf);
+ if (encoding==_KOI) koitodos(buf);
+}
+
+
+void TWebBrowser::OpenPage()
+{
+ if (GetProcessSlot(downloader_id)<>0) PutPaletteImage(#toolbar,200,42,0,0,8,#toolbar_pal);
+ KillProcess(downloader_id);
+ strcpy(#editURL, #URL);
+ BrowserHistory.AddUrl();
+ strcpy(#header, #version);
+ pre_text =0;
+ if (!strcmp(get_URL_part(5),"http:")))
+ {
+ KillProcess(downloader_id); //
+ DeleteFile(#download_path);
+ IF (URL[strlen(#URL)-1]=='/') URL[strlen(#URL)-1]=NULL;
+ downloader_id = RunProgram("/sys/network/downloader", #URL);
+ //Browser Hack v2.0
+ /*
+ pause(60);
+ if (GetProcessSlot(downloader_id)<>0)
+ {
+ debug("Browser Hack v2.0: Killing downloader and trying to run it one more!");
+ KillProcess(downloader_id); //
+ downloader_id = RunProgram("/sys/network/downloader", #URL);
+ }
+ */
+ IF (downloader_id<0) RunProgram("@notify", "Error running Downloader. Internet unavilable.");
+ Draw_Window();
+ return;
+ }
+ lines.first = lines.all =0;
+ ReadHtml(_WIN);
+ WB1.ShowPage();
+}
+
+
+void TWebBrowser::ShowPage()
+{
+ address_box.size = address_box.pos = strlen(#editURL);
+ address_box.offset=0;
+ edit_box_draw stdcall(#address_box);
+
+ if (!filesize)
+ {
+ DrawBar(left, top, width+scroll1.size_x+1, height, 0xFFFFFF); //fill all
+ if (GetProcessSlot(downloader_id)<>0) WriteText(left + 10, top + 18, 0x80, 0, "Loading...");
+ else
+ {
+ WriteText(left + 10, top + 18, 0x80, 0, "Page not found. May be, URL contains some errors.");
+ if (!strcmp(get_URL_part(5),"http:"))) WriteText(left + 10, top + 32, 0x80, 0, "Or Internet unavilable for your configuration.");
+ }
+ //return;
+ }
+ else
+ ParseHTML(buf);
+
+ if (!header) strcpy(#header, #version);
+ if (!strcmp(#version, #header)) DrawTitle(#header);
+}
+
+
+
+void TWebBrowser::ParseHTML(dword bword){
+ word bukva[2];
+ int j, perenos_num;
+ byte ignor_param;
+ char temp[768];
+
+ if (blink<400) blink=400; else for ( ; blink>400; blink--;) DeleteButton(blink);
+ b_text = i_text = u_text = s_text = blq_text =
+ li_text = link = ignor_text = text_color_index = text_colors[0] = li_tab = 0; //
+ text_align = ALIGN_LEFT;
+ link_color = 0x0000FF;
+ bg_color = 0xFFFFFF;
+ DrawBufFill();
+ strcpy(#page_links,"|");
+ strcpy(#header, #version);
+ stroka = -lines.first;
+ stolbec = 0;
+ line = 0;
+
+ if (pre_text<>2)
+ {
+ pre_text=0;
+ if (!strcmp(#URL + strlen(#URL) - 4, ".txt")) pre_text = 1;
+ if (!strcmp(#URL + strlen(#URL) - 4, ".mht")) ignor_text = 1;
+ }
+
+ for ( ; buf+filesize > bword; bword++;)
+ {
+ bukva = ESBYTE[bword];
+ if (ignor_text) && (bukva<>'<') continue;
+ switch (bukva)
+ {
+ case 0x0a:
+ if (pre_text)
+ {
+ bukva = temp = NULL;
+ goto NEXT_MARK;
+ }
+ case '\9':
+ if (pre_text) // 0x0d
+ {
+ tab_len=strlen(#line)/8;
+ tab_len=tab_len*8;
+ tab_len=8+tab_len-strlen(#line);
+ for (j=0; j0) goto DEFAULT_MARK;
+
+ temp[0] = ESBYTE[bword+1];
+ temp[1] = ESBYTE[bword+2];
+ temp[2] = '\0';
+ if (bukva = Hex2Symb(#temp))
+ {
+ bword+=2;
+ goto DEFAULT_MARK;
+ }
+ break;
+
+ case '&': // and so on
+ bword++;
+ tag=0;
+ for (j=0; (ESBYTE[bword]<>';') && (j<7); j++, bword++;)
+ {
+ bukva = ESBYTE[bword];
+ chrcat(#tag, bukva);
+ }
+ bukva = GetUnicodeSymbol();
+ if (bukva) goto DEFAULT_MARK;
+ break;
+ case '<':
+ bword++; // <
+ tag = parametr = tagparam = ignor_param = NULL;
+ if (ESBYTE[bword] == '!') // ,
+ {
+ bword++;
+ if (ESBYTE[bword] == '-')
+ {
+ HH_:
+ do
+ {
+ bword++;
+ if (buf + filesize <= bword) break 2;
+ }
+ while (ESBYTE[bword] <>'-');
+
+ bword++;
+ if (ESBYTE[bword] <>'-') goto HH_;
+ }
+ }
+ while (ESBYTE[bword] !='>') && (bword < buf + filesize) //
+ {
+ bukva = ESBYTE[bword];
+ if (bukva == '\9') || (bukva == '\x0a') || (bukva == '\x0d') bukva = ' ';
+ if (!ignor_param) && (bukva <>' ')
+ {
+ if (strlen(#tag) lines.column_max) //============the same as NEXT_MARK
+ {
+ perenos_num = strrchr(#line, ' ');
+ if (!perenos_num) && (strlen(#line)>lines.column_max) perenos_num=lines.column_max;
+ strcpy(#temp, #line + perenos_num); //
+ line[perenos_num] = 0x00;
+ if (stroka-1 > lines.visible) && (lines.first <>0) break 1; //...
+ DrawPage();
+ strcpy(#line, #temp);
+ TextGoDown(left + 5, stroka * 10 + top + 5, width - 20); //
+ }
+ DrawPage();
+ line=NULL;
+
+ if (tag) WhatTextStyle(left + 5, stroka * 10 + top + 5, width - 20); //
+
+ tag = parametr = tagparam = ignor_param = NULL;
+ break;
+ default:
+ DEFAULT_MARK:
+ if (bukva<=15) bukva=' ';
+ if (!pre_text) && (bukva == ' ')
+ {
+ if (line[strlen(#line)-1]==' ') break; // 2
+ if (!stolbec) && (!line) break; //
+ }
+ if (strlen(#line) lines.column_max)
+ {
+ NEXT_MARK:
+ perenos_num = strrchr(#line, ' ');
+ if (!perenos_num) && (strlen(#line)>lines.column_max) perenos_num=lines.column_max;
+ strcpy(#temp, #line + perenos_num); //
+ line[perenos_num] = 0x00;
+ if (stroka-1 > lines.visible) && (lines.first <>0) break 1; //...
+ DrawPage();
+ strcpy(#line, #temp);
+ TextGoDown(left + 5, stroka * 10 + top + 5, width - 20); //
+ }
+ }
+ }
+
+ DrawPage(); // , ,
+ TextGoDown(left + 5, stroka * 10 + top + 5, width - 20); //
+
+ if (lines.visible * 10 + 25 <= height)
+ DrawBar(left, lines.visible * 10 + top + 25, width, -lines.visible * 10 + height - 25, bg_color);
+ if (stroka * 10 + 5 <= height)
+ DrawBar(left, stroka * 10 + top + 5, width, -stroka * 10 + height - 5, bg_color); //
+ if (lines.first == 0) lines.all = stroka;
+ if (anchor) // -
+ {
+ anchor=NULL;
+ lines.first=anchor_line_num;
+ ParseHTML(buf);
+ }
+ DrawScroller();
+}
+
+
+
+char oldtag[100];
+void TWebBrowser::WhatTextStyle(int left1, top1, width1) {
+ dword hr_color;
+
+ //
+ if (tag[0] == '/')
+ {
+ rez = 0;
+ strcpy(#tag, #tag+1);
+ }
+ else rez = 1;
+
+ if (!chTag("html"))
+ {
+ IF(!strcmp(#URL + strlen(#URL) - 4, ".mht")) IF (rez==0) ignor_text = 1; ELSE ignor_text = 0;
+ return;
+ }
+
+ if (!chTag("script")) || (!chTag("style")) || (!chTag("binary")) ignor_text = rez;
+
+ if(!chTag("title"))
+ {
+ if (rez) header=NULL;
+ else if (!stroka) DrawTitle(#header); // -
+ return;
+ }
+
+ if (ignor_text) return;
+
+
+
+ IF(!chTag("q")) chrcat(#line, '\"');
+
+ if (anchor) && (!strcmp(#parametr, "id=")) // !!! ,
+ {
+ if (!strcmp(#anchor, #options)) anchor_line_num=lines.first+stroka;
+ }
+
+ if (!chTag("body"))
+ {
+ do{
+ if (!strcmp(#parametr, "link=")) link_color = GetColor(#options);
+ if (!strcmp(#parametr, "text=")) text_colors[0]=GetColor(#options);
+ if (!strcmp(#parametr, "bgcolor="))
+ {
+ bg_color=GetColor(#options);
+ DrawBufFill();
+ }
+ } while(GetNextParam());
+ return;
+ }
+
+ if (!chTag("a"))
+ {
+ if (rez)
+ {
+ if (link) IF(text_color_index > 0) text_color_index--; //
+
+ do{
+ if (!strcmp(#parametr, "href="))
+ {
+ if (stroka - 1 > lines.visible) || (stroka < -2) return;
+
+ text_color_index++;
+ text_colors[text_color_index] = text_colors[text_color_index-1];
+
+ link = 1;
+ blink++;
+ text_colors[text_color_index] = link_color;
+ strcat(#page_links, #options);
+ strcat(#page_links, "|");
+ }
+ if (anchor) && (!strcmp(#parametr, "name="))
+ {
+ if (!strcmp(#anchor, #options))
+ {
+ anchor_line_num=lines.first+stroka;
+ }
+ }
+ } while(GetNextParam());
+ }
+ else {
+ link = 0;
+ IF(text_color_index > 0) text_color_index--;
+ }
+ return;
+ }
+
+ if (!chTag("font"))
+ {
+ if (rez)
+ {
+ text_color_index++;
+ text_colors[text_color_index] = text_colors[text_color_index-1];
+
+ do{
+ if (strcmp(#parametr, "color=") == 0) //&& (parametr[1] == '#')
+ {
+ text_colors[text_color_index] = GetColor(#options);
+ }
+ } while(GetNextParam());
+ }
+ else
+ if (text_color_index > 0) text_color_index--;
+ return;
+ }
+ if(!chTag("tr")) || (!chTag("br")) {
+ TextGoDown(left1, top1, width1);
+ return;
+ }
+ if (!chTag("div")) {
+ IF(oldtag[0] <>'h') TextGoDown(left1, top1, width1);
+ return;
+ }
+ if (!chTag("p")) {
+ IF(oldtag[0] == 'h') return;
+ TextGoDown(left1, top1, width1);
+ IF(rez) TextGoDown(left1, top1 + 10, width1);
+ return;
+ }
+ if (!chTag("center"))
+ {
+ if (rez) text_align = ALIGN_CENTER;
+ if (!rez)
+ {
+ TextGoDown(left1, top1, width1);
+ text_align = ALIGN_LEFT;
+ }
+ return;
+ }
+ if (!chTag("right"))
+ {
+ if (rez) text_align = ALIGN_RIGHT;
+ if (!rez)
+ {
+ TextGoDown(left1, top1, width1);
+ text_align = ALIGN_LEFT;
+ }
+ return;
+ }
+ if (!chTag("h1")) || (!chTag("h2")) || (!chTag("h3")) || (!chTag("h4")) {
+ TextGoDown(left1, top1, width1);
+ if (rez) && (stroka>1) TextGoDown(left1, top1 + 10, width1);
+ strcpy(#oldtag, #tag);
+ if (rez)
+ {
+ if (!strcmp(#parametr, "align=")) && (!strcmp(#options,"center")) text_align = ALIGN_CENTER;
+ if (!strcmp(#parametr, "align=")) && (!strcmp(#options,"right")) text_align = ALIGN_RIGHT;
+ b_text = 1;
+ }
+ if (!rez)
+ {
+ text_align = ALIGN_LEFT;
+ b_text = 0;
+ }
+ return;
+ }
+ else
+ oldtag=NULL;
+
+ if (!chTag("b")) || (!chTag("strong")) || (!chTag("big")) {
+ b_text = rez;
+ return;
+ }
+ if(!chTag("i")) || (!chTag("em")) || (!chTag("subtitle")) {
+ i_text = rez;
+ return;
+ }
+ if (!chTag("dt"))
+ {
+ li_text = rez;
+ IF(rez == 0) return;
+ TextGoDown(left1, top1, width1);
+ return;
+ }
+ if(!chTag("li")) || (!chTag("dt")) //
+ {
+ li_text = rez;
+ if (rez)
+ {
+ TextGoDown(left1, top1, width1);
+ if (stroka > -1) && (stroka - 2 < lines.visible) DrawBufBar(li_tab * 5 * 6 + left1 - 5, line_h/2-3, 2, 2, 0x555555);
+ }
+ return;
+ }
+ if (!chTag("u")) || (!chTag("ins")) u_text = rez;
+ if (!chTag("s")) || (!chTag("strike")) || (!chTag("del")) s_text = rez;
+ if (!chTag("ul")) || (!chTag("ol")) IF(!rez)
+ {
+ li_text = rez;
+ li_tab--;
+ TextGoDown(left1, top1, width1);
+ } ELSE li_tab++;
+ if (!chTag("dd")) stolbec += 5;
+ if (!chTag("blockquote")) blq_text = rez;
+ if (!chTag("pre")) pre_text = rez;
+ if (!chTag("hr"))
+ {
+ if (anchor) || (stroka < -1)
+ {
+ stroka+=2;
+ return;
+ }
+ if (strcmp(#parametr, "color=") == 0) hr_color = GetColor(#options); else hr_color = 0x999999;
+ TextGoDown(left1, top1, width1);
+ DrawBufBar(5, WB1.line_h/2, WB1.width-10, 1, hr_color);
+ TextGoDown(left1, top1+WB1.line_h, width1);
+ }
+ if (!chTag("img"))
+ {
+ Images( left1, top1, width1);
+ return;
+ }
+ if (!chTag("meta")) || (!chTag("?xml"))
+ {
+ do{
+ if (!strcmp(#parametr, "charset=")) || (!strcmp(#parametr, "content=")) || (!strcmp(#parametr, "encoding="))
+ {
+ strcpy(#options, #options[strrchr(#options, '=')]); // content=
+ if (!strcmp(#options,"utf-8")) || (!strcmp(#options,"utf8")) ReadHtml(_UTF);
+ if (!strcmp(#options, "koi8-r")) || (!strcmp(#options, "koi8-u")) ReadHtml(_KOI);
+ if (!strcmp(#options, "dos")) || (!strcmp(#options, "cp-866")) ReadHtml(_DOS);
+ }
+ } while(GetNextParam());
+ return;
+ }
+}
+
+
+
+void TWebBrowser::DrawScroller() // ,
+{
+ scroll1.max_area = lines.all;
+ scroll1.cur_area = lines.visible;
+ scroll1.position = lines.first;
+
+ scroll1.all_redraw=1;
+ scroll1.start_x = WB1.left + WB1.width;
+ scroll1.size_y=WB1.height;
+
+ scrollbar_v_draw(#scroll1);
+}
+
diff --git a/programs/cmm/TWB/acid_0.1.htm b/programs/cmm/TWB/acid_0.1.htm
new file mode 100644
index 0000000000..686c59fd67
--- /dev/null
+++ b/programs/cmm/TWB/acid_0.1.htm
@@ -0,0 +1,81 @@
+
+
+
+
+ Acid 0.1
+
+
+ HTML Viewer
+
+HTMLv (cp1251, koi-8, cp866, unicode)
+ . (<table>), CSS, Javascript'a :)
+
+
+
+
+K
+o
+l
+i
+b
+r
+i
+O
+S
+
+F
+o
+r
+e
+v
+e
+r
+
+
+
+
+ :
+
+-
+
+-
+-
+
+
+
+
+
+" !"-
+ ,
+ .
+
+
+
+
+
+
+
+
+
+
+
+./index.htm
+ - index.htm
+kernel.mnt
+#2.1.4
+http://bash.im
+Mail to Leency
+
+
+
+ ,
+ . .
+ . - : " & < >
+ © ® „ “ . ' .
+
+
+Zhitomyr 2008-2014
+
+
+
+
diff --git a/programs/cmm/TWB/colors.h b/programs/cmm/TWB/colors.h
new file mode 100644
index 0000000000..79ac17875e
--- /dev/null
+++ b/programs/cmm/TWB/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='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];
+}
diff --git a/programs/cmm/TWB/draw_buf.h b/programs/cmm/TWB/draw_buf.h
new file mode 100644
index 0000000000..9c8aaf08f3
--- /dev/null
+++ b/programs/cmm/TWB/draw_buf.h
@@ -0,0 +1,78 @@
+dword drawbuf;
+void DrawBufInit()
+{
+ free(drawbuf);
+ drawbuf = malloc(WB1.width * WB1.line_h +4 * 4 + 8); //+1 for good luck
+ ESDWORD[drawbuf] = WB1.width;
+ ESDWORD[drawbuf+4] = WB1.line_h;
+}
+void DrawBufFill()
+{
+ int i;
+ for (i=0; iy+j*WB1.width+x+h-12*4 ; i-=4)
+ ESDWORD[drawbuf+i+8] = ESDWORD[-shift[j]+drawbuf+i+8];
+ }
+}
+
+void DrawBufAlignRight(dword x,y,w,h)
+{
+ int i, j, l;
+ int content_width = stolbec * 6;
+ int content_left = w - content_width / 2;
+ for (j=0; j=j*w+content_left*4) && (l>=j*w*4); i-=4, l-=4)
+ {
+ ESDWORD[drawbuf+8+i] >< ESDWORD[drawbuf+8+l];
+ }
+ }
+}
+
+
+void DrawBufAlignCenter(dword x,y,w,h)
+{
+ int i, j, l;
+ int content_width = stolbec * 6;
+ int content_left = w - content_width / 2;
+ for (j=0; j=j*w+content_left*4) && (l>=j*w*4); i-=4, l-=4)
+ {
+ ESDWORD[drawbuf+8+i] >< ESDWORD[drawbuf+8+l];
+ }
+ }
+}
+
+
+void TextGoDown(int left1, top1, width1)
+{
+ if (!stroka) DrawBar(WB1.left, WB1.top, WB1.width, 5, bg_color); //çàêðàøèâàåì ôîí íàä ïåðâîé ñòðîêîé
+ if (top1>=WB1.top) && ( top1 < WB1.height+WB1.top-10) && (!anchor)
+ {
+ if (text_align == ALIGN_CENTER) DrawBufAlignCenter(left1,top1,WB1.width,WB1.line_h);
+ if (text_align == ALIGN_RIGHT) DrawBufAlignRight(left1,top1,WB1.width,WB1.line_h);
+ PutPaletteImage(drawbuf+8, WB1.width, WB1.line_h, left1-5, top1, 32,0);
+ DrawBufFill();
+ }
+ stroka++;
+ if (blq_text) stolbec = 8; else stolbec = 0;
+ if (li_text) stolbec = li_tab * 5;
+}
\ No newline at end of file
diff --git a/programs/cmm/TWB/history.h b/programs/cmm/TWB/history.h
new file mode 100644
index 0000000000..e8620ccaf2
--- /dev/null
+++ b/programs/cmm/TWB/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; i0; num_of_pics--)
+ {
+ if (pics[num_of_pics].image) img_destroy stdcall (pics[num_of_pics].image);
+ pics[num_of_pics].path = NULL;
+ }
+ notify(IMAGES_CACHE_CLEARED);
+}
+
+
+void Images(int left1, top1, width1)
+{
+ dword image;
+ char img_path[4096], alt[4096];
+ int w=0, h=0, img_lines_first=0, cur_pic=0;
+
+ do{
+ if (!strcmp(#parametr,"src=")) // GetNewUrl()
+ {
+ if (downloader_id) strcpy(#img_path, #history_list[history_current-1].Item);
+ else strcpy(#img_path, BrowserHistory.CurrentUrl()); //
+
+ if (strcmpn(#img_path, "http:", 5)!=0) || (strcmpn(#options, "http:", 5)!=0)
+ {
+ img_path[strrchr(#img_path, '/')] = '\0'; // /
+ strcat(#img_path, #options);
+
+ cur_pic=GetOrSetPicNum(#img_path);
+ if (!pics[cur_pic].path)
+ {
+ pics[cur_pic].image=load_image(#img_path);
+ strcpy(#pics[cur_pic].path, #img_path);
+ }
+ }
+ }
+ if (!strcmp(#parametr,"alt="))
+ {
+ strcpy(#alt, "[");
+ strcat(#alt, #options);
+ strcat(#alt, "]");
+ }
+
+ } while(GetNextParam());
+
+ if (!pics[cur_pic].image)
+ {
+ if (alt) && (link) strcat(#line, #alt);
+ return;
+ }
+
+ w = DSWORD[pics[cur_pic].image+4];
+ h = DSWORD[pics[cur_pic].image+8];
+ if (w > width1) w = width1;
+
+ if (stroka==0) DrawBar(WB1.left, WB1.top, WB1.width-15, 5, bg_color); //
+ stroka+=h/10;
+ if (top1+hWB1.top+WB1.height-10) return; // Ѩ
+ if (top1WB1.top+WB1.height-h-5) //
+ {
+ h=WB1.top+WB1.height-top1-5;
+ }
+ if (h<=0) return;
+ if (anchor) return;
+
+ img_draw stdcall (pics[cur_pic].image, left1-5, top1, w, h,0,img_lines_first);
+ DrawBar(left1+w - 5, top1, WB1.width-w, h, bg_color);
+ IF (link) UnsafeDefineButton(left1 - 5, top1, w, h-1, blink + BT_HIDE, 0xB5BFC9);
+}
\ No newline at end of file
diff --git a/programs/cmm/TWB/parce_tag.h b/programs/cmm/TWB/parce_tag.h
new file mode 100644
index 0000000000..7040f10d6f
--- /dev/null
+++ b/programs/cmm/TWB/parce_tag.h
@@ -0,0 +1,38 @@
+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);
+ strlcpy(#options, #tagparam + i, sizeof(options));
+ }
+ else
+ {
+ WHILE((i > 0) && (tagparam[i] <>'=')) i--; //i=strrchr(#tagparam, '=')+1;
+ i++;
+ strlcpy(#options, #tagparam + i, sizeof(options));
+
+ WHILE (options[0] == ' ') strcpy(#options, #options+1);
+ }
+ tagparam[i] = 0x00;
+
+ FOR ( ; ((tagparam[i] <>' ') && (i > 0); i--)
+ {
+ IF (tagparam[i] == '=') //
+ tagparam[i + 1] = 0x00;
+ }
+ strlcpy(#parametr, #tagparam + i + 1, sizeof(parametr));
+ tagparam[i] = 0x00;
+ return 1;
+}
\ No newline at end of file
diff --git a/programs/cmm/TWB/some_code.h b/programs/cmm/TWB/some_code.h
new file mode 100644
index 0000000000..aa252583b3
--- /dev/null
+++ b/programs/cmm/TWB/some_code.h
@@ -0,0 +1,34 @@
+
+enum { BACK=300, FORWARD, REFRESH, HOME, NEWTAB, GOTOURL, SEARCHWEB, INPUT_CH, INPUT_BT };
+enum { _WIN, _DOS, _KOI, _UTF };
+
+#define ID1 178
+#define ID2 177
+
+
+
+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, '|'));
+}
\ No newline at end of file
diff --git a/programs/cmm/TWB/unicode_tags.h b/programs/cmm/TWB/unicode_tags.h
new file mode 100644
index 0000000000..73b8723cd1
--- /dev/null
+++ b/programs/cmm/TWB/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;
+ }
+ }
+
+ 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;
+}
diff --git a/programs/cmm/appearance/appearance.c b/programs/cmm/appearance/appearance.c
index 9cff75dbbd..84ddad3dbd 100644
--- a/programs/cmm/appearance/appearance.c
+++ b/programs/cmm/appearance/appearance.c
@@ -16,20 +16,20 @@
#ifdef LANG_RUS
?define WINDOW_HEADER "ࠢ ⥬"
- ?define T_SKINS " "
- ?define T_WALLPAPERS " ࠡ祣 ⮫"
+ ?define T_SKINS " "
+ ?define T_WALLPAPERS " ࠡ祣 ⮫"
#else
?define WINDOW_HEADER "Appearance"
- ?define T_SKINS "Skins"
- ?define T_WALLPAPERS "Wallpappers"
+ ?define T_SKINS " Skins"
+ ?define T_WALLPAPERS " Wallpappers"
#endif
unsigned char icons[sizeof(file "icons.raw")]= FROM "icons.raw";
#define PANEL_H 30
-#define SKINS_STANDART_PATH "/sys/res/skins/"
-#define WALP_STANDART_PATH "/sys/res/wallpapers/"
+#define SKINS_STANDART_PATH "/kolibrios/res/skins/"
+#define WALP_STANDART_PATH "/kolibrios/res/wallpapers/"
llist list[2];
int active;
@@ -94,20 +94,19 @@ void Draw_List()
if (sc.work_button<>sc.work)
{
DrawBar(0, yyy, list[active].w, list[active].line_h, sc.work_button);
- WriteText(11+23,yyy+list[active].text_y,0x80,sc.work_button_text, #temp_filename);
+ WriteText(12,yyy+list[active].text_y,0x80,sc.work_button_text, #temp_filename);
}
else
{
DrawBar(0, yyy, list[active].w, list[active].line_h, sc.grab_button);
- WriteText(11+23,yyy+list[active].text_y,0x80,sc.grab_button_text, #temp_filename);
+ WriteText(12,yyy+list[active].text_y,0x80,sc.grab_button_text, #temp_filename);
}
}
else
{
DrawBar(0,yyy,list[active].w, list[active].line_h, 0xFFFfff);
- WriteText(11+23,yyy+list[active].text_y,0x80,0, #temp_filename);
+ WriteText(12,yyy+list[active].text_y,0x80,0, #temp_filename);
}
- _PutImage(11,yyy+2, 16,15, list[WALLPAPERS].active*16*15*3+#icons);
}
DrawBar(0,list[active].visible*list[active].line_h+list[active].y, list[active].w, -list[active].visible*list[active].line_h+ list[active].h, 0xFFFfff);
DrawScroller();
@@ -253,6 +252,7 @@ void DrawTab(dword x,y, but_id, is_active, text)
}
DrawRectangle(x,y, w,h, sc.work_graph);
DrawCaptButton(x+1,y+1, w-2,h-1, but_id, col_bg, col_text, text);
+ _PutImage(x+6,y+4, 16,15, but_id-2*16*15*3+#icons);
}
diff --git a/programs/cmm/appearance/icons.bmp b/programs/cmm/appearance/icons.bmp
deleted file mode 100644
index ff78fd1396..0000000000
Binary files a/programs/cmm/appearance/icons.bmp and /dev/null differ
diff --git a/programs/cmm/appearance/icons.png b/programs/cmm/appearance/icons.png
new file mode 100644
index 0000000000..ca3758a98b
Binary files /dev/null and b/programs/cmm/appearance/icons.png differ
diff --git a/programs/cmm/appearance/icons.raw b/programs/cmm/appearance/icons.raw
index cc831f7aa9..f7f39fe6c5 100644
--- a/programs/cmm/appearance/icons.raw
+++ b/programs/cmm/appearance/icons.raw
@@ -1 +1 @@
-x`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xpfpfpfpfpfpfpfpfpfx`Xpfpf蕕ѐ蕕ѐpfx`Xpfpfъpfx`Xpfpf蕕ѐpfx`Xpfpfъpfx`XĊpfpfȀȀȀȀȊpfx`Xpfpfpfpfpfpfpfpfpfx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`X|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|tܴܴܴܴܴܴܴܴܴܴܴܴ|t|tܴܴܴܴܴܴܴܴ|t|t̔|t|tm;m;|t|tܴܴܴ̔LL̔Lm;m;m;|t|tllLcccccccccccccccc|t|tlLcccccccccccccc|tcc|t|tԔlsm sm sm sm sm sm sm |tsm |t|tϨPϨPϨPϨPϨPϨPϨPϨPϨPϨP|t|tlllllllllll|t|tԔԔԔԔԔԔԔԔԔԔԔԔ|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t
\ No newline at end of file
+|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|tܴܴܴܴܴܴܴܴܴܴܴܴ|t|tܴܴܴܴܴܴܴܴ|t|t̔|t|tm;m;|t|tܴܴܴ̔LL̔Lm;m;m;|t|tllLcccccccccccccccc|t|tlLcccccccccccccc|tcc|t|tԔlsm sm sm sm sm sm sm |tsm |t|tϨPϨPϨPϨPϨPϨPϨPϨPϨPϨP|t|tlllllllllll|t|tԔԔԔԔԔԔԔԔԔԔԔԔ|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|t|tx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xpfpfpfpfpfpfpfpfpfx`Xpfpf蕕ѐ蕕ѐpfx`Xpfpfъpfx`Xpfpf蕕ѐpfx`Xpfpfъpfx`XĊpfpfȀȀȀȀȊpfx`Xpfpfpfpfpfpfpfpfpfx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`Xx`X
\ No newline at end of file
diff --git a/programs/cmm/browser/HTMLv.c b/programs/cmm/browser/HTMLv.c
index 27b4f25fed..1fd596b7b2 100644
--- a/programs/cmm/browser/HTMLv.c
+++ b/programs/cmm/browser/HTMLv.c
@@ -26,10 +26,10 @@
#include "img\URLgoto.txt";
#ifdef LANG_RUS
- char version[]=" ⮢ 㧥 0.99.1";
+ char version[]=" ⮢ 㧥 0.99.11";
?define IMAGES_CACHE_CLEARED " ⨭ 饭"
#else
- char version[]=" Text-based Browser 0.99.1";
+ char version[]=" Text-based Browser 0.99.11";
?define IMAGES_CACHE_CLEARED "Images cache cleared"
#endif
@@ -60,8 +60,8 @@ mouse m;
int action_buf;
-#include "TWB.h"
-#include "include\menu_rmb.h"
+#include "..\TWB\TWB.c"
+#include "menu_rmb.h"
void main()
diff --git a/programs/cmm/browser/compile_en.bat b/programs/cmm/browser/compile_en.bat
index 5f548f0691..662f16935b 100644
--- a/programs/cmm/browser/compile_en.bat
+++ b/programs/cmm/browser/compile_en.bat
@@ -1,7 +1,7 @@
@del lang.h--
@echo #define LANG_ENG 1 >lang.h--
-..\C--\c-- HTMLv.c
+c-- HTMLv.c
@del HTMLv
@rename HTMLv.com HTMLv
@del warning.txt
diff --git a/programs/cmm/browser/compile_ru.bat b/programs/cmm/browser/compile_ru.bat
index a0d91dd4c1..295838e530 100644
--- a/programs/cmm/browser/compile_ru.bat
+++ b/programs/cmm/browser/compile_ru.bat
@@ -1,7 +1,7 @@
@del lang.h--
@echo #define LANG_RUS 1 >lang.h--
-..\C--\c-- HTMLv.c
+c-- HTMLv.c
@del HTMLv
@rename HTMLv.com HTMLv
@del warning.txt
diff --git a/programs/cmm/dicty/compile.bat b/programs/cmm/dicty/compile.bat
index 6a11c79741..2bd48f1f05 100644
--- a/programs/cmm/dicty/compile.bat
+++ b/programs/cmm/dicty/compile.bat
@@ -1,4 +1,4 @@
-..\C--\C-- dicty
+C-- dicty
@del dicty
@rename dicty.com dicty
@del warning.txt
diff --git a/programs/cmm/end/compile.bat b/programs/cmm/end/compile.bat
index 2909fc8046..d25fa154ac 100644
--- a/programs/cmm/end/compile.bat
+++ b/programs/cmm/end/compile.bat
@@ -1,4 +1,4 @@
-..\C--\C-- end.c
+C-- end.c
@del end
@rename end.com end
@del warning.txt
diff --git a/programs/cmm/eolite/compile_en.bat b/programs/cmm/eolite/compile_en.bat
index da0de719f2..92b231d95f 100644
--- a/programs/cmm/eolite/compile_en.bat
+++ b/programs/cmm/eolite/compile_en.bat
@@ -3,7 +3,7 @@
@del Eolite
cls
-..\C--\c-- Eolite.c
+c-- Eolite.c
@rename Eolite.com Eolite
@del warning.txt
@del lang.h--
diff --git a/programs/cmm/eolite/compile_ru.bat b/programs/cmm/eolite/compile_ru.bat
index 2c4cb887f8..63b25bd6da 100644
--- a/programs/cmm/eolite/compile_ru.bat
+++ b/programs/cmm/eolite/compile_ru.bat
@@ -3,7 +3,7 @@
@del Eolite
cls
-..\C--\c-- Eolite.c
+c-- Eolite.c
@rename Eolite.com Eolite
@del warning.txt
@del lang.h--
diff --git a/programs/cmm/example/compile.bat b/programs/cmm/example/compile.bat
index f6ce60cb56..02bd21c04f 100644
--- a/programs/cmm/example/compile.bat
+++ b/programs/cmm/example/compile.bat
@@ -1,4 +1,4 @@
-..\C--\C-- example.c
+C-- example.c
@del example
@rename example.com example
@pause
diff --git a/programs/cmm/installer/_compile_en.bat b/programs/cmm/installer/_compile_en.bat
index ec06f20812..558371806b 100644
--- a/programs/cmm/installer/_compile_en.bat
+++ b/programs/cmm/installer/_compile_en.bat
@@ -1,7 +1,7 @@
@del lang.h--
@echo #define LANG_ENG 1 >lang.h--
-..\C--\C-- installer.c
+C-- installer.c
@del installer.kex
@rename installer.com installer.kex
@pause
diff --git a/programs/cmm/installer/_compile_ru.bat b/programs/cmm/installer/_compile_ru.bat
index 4abda48829..7bcc5efc2c 100644
--- a/programs/cmm/installer/_compile_ru.bat
+++ b/programs/cmm/installer/_compile_ru.bat
@@ -1,7 +1,7 @@
@del lang.h--
@echo #define LANG_RUS 1 >lang.h--
-..\C--\C-- installer.c
+C-- installer.c
@del installer.kex
@rename installer.com installer.kex
@pause
diff --git a/programs/cmm/kolibrin/compile.bat b/programs/cmm/kolibrin/compile.bat
index bd3caadc9a..81b1133fba 100644
--- a/programs/cmm/kolibrin/compile.bat
+++ b/programs/cmm/kolibrin/compile.bat
@@ -1,4 +1,4 @@
-..\C--\C-- kolibrin.c
+C-- kolibrin.c
@del kolibrin
@rename kolibrin.com kolibrin
@pause
diff --git a/programs/cmm/liza/compile.bat b/programs/cmm/liza/compile.bat
index d728f718d6..ddb0d586f7 100644
--- a/programs/cmm/liza/compile.bat
+++ b/programs/cmm/liza/compile.bat
@@ -1,4 +1,4 @@
-..\C--\C-- liza.c
+C-- liza.c
@del liza
@rename liza.com liza
@del warning.txt
diff --git a/programs/cmm/notify/compile_en.bat b/programs/cmm/notify/compile_en.bat
index 79e1472412..c968dcb8e5 100644
--- a/programs/cmm/notify/compile_en.bat
+++ b/programs/cmm/notify/compile_en.bat
@@ -1,7 +1,7 @@
@del lang.h--
@echo #define LANG_ENG 1 >lang.h--
-..\C--\C-- notify.c
+C-- notify.c
@del @notify
@rename notify.com @notify
@del warning.txt
diff --git a/programs/cmm/notify/compile_ru.bat b/programs/cmm/notify/compile_ru.bat
index 1603196742..f068ecb54b 100644
--- a/programs/cmm/notify/compile_ru.bat
+++ b/programs/cmm/notify/compile_ru.bat
@@ -1,7 +1,7 @@
@del lang.h--
@echo #define LANG_RUS 1 >lang.h--
-..\C--\C-- notify.c
+C-- notify.c
@del @notify
@rename notify.com @notify
@del warning.txt
diff --git a/programs/cmm/tmpdisk/compile_en.bat b/programs/cmm/tmpdisk/compile_en.bat
index ac74a11971..fc772ccfb4 100644
--- a/programs/cmm/tmpdisk/compile_en.bat
+++ b/programs/cmm/tmpdisk/compile_en.bat
@@ -1,6 +1,6 @@
@echo #define LANG_ENG 1 >lang.h--
-..\C--\C-- tmpdisk.c
+C-- tmpdisk.c
@del tmpdisk
@rename tmpdisk.com tmpdisk
@del warning.txt
diff --git a/programs/cmm/tmpdisk/compile_ru.bat b/programs/cmm/tmpdisk/compile_ru.bat
index 12ff7e5246..ee2714af35 100644
--- a/programs/cmm/tmpdisk/compile_ru.bat
+++ b/programs/cmm/tmpdisk/compile_ru.bat
@@ -1,6 +1,6 @@
@echo #define LANG_RUS 1 >lang.h--
-..\C--\C-- tmpdisk.c
+C-- tmpdisk.c
@del tmpdisk
@rename tmpdisk.com tmpdisk
@del warning.txt