diff --git a/programs/fs/mfar/trunk/build_en.bat b/programs/fs/mfar/trunk/build_en.bat index 4537f0e016..f790012551 100644 --- a/programs/fs/mfar/trunk/build_en.bat +++ b/programs/fs/mfar/trunk/build_en.bat @@ -1,4 +1,4 @@ -@erase lang.inc @echo lang fix en >lang.inc @fasm mfar.asm mfar +@erase lang.inc @pause \ No newline at end of file diff --git a/programs/fs/mfar/trunk/build_ru.bat b/programs/fs/mfar/trunk/build_ru.bat index 9c3c0b9902..2112fe0a8c 100644 --- a/programs/fs/mfar/trunk/build_ru.bat +++ b/programs/fs/mfar/trunk/build_ru.bat @@ -1,4 +1,4 @@ -@erase lang.inc @echo lang fix ru >lang.inc @fasm mfar.asm mfar +@erase lang.inc @pause \ No newline at end of file diff --git a/programs/fs/mfar/trunk/macros.inc b/programs/fs/mfar/trunk/macros.inc new file mode 100644 index 0000000000..f3c83392d3 --- /dev/null +++ b/programs/fs/mfar/trunk/macros.inc @@ -0,0 +1,227 @@ +; new application structure +macro meos_app_start + { + use32 + org 0x0 + + db 'MENUET01' + dd 0x01 + dd __start + dd __end + dd __memory + dd __stack + + if used __params & ~defined __params + dd __params + else + dd 0x0 + end if + + dd 0x0 + } +MEOS_APP_START fix meos_app_start + +macro code + { + __start: + } +CODE fix code + +macro data + { + __data: + } +DATA fix data + +macro udata + { + if used __params & ~defined __params + __params: + db 0 + __end: + rb 255 + else + __end: + end if + __udata: + } +UDATA fix udata + +macro meos_app_end + { + align 32 + rb 2048 + __stack: + __memory: + } +MEOS_APP_END fix meos_app_end + + +; macro for defining multiline text data +struc mstr [sstring] + { + forward + local ssize + virtual at 0 + db sstring + ssize = $ + end virtual + dd ssize + db sstring + common + dd -1 + } + + +; language for programs +lang fix ru ; ru en fr ge fi + + +; code profiling +macro STARTTIMER + { + push ecx + push ebx + rdtsc + push edx + push eax + } + +macro STOPTIMER ;edx:eax = cpu cycles ellapsed + { + rdtsc + pop ebx + pop ecx + clc + sbb eax,ebx + sbb edx,ecx + pop ebx + pop ecx + } + + +; optimize the code for size +macro add arg1,arg2 + { + if arg1 in + if arg2 eqtype 0 + if (arg2) = 1 + inc arg1 + else + add arg1,arg2 + end if + else + add arg1,arg2 + end if + else + add arg1,arg2 + end if + } + +macro sub arg1,arg2 + { + if arg2 eqtype 0 + if (arg2) = 1 + dec arg1 + else + sub arg1,arg2 + end if + else + sub arg1,arg2 + end if + } + +macro mov arg1,arg2 + { + if arg1 in + if arg2 eqtype 0 + if (arg2) = 0 + xor arg1,arg1 + else if (arg2) = 1 + xor arg1,arg1 + inc arg1 + else if (arg2) = -1 + or arg1,-1 + else if (arg2) > -128 & (arg2) < 128 + push arg2 + pop arg1 + else + mov arg1,arg2 + end if + else + mov arg1,arg2 + end if + else + mov arg1,arg2 + end if + } + + +macro struct name + { + virtual at 0 + name name + sizeof.#name = $ - name + end virtual + } + + +; structures used in MeOS +struc process_information + { + .cpu_usage dd ? ; +0 + .window_stack_position dw ? ; +4 + .window_stack_value dw ? ; +6 + .not_used1 dw ? ; +8 + .process_name rb 12 ; +10 + .memory_start dd ? ; +22 + .used_memory dd ? ; +26 + .PID dd ? ; +30 + .x_start dd ? ; +34 + .y_start dd ? ; +38 + .x_size dd ? ; +42 + .y_size dd ? ; +46 + .slot_state dw ? ; +50 + rb (1024-52) + } +struct process_information + +struc system_colors + { + .frame dd ? + .grab dd ? + .grab_button dd ? + .grab_button_text dd ? + .grab_text dd ? + .work dd ? + .work_button dd ? + .work_button_text dd ? + .work_text dd ? + .work_graph dd ? + } +struct system_colors + + +; constants + +; events +EV_IDLE = 0 +EV_TIMER = 0 +EV_REDRAW = 1 +EV_KEY = 2 +EV_BUTTON = 3 +EV_EXIT = 4 +EV_BACKGROUND = 5 +EV_MOUSE = 6 +EV_IPC = 7 +EV_STACK = 8 + +; event mask bits for function 40 +EVM_REDRAW = 1b +EVM_KEY = 10b +EVM_BUTTON = 100b +EVM_EXIT = 1000b +EVM_BACKGROUND = 10000b +EVM_MOUSE = 100000b +EVM_IPC = 1000000b +EVM_STACK = 10000000b \ No newline at end of file diff --git a/programs/fs/mfar/trunk/menuet.inc b/programs/fs/mfar/trunk/menuet.inc index f27ea15079..a337234d9c 100644 --- a/programs/fs/mfar/trunk/menuet.inc +++ b/programs/fs/mfar/trunk/menuet.inc @@ -137,16 +137,17 @@ MF_SOUND = 55 SND_PLAYBLOCK = 1 SND_SETFORMAT = 2 SF_SETLENGTH = 1 -MF_HDWRITEFILE = 56 -MF_HDDELFILE = 57 -MF_FSACCESS = 58 - FS_READ = 0 - FS_WRITE = 1 - FS_DELETE = 2 +;MF_HDWRITEFILE = 56 +;MF_HDDELFILE = 57 +MF_FSACCESS = 70 + FS_READ = 999999 + FS_READ_FILE = 0 + FS_READ_FOLDER = 1 + FS_WRITE_FILE = 2 FS_APPEND = 3 - FS_LBAREAD = 8 - FS_LBAWRITE = 9 - FS_EXECUTE = 16 + FS_EXECUTE = 7 + FS_DELETE = 8 + FS_CREATE_FOL = 9 MF_SYSTRACE = 59 ST_GETEVENTS = 0 MF_IPC = 60 diff --git a/programs/fs/mfar/trunk/mf-copy.inc b/programs/fs/mfar/trunk/mf-copy.inc index 788bb4bda3..930c1f2d1f 100644 --- a/programs/fs/mfar/trunk/mf-copy.inc +++ b/programs/fs/mfar/trunk/mf-copy.inc @@ -2,7 +2,7 @@ ;///// COPYING //////////////////////////////////////////////////////////////// ;------------------------------------------------------------------------------ -__func copy_file +func copy_file pushad cmp [active_panel],0 @@ -126,7 +126,7 @@ endf ;------------------------------------------------------------------------------ -__func draw_window_copy_main +func draw_window_copy_main mcall2 MF_FILLRECT,oX+tW*2,tW*76,oY+tH*7,tH*8,0x00C0C0C0 mmov esi,oX+tW*4+2,oX+tW*75+3 @@ -168,7 +168,7 @@ endf ;------------------------------------------------------------------------------ -__func draw_copy_input +func draw_copy_input mcall2 MF_FILLRECT,oX+tW*6,tW*68,oY+tH*10,tH,0x00008080 mov edx,fc_info.path diff --git a/programs/fs/mfar/trunk/mf-sort.inc b/programs/fs/mfar/trunk/mf-sort.inc index 221796cca6..6b44c0a9f3 100644 --- a/programs/fs/mfar/trunk/mf-sort.inc +++ b/programs/fs/mfar/trunk/mf-sort.inc @@ -11,7 +11,7 @@ align 4 dd compare_by_extension ; AL = panel -__func mfar_sort +func mfar_sort pusha cmp al,0 jne ._00 @@ -69,7 +69,7 @@ endf ; ESI = pointer to 1st file info ; EDI = pointer to 2nd file info -__func compare_by_name +func compare_by_name mov ecx,11 push edi esi repe cmpsb @@ -102,7 +102,7 @@ endf ; ESI = pointer to 1st file info ; EDI = pointer to 2nd file info -__func compare_by_extension +func compare_by_extension push edi esi mov ecx,3 add esi,8 @@ -137,4 +137,4 @@ __func compare_by_extension popfd ._05: ret -endf +endf \ No newline at end of file diff --git a/programs/fs/mfar/trunk/mfar.asm b/programs/fs/mfar/trunk/mfar.asm index c8134c4edf..66a4724fbf 100644 --- a/programs/fs/mfar/trunk/mfar.asm +++ b/programs/fs/mfar/trunk/mfar.asm @@ -26,7 +26,6 @@ org 0 ; +0004C300:FFFB3CFF - dinamically allocated for copy, view, edit etc. ; -include 'lang.inc' include 'macros.inc' include 'menuet.inc' include 'mfar.inc' @@ -290,14 +289,14 @@ still: ;///// DRAW WINDOW //////////////////////////////////////////////////////////// ;------------------------------------------------------------------------------ -__func draw_window +func draw_window mcall MF_WINPROPS,WP_GETSYSCLRS,sc,sizeof.system_colors mcall MF_WNDDRAW,WD_BEGINDRAW mov edx,[fc.background] - or edx,WS_SKINNED + or edx,$14000000 + mov edi,caption mcall2 MF_DEFWINDOW,90,oX+tW*80+4,45,oY+tH*25+4 - mcall1 MF_DRAWTEXT,8,8,[sc.grab_text],caption,caption.size mmov esi,oX+2,oX+tW*39+2 mmov edi,oY+3,oY+tH*22+3 @@ -340,7 +339,7 @@ endf ;////////////////////////////////////////////////////////////////////////////// ;------------------------------------------------------------------------------ -__func draw_window_full +func draw_window_full call draw_window mov edx,1 call get_files_data @@ -360,7 +359,7 @@ endf align 4 len dd ? -__func get_normal_path +func get_normal_path pusha mov ecx,5 rep movsb @@ -394,7 +393,7 @@ endf ; EAX = length needed ; ECX = current length ; EDI = path string -__func get_path_ellipses +func get_path_ellipses cmp ecx,eax jbe @f pushad @@ -416,7 +415,7 @@ endf ;////////////////////////////////////////////////////////////////////////////// ;------------------------------------------------------------------------------ -__func draw_path +func draw_path pushad cmp [active_panel],0 jne ._00 @@ -444,7 +443,7 @@ endf ;------------------------------------------------------------------------------ ; AL = panel -__func draw_files +func draw_files push eax mmov ecx,oY+tH*2-1,tH*FPC mov edx,[fc.background] @@ -519,7 +518,7 @@ endf ;////////////////////////////////////////////////////////////////////////////// ;------------------------------------------------------------------------------ -__func draw_bottom_keys +func draw_bottom_keys pushad mcall2 MF_FILLRECT,oX-1,tW*80+1,oY+tH*24-1,tH+1,[fc.pathbg] dec ecx @@ -551,7 +550,7 @@ endf ; ESI = X1*65536+X2 ; EDI = Y1*65536+Y2 ; EDX = color -__func draw_frame +func draw_frame mov ecx,edi mov ebx,edi shr ebx,16 @@ -578,7 +577,7 @@ endf ;------------------------------------------------------------------------------ ; EDX = pointer to file data -__func get_file_color +func get_file_color push esi mov cl,[edx+11] test cl,(FA_HIDDEN or FA_SYSTEM) @@ -632,7 +631,7 @@ endf ;------------------------------------------------------------------------------ ; EDI = color -__func draw_sel +func draw_sel pushad cmp [active_panel],0 jne ._00 @@ -715,7 +714,7 @@ endf ;------------------------------------------------------------------------------ ; AL = panel -__func draw_file_info +func draw_file_info push eax mmov ecx,oY+tH*21,tH mov edx,[fc.background] @@ -790,7 +789,7 @@ endf ;////////////////////////////////////////////////////////////////////////////// ;------------------------------------------------------------------------------ -__func get_file_name +func get_file_name pushad mov eax,[esi+0] mov [f_name+0],eax @@ -810,7 +809,7 @@ endf ;------------------------------------------------------------------------------ ; ESI = pointer to file data -__func get_file_info +func get_file_info pushad mov eax,[esi+12] mov dword[f_info],FS_READ @@ -888,7 +887,7 @@ endf ;------------------------------------------------------------------------------ ; DL = panel -__func get_files_data +func get_files_data pushad mov [d_tcnt],0 mov [d_ttsz],0 @@ -985,7 +984,7 @@ endf ;////////////////////////////////////////////////////////////////////////////// ;------------------------------------------------------------------------------ -__func execute_current_file +func execute_current_file pushad cmp [active_panel],0 jne ._00 @@ -1080,7 +1079,7 @@ endf ;////////////////////////////////////////////////////////////////////////////// ;------------------------------------------------------------------------------ -__func delete_current_file +func delete_current_file pushad popad ret @@ -1124,12 +1123,12 @@ f_info: dd read_area dd MEM_FOR_OS .path: - rb 200 + rb 255 f_plen0 dd 5 f_plen1 dd 5 -sz caption,'MFAR : PRE-ALPHA-8.1' +sz caption,'MFAR : PRE-ALPHA-8.1',0 sz fcfile,'MFAR DAT' sz p_hd,'/HD/1',0 sz p_rd,'/RD/1',0 diff --git a/programs/fs/copy2/trunk/Tupfile.lua b/programs/other/outdated/copy2/trunk/Tupfile.lua similarity index 100% rename from programs/fs/copy2/trunk/Tupfile.lua rename to programs/other/outdated/copy2/trunk/Tupfile.lua diff --git a/programs/fs/copy2/trunk/build_en.bat b/programs/other/outdated/copy2/trunk/build_en.bat similarity index 100% rename from programs/fs/copy2/trunk/build_en.bat rename to programs/other/outdated/copy2/trunk/build_en.bat diff --git a/programs/fs/copy2/trunk/build_ge.bat b/programs/other/outdated/copy2/trunk/build_ge.bat similarity index 100% rename from programs/fs/copy2/trunk/build_ge.bat rename to programs/other/outdated/copy2/trunk/build_ge.bat diff --git a/programs/fs/copy2/trunk/build_ru.bat b/programs/other/outdated/copy2/trunk/build_ru.bat similarity index 100% rename from programs/fs/copy2/trunk/build_ru.bat rename to programs/other/outdated/copy2/trunk/build_ru.bat diff --git a/programs/fs/copy2/trunk/copy2.asm b/programs/other/outdated/copy2/trunk/copy2.asm similarity index 99% rename from programs/fs/copy2/trunk/copy2.asm rename to programs/other/outdated/copy2/trunk/copy2.asm index f1b185bc74..f1d071d886 100644 --- a/programs/fs/copy2/trunk/copy2.asm +++ b/programs/other/outdated/copy2/trunk/copy2.asm @@ -27,7 +27,7 @@ dd 0x0 , 0x0 ; I_Param , I_Icon include 'lang.inc' -include '..\..\..\macros.inc' ; very useful stuff for MeOS +include '..\..\..\..\macros.inc' ; very useful stuff for MeOS STRLEN = 48 ; maximal length of filename diff --git a/programs/other/dictionary/API.INC b/programs/other/outdated/dictionary/API.INC similarity index 100% rename from programs/other/dictionary/API.INC rename to programs/other/outdated/dictionary/API.INC diff --git a/programs/other/dictionary/Tupfile.lua b/programs/other/outdated/dictionary/Tupfile.lua similarity index 100% rename from programs/other/dictionary/Tupfile.lua rename to programs/other/outdated/dictionary/Tupfile.lua diff --git a/programs/other/dictionary/build.bat b/programs/other/outdated/dictionary/build.bat similarity index 100% rename from programs/other/dictionary/build.bat rename to programs/other/outdated/dictionary/build.bat diff --git a/programs/other/dictionary/dictionary.ASM b/programs/other/outdated/dictionary/dictionary.ASM similarity index 93% rename from programs/other/dictionary/dictionary.ASM rename to programs/other/outdated/dictionary/dictionary.ASM index 12d07bd325..2e3bf03332 100644 --- a/programs/other/dictionary/dictionary.ASM +++ b/programs/other/outdated/dictionary/dictionary.ASM @@ -11,12 +11,12 @@ use32 ; dd 0x0 ; указатель на строку с параметрами. dd 0;pathprog ;путь и имя проги -include "../../macros.inc" -include "../../proc32.inc" +include "../../../macros.inc" +include "../../../proc32.inc" include "API.INC" -include "../../dll.inc" -include '../../develop/libraries/box_lib/trunk/box_lib.mac' -include '../../develop/libraries/box_lib/load_lib.mac' +include "../../../dll.inc" +include '../../../develop/libraries/box_lib/trunk/box_lib.mac' +include '../../../develop/libraries/box_lib/load_lib.mac' start: mcall 68,11 ;инициализируем кучу diff --git a/programs/other/dictionary/dictionary.wrd b/programs/other/outdated/dictionary/dictionary.wrd similarity index 100% rename from programs/other/dictionary/dictionary.wrd rename to programs/other/outdated/dictionary/dictionary.wrd diff --git a/programs/media/imgview/MCSMEMM.H b/programs/other/outdated/imgview/MCSMEMM.H similarity index 100% rename from programs/media/imgview/MCSMEMM.H rename to programs/other/outdated/imgview/MCSMEMM.H diff --git a/programs/media/imgview/STDARG.H b/programs/other/outdated/imgview/STDARG.H similarity index 100% rename from programs/media/imgview/STDARG.H rename to programs/other/outdated/imgview/STDARG.H diff --git a/programs/media/imgview/bin/ChangeLog b/programs/other/outdated/imgview/bin/ChangeLog similarity index 100% rename from programs/media/imgview/bin/ChangeLog rename to programs/other/outdated/imgview/bin/ChangeLog diff --git a/programs/media/imgview/bin/readme b/programs/other/outdated/imgview/bin/readme similarity index 100% rename from programs/media/imgview/bin/readme rename to programs/other/outdated/imgview/bin/readme diff --git a/programs/media/imgview/compile.bat b/programs/other/outdated/imgview/compile.bat similarity index 100% rename from programs/media/imgview/compile.bat rename to programs/other/outdated/imgview/compile.bat diff --git a/programs/media/imgview/dlgopen.cpp b/programs/other/outdated/imgview/dlgopen.cpp similarity index 100% rename from programs/media/imgview/dlgopen.cpp rename to programs/other/outdated/imgview/dlgopen.cpp diff --git a/programs/media/imgview/dlgopen.h b/programs/other/outdated/imgview/dlgopen.h similarity index 100% rename from programs/media/imgview/dlgopen.h rename to programs/other/outdated/imgview/dlgopen.h diff --git a/programs/media/imgview/formats/bmp.cpp b/programs/other/outdated/imgview/formats/bmp.cpp similarity index 100% rename from programs/media/imgview/formats/bmp.cpp rename to programs/other/outdated/imgview/formats/bmp.cpp diff --git a/programs/media/imgview/formats/bmp.h b/programs/other/outdated/imgview/formats/bmp.h similarity index 100% rename from programs/media/imgview/formats/bmp.h rename to programs/other/outdated/imgview/formats/bmp.h diff --git a/programs/media/imgview/formats/pcx.cpp b/programs/other/outdated/imgview/formats/pcx.cpp similarity index 100% rename from programs/media/imgview/formats/pcx.cpp rename to programs/other/outdated/imgview/formats/pcx.cpp diff --git a/programs/media/imgview/formats/pcx.h b/programs/other/outdated/imgview/formats/pcx.h similarity index 100% rename from programs/media/imgview/formats/pcx.h rename to programs/other/outdated/imgview/formats/pcx.h diff --git a/programs/media/imgview/formats/tga.cpp b/programs/other/outdated/imgview/formats/tga.cpp similarity index 100% rename from programs/media/imgview/formats/tga.cpp rename to programs/other/outdated/imgview/formats/tga.cpp diff --git a/programs/media/imgview/formats/tga.h b/programs/other/outdated/imgview/formats/tga.h similarity index 100% rename from programs/media/imgview/formats/tga.h rename to programs/other/outdated/imgview/formats/tga.h diff --git a/programs/media/imgview/gfx.cpp b/programs/other/outdated/imgview/gfx.cpp similarity index 100% rename from programs/media/imgview/gfx.cpp rename to programs/other/outdated/imgview/gfx.cpp diff --git a/programs/media/imgview/img/btn_fit.bmp b/programs/other/outdated/imgview/img/btn_fit.bmp similarity index 100% rename from programs/media/imgview/img/btn_fit.bmp rename to programs/other/outdated/imgview/img/btn_fit.bmp diff --git a/programs/media/imgview/img/btn_next.bmp b/programs/other/outdated/imgview/img/btn_next.bmp similarity index 100% rename from programs/media/imgview/img/btn_next.bmp rename to programs/other/outdated/imgview/img/btn_next.bmp diff --git a/programs/media/imgview/img/btn_open.bmp b/programs/other/outdated/imgview/img/btn_open.bmp similarity index 100% rename from programs/media/imgview/img/btn_open.bmp rename to programs/other/outdated/imgview/img/btn_open.bmp diff --git a/programs/media/imgview/img/btn_prev.bmp b/programs/other/outdated/imgview/img/btn_prev.bmp similarity index 100% rename from programs/media/imgview/img/btn_prev.bmp rename to programs/other/outdated/imgview/img/btn_prev.bmp diff --git a/programs/media/imgview/img/template.bmp b/programs/other/outdated/imgview/img/template.bmp similarity index 100% rename from programs/media/imgview/img/template.bmp rename to programs/other/outdated/imgview/img/template.bmp diff --git a/programs/media/imgview/kosSyst.cpp b/programs/other/outdated/imgview/kosSyst.cpp similarity index 100% rename from programs/media/imgview/kosSyst.cpp rename to programs/other/outdated/imgview/kosSyst.cpp diff --git a/programs/media/imgview/kosSyst.h b/programs/other/outdated/imgview/kosSyst.h similarity index 100% rename from programs/media/imgview/kosSyst.h rename to programs/other/outdated/imgview/kosSyst.h diff --git a/programs/media/imgview/main.cpp b/programs/other/outdated/imgview/main.cpp similarity index 100% rename from programs/media/imgview/main.cpp rename to programs/other/outdated/imgview/main.cpp diff --git a/programs/media/imgview/mcsmemm.cpp b/programs/other/outdated/imgview/mcsmemm.cpp similarity index 100% rename from programs/media/imgview/mcsmemm.cpp rename to programs/other/outdated/imgview/mcsmemm.cpp diff --git a/programs/media/mv/trunk/Tupfile.lua b/programs/other/outdated/mv/trunk/Tupfile.lua similarity index 100% rename from programs/media/mv/trunk/Tupfile.lua rename to programs/other/outdated/mv/trunk/Tupfile.lua diff --git a/programs/media/mv/trunk/build_en.bat b/programs/other/outdated/mv/trunk/build_en.bat similarity index 100% rename from programs/media/mv/trunk/build_en.bat rename to programs/other/outdated/mv/trunk/build_en.bat diff --git a/programs/media/mv/trunk/build_ru.bat b/programs/other/outdated/mv/trunk/build_ru.bat similarity index 100% rename from programs/media/mv/trunk/build_ru.bat rename to programs/other/outdated/mv/trunk/build_ru.bat diff --git a/programs/media/mv/trunk/mv.asm b/programs/other/outdated/mv/trunk/mv.asm similarity index 99% rename from programs/media/mv/trunk/mv.asm rename to programs/other/outdated/mv/trunk/mv.asm index c04319d6f0..28cbc5feb2 100644 --- a/programs/media/mv/trunk/mv.asm +++ b/programs/other/outdated/mv/trunk/mv.asm @@ -35,8 +35,8 @@ dd temp_area , 0x0 ; I_Param , I_Icon include 'lang.inc' -include '..\..\..\macros.inc' -include '..\..\..\develop\examples\editbox\trunk\editbox.inc' +include '..\..\..\..\macros.inc' +include '..\..\..\..\develop\examples\editbox\trunk\editbox.inc' ;include 'macros.inc' ;include 'EDITBOX.INC' use_edit_box