From 29de2e5854bf0805c19a2ca1af4071f108e96943 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sun, 18 Nov 2012 21:49:28 +0000 Subject: [PATCH] HTMLv 0.97.7 git-svn-id: svn://kolibrios.org@3058 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/network/htmlv/browser/HTMLv.c | 28 +- programs/network/htmlv/browser/History.txt | 12 +- programs/network/htmlv/browser/TWB.h | 151 +++++----- .../network/htmlv/browser/include/colors.h | 278 +++++++++--------- .../network/htmlv/browser/include/history.h | 2 +- .../network/htmlv/browser/include/menu_rmb.h | 8 +- .../network/htmlv/browser/include/some_code.h | 2 +- programs/network/htmlv/lib/figures.h | 33 +++ programs/network/htmlv/lib/kolibri.h | 95 ++---- programs/network/htmlv/lib/strings.h | 2 +- 10 files changed, 301 insertions(+), 310 deletions(-) create mode 100644 programs/network/htmlv/lib/figures.h diff --git a/programs/network/htmlv/browser/HTMLv.c b/programs/network/htmlv/browser/HTMLv.c index 375371c857..cbc539bbaa 100644 --- a/programs/network/htmlv/browser/HTMLv.c +++ b/programs/network/htmlv/browser/HTMLv.c @@ -5,11 +5,12 @@ #include "..\lib\kolibri.h" #include "..\lib\strings.h" +#include "..\lib\figures.h" #include "..\lib\encoding.h" #include "..\lib\file_system.h" #include "..\lib\mem.h" #include "..\lib\dll.h" -//библиотеки +//библиотеки .obj #include "..\lib\libio_lib.h" #include "..\lib\libimg_lib.h" #include "..\lib\edit_box_lib.h" @@ -47,6 +48,7 @@ mouse m; #include "TWB.h" #include "include\menu_rmb.h" + void tre() { char *font_picture; @@ -55,22 +57,10 @@ void tre() int height=20; // char palette[256*4]; int x; - debug("fuck this shit\n"); - //init_font(#fontinfo); - debug("fuck this shit!\n"); - strcpy(#text, "hello world\0"); - - text_out stdcall (#text, #fontlol, 17, 0x0, 10, 10); - - strcpy(#text, "fuck this shit!\0"); - - text_out stdcall (#text, #fontlol, 27, 0x0, 10, 30); - - - strcpy(#text, "alarm!\0"); - - text_out stdcall (#text, #fontlol, 47, 0x00FF0000, 10, 70); + text_out stdcall ("hello world\0",#fontlol, 17, 0x0, 10, 10); + text_out stdcall ("heyeyey!\0",#fontlol, 27, 0x0, 10, 30); + text_out stdcall ("alarm!\0", #fontlol, 47, 0x00FF0000, 10, 70); /* strcpy(#text, "hello world\0"); @@ -233,7 +223,7 @@ void SetElementSizes() void Draw_Window() { int j; - DefineAndDrawWindow(215,100,WIN_W,WIN_H,0x73,0x00E4DFE1,0); + DefineAndDrawWindow(215,100,WIN_W,WIN_H,0x73,0x00E4DFE1,0,0); GetProcessInfo(#Form, SelfInfo); if (Form.status_window>2) //если свернуто в заголовок, ничего не рисуем @@ -254,8 +244,8 @@ void Draw_Window() PutImage(#URLgoto,40,19,onLeft(57,0),14); DefineButton(onLeft(37,0),15, 18, 16, GOTOURL+BT_HIDE, 0xE4DFE1); DefineButton(onLeft(56,0),15, 17, 16, SEARCHWEB+BT_HIDE, 0xE4DFE1); - DrawRegion(205,14,onLeft(58,205),18,0x94AECE); //ободок полосы адреса - DrawRegion(206,15,onLeft(59,205),16,0xE4ECF3); + DrawRectangle(205,14,onLeft(58,205),18,0x94AECE); //ободок полосы адреса + DrawRectangle(206,15,onLeft(59,205),16,0xE4ECF3); SetElementSizes(); WB1.ShowPage(); diff --git a/programs/network/htmlv/browser/History.txt b/programs/network/htmlv/browser/History.txt index 0b9d00617a..6daae757e6 100644 --- a/programs/network/htmlv/browser/History.txt +++ b/programs/network/htmlv/browser/History.txt @@ -1,6 +1,12 @@ -11.11.12 - 0.97.6a -SoUrcerer - Синхронизация программы с новой -оптимизированной версией библитеки TryeType. +18.11.12 - 0.97.7 +- если изображение не загрузилось, но содержит ссылку отображается + заменяющий его текст; +- частично исправлен перенос ссылках в тексте; +- отображение в меню текущей кодировки; +- SoUrcerer - Синхронизация программы с новой оптимизированной +версией библитеки TryeType. + + 10.11.12 - 0.97.6 - нормальный запуск программы даже без библиотеки lib_img; diff --git a/programs/network/htmlv/browser/TWB.h b/programs/network/htmlv/browser/TWB.h index 1e3fbcb3a7..760a1eb34e 100644 --- a/programs/network/htmlv/browser/TWB.h +++ b/programs/network/htmlv/browser/TWB.h @@ -8,7 +8,7 @@ dword char download_path[]="/rd/1/.download"; char search_path[]="http://nigma.ru/index.php?s="; -char version[]=" Text-based Browser 0.97.6"; +char version[]=" Text-based Browser 0.97.7"; struct TWebBrowser { @@ -27,7 +27,7 @@ struct TWebBrowser { TWebBrowser WB1; byte rez, b_text, i_text, u_text, s_text, pre_text, blq_text, li_text, - link, ignor_text, li_tab, first_line_drawed; + link, ignor_text, li_tab, first_line_drawed, cur_encoding; dword text_colors[300], @@ -262,6 +262,7 @@ void TWebBrowser::ReadHtml(byte encoding) else ReadFile(0, filesize, buf, #URL); + cur_encoding = encoding; if (encoding==_WIN) wintodos(buf); if (encoding==_UTF) utf8rutodos(buf); if (encoding==_KOI) koitodos(buf); @@ -282,7 +283,7 @@ void TWebBrowser::OpenPage() DeleteFile(#download_path); IF (URL[strlen(#URL)-1]=='/') URL[strlen(#URL)-1]=''; downloader_id = RunProgram("/sys/network/downloader", #URL); - //это гениально и это пиздец!!! + //Browser Hack v2.0 Pause(60); if (GetProcessSlot(downloader_id)<>0) { @@ -376,56 +377,9 @@ void TWebBrowser::ParseHTML(dword bword){ break; } case 0x0d: + debug("0x0d"); bukva = ' '; goto DEFAULT_MARK; - case '<': - bword++; //промотаем символ < - tag = parametr = tagparam = ignor_param = 0; - 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), дерзко + { + 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) { @@ -514,9 +516,6 @@ void TWebBrowser::DrawPage() // { if (strlen(#version)+strlen(#line)+2>sizeof(header)) { - //line = 123456789 - //header = 1234 - //line = 56789 strcpy(#temp, #line); temp[sizeof(header)-strlen(#version)-2]=0; strcpy(#header, #temp); @@ -532,7 +531,7 @@ void TWebBrowser::DrawPage() // strcat(#header, #version); return; } - + if (stroka >= 0) && (stroka - 2 < lines.visible) && (line) && (!anchor) { if (!stroka) && (!stolbec) @@ -572,7 +571,7 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) { dword hr_color; dword image; - char temp[4096]; + char temp[4096], alt[4096]; int w=0, h=0, img_lines_first=0; //проверяем тег открывается или закрывается @@ -782,21 +781,23 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) { IMG_TAG: if (!strcmp(#parametr,"src=")) //надо объединить с GetNewUrl() { - if (downloader_id!=0) strcpy(#temp, #history_list[history_current-1].Item); + if (downloader_id) strcpy(#temp, #history_list[history_current-1].Item); else strcpy(#temp, BrowserHistory.CurrentUrl()); //достаём адрес текущей страницы - if (!strcmpn(#temp, "http:", 5)) || (!strcmpn(#options, "http:", 5)) return; - temp[strrchr(#temp, '/')] = 0x00; //обрезаем её урл до последнего / - strcat(#temp, #options); - image=load_image(#temp); - w=DSWORD[image+4]; - h=DSWORD[image+8]; + if (strcmpn(#temp, "http:", 5)!=0) || (strcmpn(#options, "http:", 5)!=0) + { + temp[strrchr(#temp, '/')] = 0x00; //обрезаем её урл до последнего / + strcat(#temp, #options); + image=load_image(#temp); + w=DSWORD[image+4]; + h=DSWORD[image+8]; + } } - /*if (!strcmp(#parametr,"alt=")) + if (!strcmp(#parametr,"alt=")) { - strcpy(#tag, "[Image: "); - strcat(#tag, #options); - strcat(#tag, "]"); - }*/ + strcpy(#alt, "["); + strcat(#alt, #options); + strcat(#alt, "]"); + } IF(tagparam) { @@ -804,7 +805,11 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) { GOTO IMG_TAG; } - if (!image) return; + if (!image) + { + if (alt) && (link) strcat(#line, #alt); + return; + } if (w>width1) w=width1; @@ -838,9 +843,9 @@ void TWebBrowser::WhatTextStyle(int left1, top1, width1) { { 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); + 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); } if (tagparam) { diff --git a/programs/network/htmlv/browser/include/colors.h b/programs/network/htmlv/browser/include/colors.h index a40b9a0258..79ac17875e 100644 --- a/programs/network/htmlv/browser/include/colors.h +++ b/programs/network/htmlv/browser/include/colors.h @@ -7,146 +7,146 @@ struct color_spec { }; 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, + "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, + "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) diff --git a/programs/network/htmlv/browser/include/history.h b/programs/network/htmlv/browser/include/history.h index 7b99a84036..de5c59de64 100644 --- a/programs/network/htmlv/browser/include/history.h +++ b/programs/network/htmlv/browser/include/history.h @@ -46,7 +46,7 @@ byte UrlsHistory::GoBack() history_current--; strcpy(#URL, #history_list[history_current].Item); - return 1; + return 1; } diff --git a/programs/network/htmlv/browser/include/menu_rmb.h b/programs/network/htmlv/browser/include/menu_rmb.h index b284ab1335..2bb7a6b142 100644 --- a/programs/network/htmlv/browser/include/menu_rmb.h +++ b/programs/network/htmlv/browser/include/menu_rmb.h @@ -7,7 +7,7 @@ char *ITEMS_LIST[]={ "View in Tinypad F3",52, "WIN F5",REFRESH, "DOS Ctrl+D",04, -"KOI-8 Ctrl+K",11, +"KOI Ctrl+K",11, "UTF Ctrl+U",21, "Line breaks ON" ,01, "TrueType fonts" ,05, @@ -78,10 +78,9 @@ void menu_rmb() 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); - DefineButton(0, 0, ITEM_WIDTH, ITEM_HEIGHT, 10+BT_HIDE+BT_NOFRAME, 0); //hack + DefineAndDrawWindow(Form.left+m.x,Form.top+m.y+GetSkinHeight()+3,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x01,0x10FFFFFF,0,0x01fffFFF); - DrawRegion(0,0,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x777777); //ободок + DrawRectangle(0,0,ITEM_WIDTH,items_num*ITEM_HEIGHT+1,0x777777); //ободок _ITEMS_DRAW: for (i=0; i0) DefineButton(x,y,width,height,id+BT_HIDE,0xEFEBEF); //Є­®ЇЄ  - //WriteText(-strlen(text)*6+width/2+x+1,height/2-3+y,0x80,0,text,0); - WriteText(width/2+x+1,height/2-3+y,0x80,0,text,0); -} - -:void DrawCircle(int x, y, r) -{ - int i; - float px=0, py=r, ii = r * 3.1415926 * 2; - FOR (i = 0; i < ii; i++) - { - PutPixel(px + x, y - py, 0); - px = py / r + px; - py = -px / r + py; - } -} - -//------------------------------------------------------------------------------ - -inline fastcall void debug( EDX) -{ - $push ebx - $push ecx - $mov eax, 63 - $mov ebx, 1 -next_char: - $mov ecx, DSDWORD[edx] - $or cl, cl - $jz done - $int 0x40 - $inc edx - $jmp next_char -done: - $mov cl, 13 - $int 0x40 - $mov cl, 10 - $int 0x40 - $pop ecx - $pop ebx -} +} \ No newline at end of file diff --git a/programs/network/htmlv/lib/strings.h b/programs/network/htmlv/lib/strings.h index 5d77ecd7da..8d71313fd6 100644 --- a/programs/network/htmlv/lib/strings.h +++ b/programs/network/htmlv/lib/strings.h @@ -193,7 +193,7 @@ inline fastcall signed int strchr( ESI,BL) inline fastcall signed int strrchr( ESI,BL) { - int jj=0, last=-1; + int jj=0, last=0; do{ jj++; $lodsb