diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index 21e24c8805..8c692c8651 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -156,6 +156,7 @@ int j, i; int action_buf; int rand_n; int selected_count; +byte CMD_REFRESH; mouse gestures; signed x_old, y_old, dif_x, dif_y, adif_x, adif_y; @@ -183,6 +184,9 @@ void main() { word key, id, can_show, can_select, m_selected; dword selected_offset; + dword IPC_LEN,IPC_ID; + char IPC_BUF[10]; + dword tmp; rand_n = random(40); gestures.get(); mem_Init(); @@ -194,365 +198,383 @@ void main() SetAppColors(); if (param) { - strcpy(#path, #param); - if (path[strlen(#path)-1]!='/') chrcat(#path, '/'); //add "/" to the end of the string + tmp = strlen(#path); + strncpy(#path, #param, tmp); + $dec tmp + if (path[tmp]!='/') DSBYTE[#path+tmp] = '/'; //add "/" to the end of the string } else { - strcpy(#path, "/rd/1/"); + strncpy(#path, "/rd/1/", 6); } Open_Dir(#path,ONLY_OPEN); SetEventMask(0x27); - loop(){ switch(WaitEvent()) - { - case evMouse: - if (del_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2) break; - if (new_element_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2) - { - edit_box_mouse stdcall(#new_file_ed); - break; - } - - m.get(); - - - gestures.get(); - if (!gestures.mkm) && (stats>0) stats = 0; - if (gestures.mkm) && (stats==0) - { - x_old = gestures.x; - y_old = gestures.y; - stats = 1; - } - if (gestures.mkm) && (stats==1) - { - dif_x = gestures.x-x_old; - dif_y = gestures.y-y_old; - adif_x = fabs(dif_x); - adif_y = fabs(dif_y); - - if (adif_x>adif_y) + loop(){ + switch(WaitEvent()) + { + case evMouse: + if (del_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2) break; + if (new_element_active) || (!CheckActiveProcess(Form.ID)) || (Form.status_window>2) { - if (dif_x > 150) - { - if (HistoryPath(GO_FORWARD)) - { - files.first=files.current=NULL; - Open_Dir(#path,WITH_REDRAW); - } - stats = 0; - } - if (dif_x < -150) - { - GoBack(); - stats = 0; - } - } - else - { - if (dif_y < -100) - { - Dir_Up(); - stats = 0; - } - } - } - if (files.MouseOver(m.x, m.y))&&((m.up)||(m.down)||(m.dblclick)) - { - //select/open file { - if (m.key&MOUSE_LEFT)&&((m.down)||(m.dblclick)) - { - if (m.y>=files.y)//&&(m.click) - { - id = m.y - files.y / files.line_h; - if (files.current!=id) - { - m.clearTime(); - if (id=files.y)//&&(m.click) - { - id = m.y - files.y / files.line_h; - if (files.current!=id) List_Current(id-files.current); - //SwitchToAnotherThread(); - menu_stak = malloc(4096); - CreateThread(#FileMenu,menu_stak+4092); - } + edit_box_mouse stdcall(#new_file_ed); break; - } - // } file menu - } - - if (m.vert) - { - if (files.MouseScroll(m.vert)) List_ReDraw(); - break; - } - - if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>40) && (m.y0) + } + + m.get(); + + + gestures.get(); + if (!gestures.mkm) && (stats>0) stats = 0; + if (gestures.mkm) && (stats==0) { - pause(8); - files.first--; - List_ReDraw(); - m.get(); + x_old = gestures.x; + y_old = gestures.y; + stats = 1; } - DrawRectangle3D(Form.cwidth - 17,41,14,14,0xFFFFFF,0xC7C7C7); - } - - if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>onTop(22,0)+1) && (m.y=Form.width-26) && (m.x<=Form.width-6) && (m.y>56) && (m.ym.y) || (m.y<0) || (m.y>4000) m.y=sc_slider_h/2+files.y; //anee eo?ni? iaa ieiii - id=files.first; - j= sc_slider_h/2; - files.first = m.y -j -files.y * files.count; - files.first /= onTop(22,files.y); - IF (files.visible+files.first>files.count) files.first=files.count-files.visible; - IF (id!=files.first) List_ReDraw(); - } - break; -//Button pressed----------------------------------------------------------------------------- - case evButton: - id=GetButtonID(); - if (id==1) - { - KillProcess(about_window); - ExitProcess(); - } - if (del_active) - { - IF (id==301) || (id==302) Del_File(302-id); - break; - } - if (new_element_active) - { - IF (id==301) || (id==302) NewElement(302-id); - break; - } - - switch(id) - { - case 21: //Back - GoBack(); - break; - case 22: //Forward - if (HistoryPath(GO_FORWARD)) + dif_x = gestures.x-x_old; + dif_y = gestures.y-y_old; + adif_x = fabs(dif_x); + adif_y = fabs(dif_y); + + if (adif_x>adif_y) + { + if (dif_x > 150) { - files.first=files.current=NULL; //aaa?o nienea - Open_Dir(#path,WITH_REDRAW); + if (HistoryPath(GO_FORWARD)) + { + files.first=files.current=NULL; + Open_Dir(#path,WITH_REDRAW); + } + stats = 0; } - break; - case 23: //up! - Dir_Up(); - break; - case 24: //cut - Copy(#file_path, CUT); - break; - case 25: //copy - Copy(#file_path, NOCUT); - break; - case 26: //paste - copy_stak = malloc(4096); - CreateThread(#Paste,copy_stak+4092); - break; - case 31...33: //sort - IF(sort_num==1) DrawFilledBar(sorting_arrow_x,42,6,10); - IF(sort_num==2) DrawFilledBar(sorting_arrow_x,42,6,10); - IF(sort_num==3) DrawFilledBar(sorting_arrow_x,42,6,10); - sort_num=id-30; - Open_Dir(#path,WITH_REDRAW); - break; - case 50...60: //Actions - FnProcess(id-50); - break; - case 100...120: - DEVICE_MARK: - DrawRectangle(17,id-100*16+74,159,16, 0); //auaaeaiea - strcpy(#path, #disk_list[id-100].Item); - files.first=files.current=0; - Open_Dir(#path,WITH_REDRAW); - pause(5); - DrawRectangle(17,id-100*16+74,159,16, 0xFFFFFF); - break; - } - break; -//Key pressed----------------------------------------------------------------------------- - case evKey: - key = GetKey(); - if (Form.status_window>2) break; - IF (del_active) - { - IF (key==013) Del_File(true); - IF (key==027) Del_File(false); - break; - } - IF (new_element_active) - { - IF (key==027) NewElement(0); - IF (key==013) NewElement(1); - EAX=key<<8; - edit_box_key stdcall (#new_file_ed); - break; - } - IF (edit2.flags!=64) && (key!=13) && (key!=27) - { - EAX=key<<8; - edit_box_key stdcall (#edit2); - break; - } - switch (key) - { - case 209...217: - id=key-110; - IF (id-100>=disc_num) break; - GOTO DEVICE_MARK; - case ASCII_KEY_BS: - //GoBack(); + if (dif_x < -150) + { + GoBack(); + stats = 0; + } + } + else + { + if (dif_y < -100) + { Dir_Up(); - break; - case 004: //Ctrl+D set as bg - strcpy(#temp, "\\S__"); - strcat(#temp, #file_path); - RunProgram("/sys/media/kiv", #temp); - break; - case 014: //Ctrl+N new window - IF (Form.left==98) MoveSize(Form.left-20,Form.top-20,OLD,OLD); - RunProgram("/sys/File Managers/Eolite", #path); - break; - case 024: //Ctrl+X - Copy(#file_path, CUT); - break; - case 003: //Ctrl+C - Copy(#file_path, NOCUT); - break; - case 022: //Ctrl+V - copy_stak = malloc(4096); - CreateThread(#Paste,copy_stak+4092); - break; - case 001: //Ctrl+A - debugln("press Ctrl+A"); - for (i=0; i=files.y)//&&(m.click) + { + id = m.y - files.y / files.line_h; + if (files.current!=id) { - selected_offset = file_mas[i]*304 + buf+32 + 7; - ESBYTE[selected_offset] = 1; - selected_count++; + m.clearTime(); + if (id=files.y)//&&(m.click) + { + id = m.y - files.y / files.line_h; + if (files.current!=id) List_Current(id-files.current); //SwitchToAnotherThread(); menu_stak = malloc(4096); CreateThread(#FileMenu,menu_stak+4092); + } + break; + } + // } file menu + } + + if (m.vert) + { + if (files.MouseScroll(m.vert)) List_ReDraw(); + break; + } + + if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>40) && (m.y0) + { + pause(8); + files.first--; + List_ReDraw(); + m.get(); + } + DrawRectangle3D(Form.cwidth - 17,41,14,14,0xFFFFFF,0xC7C7C7); + } + + if (m.x>=Form.width-26) && (m.x<=Form.width-6) && (m.y>onTop(22,0)+1) && (m.y=Form.width-26) && (m.x<=Form.width-6) && (m.y>56) && (m.ym.y) || (m.y<0) || (m.y>4000) m.y=sc_slider_h/2+files.y; //anee eo?ni? iaa ieiii + id=files.first; + j= sc_slider_h/2; + files.first = m.y -j -files.y * files.count; + files.first /= onTop(22,files.y); + if (files.visible+files.first>files.count) files.first=files.count-files.visible; + if (id!=files.first) List_ReDraw(); + } + break; + //Button pressed----------------------------------------------------------------------------- + case evButton: + id=GetButtonID(); + if (id==1) + { + KillProcess(about_window); + ExitProcess(); + } + if (del_active) + { + if (id==301) || (id==302) Del_File(302-id); + break; + } + if (new_element_active) + { + if (id==301) || (id==302) NewElement(302-id); + break; + } + + switch(id) + { + case 21: //Back + GoBack(); break; - case 173: //Ctrl+Enter - if (!itdir) ShowOpenWithDialog(); - else Open(1); - break; - case ASCII_KEY_UP: - List_Current(-1); - break; - case ASCII_KEY_DOWN: - List_Current(1); - break; - case ASCII_KEY_HOME: - if (files.KeyHome()) List_ReDraw(); - break; - case ASCII_KEY_END: - if (files.KeyEnd()) List_ReDraw(); - break; - case ASCII_KEY_PGDN: - List_Current(files.visible-1); - break; - case ASCII_KEY_PGUP: - List_Current(-files.visible+1); - break; - case ASCII_KEY_DEL: - Del_Form(); - break; - case ASCII_KEY_INS: - selected_offset = file_mas[files.current+files.first]*304 + buf+32 + 7; - if (ESBYTE[selected_offset]) + case 22: //Forward + if (HistoryPath(GO_FORWARD)) { - ESBYTE[selected_offset]=0; - selected_count--; + files.first=files.current=NULL; //aaa?o nienea + Open_Dir(#path,WITH_REDRAW); } - else - { - ESBYTE[selected_offset] = 1; - selected_count++; - } - List_Current(1); break; - case 048...059: //F1-F10 - FnProcess(key-49); - break; - default: - for (i=files.current+files.first+1; i2) break; + if (del_active) + { + if (key==013) Del_File(true); + if (key==027) Del_File(false); + break; + } + if (new_element_active) + { + if (key==027) NewElement(0); + if (key==013) NewElement(1); + EAX=key<<8; + edit_box_key stdcall (#new_file_ed); + break; + } + if (edit2.flags!=64) && (key!=13) && (key!=27) + { + EAX=key<<8; + edit_box_key stdcall (#edit2); + break; + } + switch (key) + { + case 209...217: + id=key-110; + if (id-100>=disc_num) break; + GOTO DEVICE_MARK; + case ASCII_KEY_BS: + //GoBack(); + Dir_Up(); + break; + case 004: //Ctrl+D set as bg + strncpy(#temp, "\\S__",4); + strcat(#temp, #file_path); + RunProgram("/sys/media/kiv", #temp); + break; + case 014: //Ctrl+N new window + if (Form.left==98) MoveSize(Form.left-20,Form.top-20,OLD,OLD); + RunProgram("/sys/File Managers/Eolite", #path); + break; + case 024: //Ctrl+X + Copy(#file_path, CUT); + break; + case 003: //Ctrl+C + Copy(#file_path, NOCUT); + break; + case 022: //Ctrl+V + copy_stak = malloc(4096); + CreateThread(#Paste,copy_stak+4092); + break; + case 001: //Ctrl+A + debugln("press Ctrl+A"); + for (i=0; icur) + if (files.first==0) && (files.current<=0) return; + if (-cur-1=files.count) + if (-curcur) + { + Line_ReDraw(0xFFFFFF, files.current); + files.current+=cur; + Line_ReDraw(col_selec, files.current); + return; + } + else + { + if(files.first+files.current+cur>=files.count) { files.first=files.count-files.visible; files.current=cur-files.first+files.current; } - ELSE + else { files.first+=cur+files.current-files.visible+1; files.current=files.visible-1; } - IF (files.current<0) || (files.current>files.visible) + if (files.current<0) || (files.current>files.visible) { files.current=files.visible-1; } @@ -793,15 +823,15 @@ void Open_Dir(dword dir_path, redraw){ KEdit(); HistoryPath(ADD_NEW_PATH); files.visible = files.h / files.line_h; - IF (files.count < files.visible) files.visible = files.count; - IF (sort_num==1) sorting_arrow_x = Form.width+60/2; - IF (sort_num==2) sorting_arrow_x = Form.width-115; - IF (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w; + if (files.count < files.visible) files.visible = files.count; + if (sort_num==1) sorting_arrow_x = Form.width+60/2; + if (sort_num==2) sorting_arrow_x = Form.width-115; + if (sort_num==3) sorting_arrow_x = strlen(T_SIZE)*3-30+files.x+files.w; WriteText(sorting_arrow_x,45,0x80,sc.work_graph,"\x19"); - IF (redraw!=ONLY_SHOW) Sorting(); - IF (redraw!=ONLY_OPEN) List_ReDraw(); + if (redraw!=ONLY_SHOW) Sorting(); + if (redraw!=ONLY_OPEN) List_ReDraw(); } - IF (files.count==-1) && (redraw!=ONLY_OPEN) {files.visible=files.count=0; List_ReDraw();} + if (files.count==-1) && (redraw!=ONLY_OPEN) {files.visible=files.count=0; List_ReDraw();} } @@ -812,10 +842,10 @@ inline Sorting() int i; if (!strcmp(#path,"/")) //do not sort { - FOR(k=1;k=0; j--, file_off-=304;) //files | folders + for (j=files.count-1, file_off=files.count-1*304+buf+32; j>=0; j--, file_off-=304;) //files | folders { if (!real_files_names_case) strttl(file_off+40); if (TestBit(ESDWORD[file_off],4)) //directory? @@ -831,12 +861,12 @@ inline Sorting() } //sorting: files first, then folders Sort_by_Name(0,k-1); - IF (sort_num==1) Sort_by_Name(k,files.count-1); - IF (sort_num==2) Sort_by_Type(k,files.count-1); - IF (sort_num==3) Sort_by_Size(k,files.count-1); + if (sort_num==1) Sort_by_Name(k,files.count-1); + if (sort_num==2) Sort_by_Type(k,files.count-1); + if (sort_num==3) Sort_by_Size(k,files.count-1); //make ".." first item in list - IF (k>0) && (strcmp(file_mas[0]*304+buf+72,"..")!=0) - FOR(k--; k>0; k--;) IF (!strcmp(file_mas[k]*304+buf+72,"..")) {file_mas[k]>0) && (strcmp(file_mas[0]*304+buf+72,"..")!=0) + for(k--; k>0; k--;) if (!strcmp(file_mas[k]*304+buf+72,"..")) {file_mas[k]> was a bug !!! But unfortunately pass away to sacrifice speed. GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); for (i=0; i", 18, 19, 0xFFFfff, 0); - else - Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 19, 0xFFFfff, 0); + if ( file_info_general.isfolder ) + Put_icon("", 18, 19, 0xFFFfff, 0); + else + Put_icon(#file_name2+strrchr(#file_name2,'.'), 18, 19, 0xFFFfff, 0); - WriteText(50, 13, 0x80, 0x000000, PR_T_NAME); + WriteText(50, 13, 0x80, 0x000000, PR_T_NAME); edit_box_draw stdcall (#file_name_ed); - if (!itdir) - { - element_size = file_info_general.sizelo; - } + if (!itdir) element_size = file_info_general.sizelo; else { - WriteText(10, 80, 0x80, 0x000000, PR_T_CONTAINS); + WriteText(10, 80, 0x80, 0x000000, PR_T_CONTAINS); sprintf(#folder_info,"%s%d%s%d",SET_6,file_count,SET_7,dir_count); WriteText(100, 80, 0x80, 0x000000, #folder_info); element_size = size_dir; } - WriteText(10, 95, 0x80, 0x000000, SET_3); - WriteText(10, 110, 0x80, 0x000000, SET_4); - WriteText(10, 125, 0x80, 0x000000, SET_5); + WriteText(10, 110, 0x80, 0x000000, SET_4); + WriteText(10, 125, 0x80, 0x000000, SET_5); DrawDate(100, 95, 0, #file_info_general.datecreate); - DrawDate(100, 110, 0, #file_info_general.datelastaccess); - DrawDate(100, 125, 0, #file_info_general.datelastedit); - - EAX = ConvertSize(element_size); - strcpy(#element_size_label, EAX); - strcat(#element_size_label, " ("); - strcat(#element_size_label, itoa(element_size)); - strcat(#element_size_label, " b)"); - //sprintf(#element_size_label,"%s (%d byte)","",element_size); - //tmp = ConvertSize(element_size); - //sprintf(#element_size_label,"%s (%d byte)",tmp,element_size); + DrawDate(100, 110, 0, #file_info_general.datelastaccess); + DrawDate(100, 125, 0, #file_info_general.datelastedit); + + sprintf(#element_size_label,"%s (%d %s)",ConvertSize(element_size),element_size,SET_BYTE_LANG); WriteText(100, 65, 0x80, 0x000000, #element_size_label); - + flags_frame.size_x = - flags_frame.start_x * 2 + settings_form.cwidth - 2; flags_frame.font_color = sc.work_text; flags_frame.font_backgr_color = sc.work; flags_frame.ext_col = sc.work_graph; frame_draw stdcall (#flags_frame); - + DrawPropertiesCheckBoxes(); } } diff --git a/programs/cmm/eolite/include/settings.h b/programs/cmm/eolite/include/settings.h index f0f92f71c6..4c79bb6d53 100644 --- a/programs/cmm/eolite/include/settings.h +++ b/programs/cmm/eolite/include/settings.h @@ -57,15 +57,10 @@ void settings_dialog() save_files_h = files.line_h; save_DBLTime = MOUSE_TIME; - //SetEventMask(0x27); - loop(){ - switch(WaitEvent()) - { - /*case evMouse: - - break;*/ - case evButton: + switch(WaitEvent()) + { + case evButton: id=GetButtonID(); if (id==10) { @@ -75,29 +70,31 @@ void settings_dialog() cmd_free = 4; ExitProcess(); } - if (id==1) || (id==11) + else if (id==1) || (id==11) { active_settings=0; goto EXIT_SETTING; } - if (id==5) + else if (id==5) { RunProgram("tinypad", "/sys/settings/assoc.ini"); break; } - if (id==20) show_dev_name ^= 1; - if (id==21) real_files_names_case ^= 1; - if (id==22) info_after_copy ^= 1; - if (id==23) use_big_fonts ^= 1; - if (id==25) files.line_h++; - if (id==26) && (files.line_h>8) files.line_h--; - if (id==27) MOUSE_TIME++; - if (id==28) && (MOUSE_TIME>30) MOUSE_TIME--; - RefreshWindow(Form.ID,settings_form.ID); + else if (id==20) show_dev_name ^= 1; + else if (id==21) real_files_names_case ^= 1; + else if (id==22) info_after_copy ^= 1; + else if (id==23) use_big_fonts ^= 1; + else if (id==25) files.line_h++; + else if (id==26) && (files.line_h>14) files.line_h--; + else if (id==27) MOUSE_TIME++; + else if (id==28) && (MOUSE_TIME>29) MOUSE_TIME--; + //CMD_REFRESH = true; + MoveSize(-1,-1,-1,settings_form.height+1); + MoveSize(-1,-1,-1,settings_form.height); DrawSettingsCheckBoxes(); - break; - - case evKey: + break; + + case evKey: key = GetKey(); if (key==27) { @@ -106,15 +103,15 @@ void settings_dialog() goto EXIT_SETTING; } break; - - case evReDraw: + + case evReDraw: DefineAndDrawWindow(Form.left + Form.width/2, Form.top + Form.height/2 - 75, 300, 234+GetSkinHeight(),0x34,sc.work,TITLE_SETT); GetProcessInfo(#settings_form, SelfInfo); DrawSettingsCheckBoxes(); DrawFlatButton(9, 166, strlen(EDIT_FILE_ASSOCIATIONS)+4*6, 22, 5, 0xE4DFE1, EDIT_FILE_ASSOCIATIONS); DrawFlatButton(128, settings_form.cheight - 30, 70, 22, 10, 0xE4DFE1, APPLY_T); DrawFlatButton(208, settings_form.cheight - 30, 70, 22, 11, 0xE4DFE1, CANCEL_T); - } + } } } diff --git a/programs/cmm/lib/file_system.h b/programs/cmm/lib/file_system.h index 3493027c82..bad31a49c5 100644 --- a/programs/cmm/lib/file_system.h +++ b/programs/cmm/lib/file_system.h @@ -33,8 +33,8 @@ :void DrawDate(dword x, y, color, in_date) { - char text[15]; - /*EDI = in_date; + //char text[15]; + EDI = in_date; EAX = 47; EBX = 2<<16; EDX = x<<16+y; @@ -47,10 +47,11 @@ EDX += 18<<16; EBX = 4<<16; ECX = EDI.date.year; - $int 0x40;*/ - - //sprintf(#text,"%s","ddf"); - WriteText(x, y, 0x80, color, "adas\0"); + $int 0x40; + PutPixel(x+14,y+6,color); + PutPixel(x+32,y+6,color); + //sprintf(#text,"%d",EDI.date.year); + //WriteText(x, y, 0x80, 0x000000, #text); } @@ -301,18 +302,17 @@ enum return #absolute_path; } +:byte ConvertSize_size_prefix[8]; :dword ConvertSize(dword bytes) { - byte size_prefix[8], size_nm[4]; - if (bytes>=1073741824) strcpy(#size_nm, "Gb"); - else if (bytes>=1048576) strcpy(#size_nm, "Mb"); - else if (bytes>=1024) strcpy(#size_nm, "Kb"); - else strcpy(#size_nm, "b"); + byte size_nm[4]; + if (bytes>=1073741824) strncpy(#size_nm, "Gb",2); + else if (bytes>=1048576) strncpy(#size_nm, "Mb",2); + else if (bytes>=1024) strncpy(#size_nm, "Kb",2); + else strncpy(#size_nm, "b ",2); while (bytes>1023) bytes/=1024; - itoa_(#size_prefix, bytes); - strcat(#size_prefix, #size_nm); - //sprintf(#size_prefix,"%s","123"); - return #size_prefix; + sprintf(#ConvertSize_size_prefix,"%d %s",bytes,#size_nm); + return #ConvertSize_size_prefix; } :dword ConvertSizeToKb(unsigned int bytes) diff --git a/programs/cmm/lib/kolibri.h b/programs/cmm/lib/kolibri.h index 0554238d83..c591811442 100644 --- a/programs/cmm/lib/kolibri.h +++ b/programs/cmm/lib/kolibri.h @@ -302,6 +302,8 @@ inline fastcall dword WaitEvent() $mov eax,10 $int 0x40 wait_event_code = EAX; + //if(wait_event_code==evMouse) MOUSE.get(); + //return wait_event_code; } inline fastcall dword CheckEvent() @@ -786,6 +788,20 @@ inline RefreshWindow(dword ID_REFRESH,ID_ACTIVE) $int 0x40 } +inline getIPC(ECX,EDX) +{ + $mov EAX,60 + $mov EBX,2 + $int 0x40 +} + +inline sendIPC(ECX,EDX,ESI) +{ + $mov EAX,60 + $mov EBX,1 + $int 0x40 +} + void UnsafeDefineButton(dword x,y,w,h,EDX,ESI) { EAX = 8; @@ -818,6 +834,7 @@ inline fastcall dword GetStartTime() DefineAndDrawWindow(215,100,250,200,0x34,0xFFFFFF,"Alert"); WriteTextB(5,5,0x90,0x0,ALERT_TEXT); break; + case evKey: case evButton: id=GetButtonID(); if (id==1) ExitProcess(); diff --git a/programs/cmm/lib/strings.h b/programs/cmm/lib/strings.h index 6e6ee1378c..5f215cc22a 100644 --- a/programs/cmm/lib/strings.h +++ b/programs/cmm/lib/strings.h @@ -618,16 +618,15 @@ F3: return #buffer; } */ - +:unsigned char BUF_ITOA[11]; inline dword itoa(signed long number) { - unsigned char buf[11]; dword ret,p; byte cmd; long mask,tmp; mask = 1000000000; cmd = true; - p = #buf; + p = #BUF_ITOA; if(!number){ ESBYTE[p] = '0'; ESBYTE[p+1] = 0; diff --git a/programs/other/kpack/trunk/kpack.asm b/programs/other/kpack/trunk/kpack.asm index 39bfd706f9..f645b32451 100644 --- a/programs/other/kpack/trunk/kpack.asm +++ b/programs/other/kpack/trunk/kpack.asm @@ -55,7 +55,7 @@ include '../../../develop/libraries/box_lib/load_lib.mac' START: mcall 68,11 - mcall 40,0x27 + mcall 40,0x80000027 load_libraries l_libs_start,load_lib_end cmp eax,-1