diff --git a/programs/cmm/browser/HTMLv.c b/programs/cmm/browser/HTMLv.c
index be23098662..52d9e872d3 100644
--- a/programs/cmm/browser/HTMLv.c
+++ b/programs/cmm/browser/HTMLv.c
@@ -53,8 +53,7 @@ mouse m;
void main()
{
- int btn;
- byte key;
+ int btn, key;
int half_scroll_size;
int scroll_used=0;
@@ -151,7 +150,7 @@ void main()
case evKey:
key = GetKey();
- if (edit1.flags & 0b10) SWITCH(key) //если активна строка адреса игнорируем некоторые кнопки
+ if (edit1.flags & 0b10) SWITCH(key) //если активна строка адреса игнорируем некоторые кнопки
{ CASE 52: CASE 53: CASE 54: goto _EDIT_MARK; }
WB1.Scan(key);
diff --git a/programs/cmm/browser/include/menu_rmb.h b/programs/cmm/browser/include/menu_rmb.h
index 4e41acf006..5b64d22856 100644
--- a/programs/cmm/browser/include/menu_rmb.h
+++ b/programs/cmm/browser/include/menu_rmb.h
@@ -5,7 +5,7 @@
char *ITEMS_LIST[]={
"View in Tinypad F3",52,
-"WIN F5",REFRESH,
+"WIN F5",54,
"DOS Ctrl+D",04,
"KOI Ctrl+K",11,
"UTF Ctrl+U",21,
@@ -40,7 +40,8 @@ void menu_rmb()
if (mm.lkm) || (mm.pkm)
{
ActivateWindow(GetProcessSlot(Form.ID));
- SendWindowMessage(evKey, ITEMS_LIST[items_cur*2+1]);
+ SendWindowMessage(evButton, ITEMS_LIST[items_cur*2+1]);
+ SwitchToAnotherThread();
ExitProcess();
}
if (items_cur<>id1)
diff --git a/programs/cmm/browser/include/some_code.h b/programs/cmm/browser/include/some_code.h
index d679e067f1..a6f2140938 100644
--- a/programs/cmm/browser/include/some_code.h
+++ b/programs/cmm/browser/include/some_code.h
@@ -1,20 +1,10 @@
-//кнопки
-#define BACK 300
-#define FORWARD 301
-#define REFRESH 302
-#define HOME 303
-#define NEWTAB 304
-#define GOTOURL 305
-#define SEARCHWEB 306
-#define INPUT_CH 307
-#define INPUT_BT 308
+
+enum { BACK=300, FORWARD, REFRESH, HOME, NEWTAB, GOTOURL, SEARCHWEB, INPUT_CH, INPUT_BT };
+enum { _WIN, _DOS, _KOI, _UTF };
+
#define ID1 178
#define ID2 177
-#define _WIN 0
-#define _DOS 1
-#define _KOI 2
-#define _UTF 3
dword get_URL_part(int len) {
@@ -35,7 +25,7 @@ void GetURLfromPageLinks(int id)
do
{
j++;
- if (j>=strlen(#page_links)) return; //не самое удачное решение
+ if (j>=strlen(#page_links)) return;
}
while (page_links[j] <>'|');
}
@@ -53,8 +43,8 @@ void GetURLfromPageLinks(int id)
inline void Skew(dword x,y,w,h)
{
dword italic_buf;
- int tile_height=2, //будем выводить двухпиксельными полосками
- shift=-2, //с двухпиксельным смещением
+ int tile_height=2,
+ shift=-2,
i, skin_height;
italic_buf = mem_Alloc(w*h*3);
diff --git a/programs/cmm/end/end.c b/programs/cmm/end/end.c
index 10085df1e6..d24c2243c8 100644
--- a/programs/cmm/end/end.c
+++ b/programs/cmm/end/end.c
@@ -42,7 +42,11 @@ dword stars_col[4]={0xD2CF19, 0x716900, 0x002041}; //0x005BFF -
:void ShadowScreen(dword img, w, h)
{
dword to = w*h*3 + img;
- for ( ; img < to; img+=4) { ESDWORD[img] >>= 1; $and ESDWORD[img], 7F7F7F7Fh }
+ for ( ; img < to; img+=4)
+ {
+ ESDWORD[img] >>= 1;
+ $and ESDWORD[img], 7F7F7F7Fh
+ }
//for ( ; img < to; img+=4) { ESDWORD[img] >>= 2; $and ESDWORD[img], 3F3F3F3Fh }
}
diff --git a/programs/cmm/eolite/include/file_menu.h b/programs/cmm/eolite/include/file_menu.h
index 9519b6ddaf..24b109ed5e 100644
--- a/programs/cmm/eolite/include/file_menu.h
+++ b/programs/cmm/eolite/include/file_menu.h
@@ -50,6 +50,7 @@ void FileMenu()
if (id==104) FnProcess(2);
if (id==105) Del_Form();
if (id==106) FnProcess(5);
+ SwitchToAnotherThread();
ExitProcess();
break;
diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h
index 7608bdab08..df43749ca7 100644
--- a/programs/cmm/lib/kolibri.h
+++ b/programs/cmm/lib/kolibri.h
@@ -240,7 +240,7 @@ inline fastcall void SwitchToAnotherThread()
$int 0x40
}
-inline fastcall void SendWindowMessage( ECX, EDX)
+inline fastcall int SendWindowMessage( ECX, EDX)
{
$mov eax, 72
$mov ebx, 1
@@ -413,7 +413,6 @@ void WriteText(dword x,y,byte fontType, dword color, EDX)
EAX = 4;
EBX = x<<16+y;
ECX = fontType<<24+color;
- ESI = 0;
$int 0x40;
}