diff --git a/data/Tupfile.lua b/data/Tupfile.lua index b5cb3ef43..12c625cc6 100644 --- a/data/Tupfile.lua +++ b/data/Tupfile.lua @@ -428,7 +428,7 @@ tup.append_table(img_files, { {"GMON", VAR_PROGS .. "/system/gmon/gmon"}, {"HDD_INFO", VAR_PROGS .. "/system/hdd_info/hdd_info"}, {"KBD", VAR_PROGS .. "/testing/kbd/kbd"}, - {"KPACK", VAR_PROGS .. "/other/kpack/trunk/kpack"}, + {"KPACK", VAR_PROGS .. "/other/kpack/kpack"}, {"LAUNCHER", VAR_PROGS .. "/system/launcher/launcher"}, {"LOADDRV", VAR_PROGS .. "/system/loaddrv/loaddrv"}, {"MAGNIFY", VAR_PROGS .. "/system/magnify/magnify"}, diff --git a/programs/build_all.bat b/programs/build_all.bat index 671ea7d77..bcbf4a7d8 100644 --- a/programs/build_all.bat +++ b/programs/build_all.bat @@ -240,7 +240,7 @@ fasm system\skincfg\skincfg.asm %BIN%\nightbuild\skincfg fasm system\hdd_info\hdd_info.asm %BIN%\nightbuild\hdd_info fasm testing\mgb\mgb.asm %BIN%\nightbuild\mgb fasm system\rdsave\rdsave.asm %BIN%\nightbuild\rdsave -fasm other\kpack\trunk\kpack.asm %BIN%\nightbuild\kpack +fasm other\kpack\kpack.asm %BIN%\nightbuild\kpack fasm other\rtfread\rtfread.asm %BIN%\nightbuild\rtfread ;restore echo __CPU_type fix %res% > config.inc @@ -299,7 +299,7 @@ echo * echo Compressing develop echo * -kpack %BIN%\cmd +rem kpack %BIN%\cmd kpack %BIN%\develop\fasm kpack %BIN%\develop\h2d2b kpack %BIN%\demos\heed diff --git a/programs/other/kpack/trunk/Tupfile.lua b/programs/other/kpack/Tupfile.lua similarity index 100% rename from programs/other/kpack/trunk/Tupfile.lua rename to programs/other/kpack/Tupfile.lua diff --git a/programs/other/kpack/trunk/build.bat b/programs/other/kpack/build.bat similarity index 100% rename from programs/other/kpack/trunk/build.bat rename to programs/other/kpack/build.bat diff --git a/programs/other/kpack/trunk/build.sh b/programs/other/kpack/build.sh similarity index 100% rename from programs/other/kpack/trunk/build.sh rename to programs/other/kpack/build.sh diff --git a/programs/other/kpack/trunk/calltrick2.inc b/programs/other/kpack/calltrick2.inc similarity index 100% rename from programs/other/kpack/trunk/calltrick2.inc rename to programs/other/kpack/calltrick2.inc diff --git a/programs/other/kpack/trunk/const_var.inc b/programs/other/kpack/const_var.inc similarity index 100% rename from programs/other/kpack/trunk/const_var.inc rename to programs/other/kpack/const_var.inc diff --git a/programs/other/kpack/trunk/data.inc b/programs/other/kpack/data.inc similarity index 100% rename from programs/other/kpack/trunk/data.inc rename to programs/other/kpack/data.inc diff --git a/programs/other/kpack/trunk/kerpack.inc b/programs/other/kpack/kerpack.inc similarity index 100% rename from programs/other/kpack/trunk/kerpack.inc rename to programs/other/kpack/kerpack.inc diff --git a/programs/other/kpack/trunk/kpack.asm b/programs/other/kpack/kpack.asm similarity index 92% rename from programs/other/kpack/trunk/kpack.asm rename to programs/other/kpack/kpack.asm index d354ee437..aebbbe55e 100644 --- a/programs/other/kpack/trunk/kpack.asm +++ b/programs/other/kpack/kpack.asm @@ -1,570 +1,573 @@ -;--------------------------------------------------------------------- -; Kpack - Kolibri Packer -; Kolibri version -; Written by diamond in 2006, 2007 specially for KolibriOS -; -; Disassemled and corrected in 2010-2011 specially for FASM -; by Marat Zakiyanov aka Mario79, aka Mario -; -; Uses LZMA compression library by Igor Pavlov -; (for more information on LZMA and 7-Zip visit http://www.7-zip.org) -; (plain-C packer and ASM unpacker are ported by diamond) -;--------------------------------------------------------------------- -use32 - org 0 - - db 'MENUET01' - dd 1 - dd START - dd IM_END - dd I_END - dd stacktop - dd params - dd cur_dir_path -;--------------------------------------------------------------------- -include '../../../config.inc' ;for nightbuild -include '../../../KOSfuncs.inc' -include '../../../macros.inc' -include '../../../gui_patterns.inc' -include '../../../develop/libraries/box_lib/trunk/box_lib.mac' -include '../../../load_lib.mac' - @use_library - -START: - mcall SF_SYS_MISC,SSF_HEAP_INIT - mcall SF_SET_EVENTS_MASK,0x80000027 - - load_libraries l_libs_start,load_lib_end - cmp eax,-1 - je exit - - init_checkboxes2 check1,check1_end - call clear_messages - -; pack kernel ? - cmp [params], dword '-ker' - jne @f - - mov esi,kernel_name - mov edi,inname - call copy_1 - - mov esi,kernel_name - mov edi,outname - call copy_1 - - mov esi,defpath - mov edi,path - call copy_1 - - call pack - jmp exit - -@@: -; set default path = /SYS/ - mov esi,defpath - mov edi,path - mov [edi-4],dword 6 - movsw - movsd -; get system window info - xor eax,eax - cmp [params],al - je default - - mov edi,path - mov esi,params - call copy_1 - - sub esi,2 - std -@@: - lodsb - dec edi - cmp al,byte '/' - jnz @r - - mov [edi-1],byte 0 - mov edi,inname - add esi,2 - push esi - call copy_1 - pop esi - mov edi,outname - call copy_1 -end_param: -;--------------------------------------------------------------------- - call set_editbox_position_all -;--------------------------------------------------------------------- - call draw_window - call pack - jmp OD_initialization -;********************************************************************* -default: - mov esi,definoutname - mov edi,esi - xor ecx,ecx - xor eax,eax - dec ecx - repnz scasb - not ecx - dec ecx - mov [innamelen],ecx - push ecx - push esi - mov edi,inname - rep movsb - pop esi - pop ecx - mov [outnamelen],ecx - mov edi,outname - rep movsb -;--------------------------------------------------------------------- - call set_editbox_position_all -;--------------------------------------------------------------------- -OD_initialization: -;OpenDialog initialisation - push dword OpenDialog_data - call [OpenDialog_Init] -;--------------------------------------------------------------------- -red: - call draw_window -;-------------------------------------- -still: - mcall SF_WAIT_EVENT - dec eax - jz red - - dec eax - jz key - - dec eax - jz button - - push dword edit1 - call [edit_box_mouse] - - push dword edit2 - call [edit_box_mouse] - - push dword edit3 - call [edit_box_mouse] - - push dword check1 - call [check_box_mouse] - - jmp still -;********************************************************************* -tell_compress_mess: - push compressing_len - pop ecx - mov esi,compressing_str - call write_string - ret -;********************************************************************* -clear_mess_and_displogo: - call refresh_editbox_data -; clear messages - call clear_messages -; display logo - mov esi,info_str - push info_len - pop ecx - call write_string - ret -;********************************************************************* -clear_messages: - xor eax,eax - mov ecx,80*20/4+1 - mov edi,message_mem - rep stosd - ret -;********************************************************************* -exit: - xor eax,eax - dec eax - mcall ;SF_TERMINATE_PROCESS -;********************************************************************* -button: -; button pressed - mcall SF_GET_BUTTON - xchg al,ah - cmp al,7 - jz but7 - - dec eax - jz exit - - dec eax - jnz nopack - - bt dword[check1.flags],1 - jc @f - - call pack - jmp still -;--------------------------------------------------------------------- -@@: - call kerpack - jmp still -;--------------------------------------------------------------------- -nopack: - dec eax - jnz nounpack - - call unpack - jmp still -;--------------------------------------------------------------------- -but7: - call clear_messages -; display logo - mov esi,info_str - push info_len - pop ecx - call write_string -; display info - mov esi,usage_str - mov ecx,usage_len - call write_string - jmp still -;--------------------------------------------------------------------- -nounpack: - dec eax - jnz still - - call OpenDialog_start - jmp still -;********************************************************************* -OpenDialog_start: - mov esi,path - mov edi,temp_dir_pach - call copy_1 - - push dword OpenDialog_data - call [OpenDialog_Start] - cmp [OpenDialog_data.status],1 - jne @f - - mov esi,filename_area - mov edi,inname - call copy_1 - - mov esi,filename_area - mov edi,outname - call copy_1 - - mov esi,temp_dir_pach - mov edi,path - call copy_1 - - call refresh_editbox_data - - call set_editbox_position_all - - call draw_editbox -@@: - ret -;********************************************************************* -copy_1: - xor eax,eax - cld -@@: - lodsb - stosb - test eax,eax - jnz @r - ret -;********************************************************************* -refresh_editbox_data: - mov esi,inname - mov edi,innamelen - call refresh_data - - mov esi,outname - mov edi,outnamelen - call refresh_data - - mov esi,path - mov edi,pathlen - call refresh_data - - ret -;********************************************************************* -refresh_data: - push esi - xor eax,eax - cld -@@: - lodsb - test eax,eax - jnz @r - pop eax - sub esi,eax - dec esi - mov [edi],esi - ret -;********************************************************************* -set_editbox_position_all: - mov ebx,inname - mov edi,edit1 - call set_editbox_position - - mov ebx,outname - mov edi,edit2 - call set_editbox_position - - mov ebx,path - mov edi,edit3 - call set_editbox_position - ret -;********************************************************************* -key: - mcall SF_GET_KEY - - push dword edit1 - call [edit_box_key] - - push dword edit2 - call [edit_box_key] - - push dword edit3 - call [edit_box_key] - - jmp still -;********************************************************************* -get_full_name: - push esi - mov esi,path - mov ecx,[esi-4] - mov edi,fullname - rep movsb - mov al,'/' - cmp [edi-1],al - jz @f - - stosb -;-------------------------------------- -@@: - pop esi - cmp [esi],al - jnz @f - - mov edi,fullname -;-------------------------------------- -@@: - mov ecx,[esi-4] - rep movsb - xor eax,eax - stosb - ret -;********************************************************************* -write_string: -; in: esi=pointer, ecx=length - mov edx,[message_cur_pos] -;-------------------------------------- -x1: - lea edi,[message_mem+edx] -;-------------------------------------- -do_write_char: - lodsb - cmp al,10 - jz newline - - stosb - inc edx - loop do_write_char - jmp x2 -;--------------------------------------------------------------------- -newline: - xor eax,eax - stosb - xchg eax,edx - push ecx - push eax - mov ecx,80 - div ecx - pop eax - xchg eax,edx - sub edx,eax - add edx,ecx - pop ecx - loop x1 -;-------------------------------------- -x2: - mov [message_cur_pos],edx -; update window - call draw_log_area -;-------------------------------------- -draw_messages: - mov ebx,12 shl 16 + LOG_Y + 7 - mov edi,message_mem -;-------------------------------------- -@@: - push edi - xor eax,eax - push 80 - pop ecx - repnz scasb - sub ecx,79 - neg ecx - mov esi,ecx - pop edi - mcall SF_DRAW_TEXT,,0xB0000000,edi - add ebx,16 - add edi,80 - cmp edi,message_cur_pos - jb @b - - ret -;********************************************************************* -draw_log_area: - DrawRectangle 5, LOG_Y, WIN_W-12, LOG_H, [sc.work_graph] - mcall SF_DRAW_RECT, <6,WIN_W-13>, , 0xFFFfff - DrawRectangle3D 6, LOG_Y+1, WIN_W-13, LOG_H-1, 0xDEDEDE, [sc.work_graph] - ret -;********************************************************************* -draw_window: -; start redraw - mcall SF_REDRAW,SSF_BEGIN_DRAW - mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,40 - ;-------------------------------------- - edit_boxes_set_sys_color edit1,editboxes_end,sc - check_boxes_set_sys_color2 check1,check1_end,sc - ;-------------------------------------- -; define window - mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT - - mov ecx,100 shl 16 + WIN_H - add ecx, eax - - mov edx,[sc.work] - add edx,34000000h - xor esi,esi - xor edi,edi - mcall SF_CREATE_WINDOW,<250,WIN_W+10>,,,,caption_str - mcall SF_THREAD_INFO,procinfo,-1 - - mov eax,[procinfo+70] ;status of window - test eax,100b - jne .end -;-------------------------------------- -; draw lines and frame - call draw_log_area -; draw buttons - call draw_buttons -; draw messages - call draw_messages -; draw editbox's - call draw_editbox -; end redraw -.end: - mcall SF_REDRAW,SSF_END_DRAW - ret -;********************************************************************* -draw_editbox: - push dword edit1 - call [edit_box_draw] - - push dword edit2 - call [edit_box_draw] - - push dword edit3 - call [edit_box_draw] - - mov eax,[sc.work_text] - or eax, 0x90000000 - mov [check1.text_color], eax - push dword check1 - call [check_box_draw] - ret -;********************************************************************* -set_editbox_position: - mov esi,ebx - cld -@@: - lodsb - test al,al - jne @r - sub esi,ebx - mov eax,esi - dec eax - mov [edi+48], eax ;ed_size - mov [edi+52], eax ;ed_pos - ret -;********************************************************************* -draw_buttons: -; define compress button - mov cx,18 - mcall SF_DEFINE_BUTTON,, <3, 20>,2,[sc.work_button] -; uncompress button - inc edx - add ecx,LINE_H shl 16 - mcall -; question button - push esi - mov dl,7 - mcall ,, - mov ecx,[sc.work_button_text] - or ecx,0x90000000 - mov edx,aQuestion - mcall SF_DRAW_TEXT, - pop esi -; define Path button - mcall SF_DEFINE_BUTTON,<6,64>,,4 -; text on Path button - mov ebx,8 shl 16+5 - mov al,4 - mov ecx,[sc.work_text] - push buttons1names - pop edx - push 8 - pop esi -;-------------------------------------- -; text on settings buttons - mov ecx, [sc.work_text] - or ecx, 0x10000000 - mcall , <8, 5>, , buttons1names, 8 - - add edx,esi - add ebx,LINE_H - mcall - add edx,esi - add ebx,LINE_H - mov ecx,[sc.work_button_text] - or ecx, 0x10000000 - sub ebx, 10 shl 16 - mcall -; text on compress and decompress buttons - or ecx,0x80000000 - mcall ,,,aCompress - mcall ,,,aDecompress - ret -;********************************************************************* -;Pack procedures -include 'packpoc.inc' -;--------------------------------------------------------------------- -;UnPack procedures -include 'upacproc.inc' -;--------------------------------------------------------------------- -;lzma_compress: -include 'lzma_compress.inc' -;--------------------------------------------------------------------- -;lzma_set_dict_size: -include 'lzma_set_dict_size.inc' -;--------------------------------------------------------------------- -;lzma_decompress: -include 'lzma_decompress.inc' -;--------------------------------------------------------------------- -;kerpack code: -include 'kerpack.inc' -;--------------------------------------------------------------------- -;initialized variables and constants -include 'const_var.inc' -;--------------------------------------------------------------------- -IM_END: -;--------------------------------------------------------------------- -;uninitialized data -include 'data.inc' -;--------------------------------------------------------------------- -I_END: -;--------------------------------------------------------------------- \ No newline at end of file +; SPDX-License-Identifier: NOASSERTION +; + +;--------------------------------------------------------------------- +; Kpack - Kolibri Packer +; Kolibri version +; Written by diamond in 2006, 2007 specially for KolibriOS +; +; Disassemled and corrected in 2010-2011 specially for FASM +; by Marat Zakiyanov aka Mario79, aka Mario +; +; Uses LZMA compression library by Igor Pavlov +; (for more information on LZMA and 7-Zip visit http://www.7-zip.org) +; (plain-C packer and ASM unpacker are ported by diamond) +;--------------------------------------------------------------------- +use32 + org 0 + + db 'MENUET01' + dd 1 + dd START + dd IM_END + dd I_END + dd stacktop + dd params + dd cur_dir_path +;--------------------------------------------------------------------- +include '../../config.inc' ; for nightbuild +include '../../KOSfuncs.inc' +include '../../macros.inc' +include '../../gui_patterns.inc' +include '../../develop/libraries/box_lib/trunk/box_lib.mac' +include '../../load_lib.mac' + @use_library + +START: + mcall SF_SYS_MISC,SSF_HEAP_INIT + mcall SF_SET_EVENTS_MASK,0x80000027 + + load_libraries l_libs_start,load_lib_end + cmp eax,-1 + je exit + + init_checkboxes2 check1,check1_end + call clear_messages + +; pack kernel ? + cmp [params], dword '-ker' + jne @f + + mov esi,kernel_name + mov edi,inname + call copy_1 + + mov esi,kernel_name + mov edi,outname + call copy_1 + + mov esi,defpath + mov edi,path + call copy_1 + + call pack + jmp exit + +@@: +; set default path = /SYS/ + mov esi,defpath + mov edi,path + mov [edi-4],dword 6 + movsw + movsd +; get system window info + xor eax,eax + cmp [params],al + je default + + mov edi,path + mov esi,params + call copy_1 + + sub esi,2 + std +@@: + lodsb + dec edi + cmp al,byte '/' + jnz @r + + mov [edi-1],byte 0 + mov edi,inname + add esi,2 + push esi + call copy_1 + pop esi + mov edi,outname + call copy_1 +end_param: +;--------------------------------------------------------------------- + call set_editbox_position_all +;--------------------------------------------------------------------- + call draw_window + call pack + jmp OD_initialization +;********************************************************************* +default: + mov esi,definoutname + mov edi,esi + xor ecx,ecx + xor eax,eax + dec ecx + repnz scasb + not ecx + dec ecx + mov [innamelen],ecx + push ecx + push esi + mov edi,inname + rep movsb + pop esi + pop ecx + mov [outnamelen],ecx + mov edi,outname + rep movsb +;--------------------------------------------------------------------- + call set_editbox_position_all +;--------------------------------------------------------------------- +OD_initialization: +;OpenDialog initialisation + push dword OpenDialog_data + call [OpenDialog_Init] +;--------------------------------------------------------------------- +red: + call draw_window +;-------------------------------------- +still: + mcall SF_WAIT_EVENT + dec eax + jz red + + dec eax + jz key + + dec eax + jz button + + push dword edit1 + call [edit_box_mouse] + + push dword edit2 + call [edit_box_mouse] + + push dword edit3 + call [edit_box_mouse] + + push dword check1 + call [check_box_mouse] + + jmp still +;********************************************************************* +tell_compress_mess: + push compressing_len + pop ecx + mov esi,compressing_str + call write_string + ret +;********************************************************************* +clear_mess_and_displogo: + call refresh_editbox_data +; clear messages + call clear_messages +; display logo + mov esi,info_str + push info_len + pop ecx + call write_string + ret +;********************************************************************* +clear_messages: + xor eax,eax + mov ecx,80*20/4+1 + mov edi,message_mem + rep stosd + ret +;********************************************************************* +exit: + xor eax,eax + dec eax + mcall ;SF_TERMINATE_PROCESS +;********************************************************************* +button: +; button pressed + mcall SF_GET_BUTTON + xchg al,ah + cmp al,7 + jz but7 + + dec eax + jz exit + + dec eax + jnz nopack + + bt dword[check1.flags],1 + jc @f + + call pack + jmp still +;--------------------------------------------------------------------- +@@: + call kerpack + jmp still +;--------------------------------------------------------------------- +nopack: + dec eax + jnz nounpack + + call unpack + jmp still +;--------------------------------------------------------------------- +but7: + call clear_messages +; display logo + mov esi,info_str + push info_len + pop ecx + call write_string +; display info + mov esi,usage_str + mov ecx,usage_len + call write_string + jmp still +;--------------------------------------------------------------------- +nounpack: + dec eax + jnz still + + call OpenDialog_start + jmp still +;********************************************************************* +OpenDialog_start: + mov esi,path + mov edi,temp_dir_pach + call copy_1 + + push dword OpenDialog_data + call [OpenDialog_Start] + cmp [OpenDialog_data.status],1 + jne @f + + mov esi,filename_area + mov edi,inname + call copy_1 + + mov esi,filename_area + mov edi,outname + call copy_1 + + mov esi,temp_dir_pach + mov edi,path + call copy_1 + + call refresh_editbox_data + + call set_editbox_position_all + + call draw_editbox +@@: + ret +;********************************************************************* +copy_1: + xor eax,eax + cld +@@: + lodsb + stosb + test eax,eax + jnz @r + ret +;********************************************************************* +refresh_editbox_data: + mov esi,inname + mov edi,innamelen + call refresh_data + + mov esi,outname + mov edi,outnamelen + call refresh_data + + mov esi,path + mov edi,pathlen + call refresh_data + + ret +;********************************************************************* +refresh_data: + push esi + xor eax,eax + cld +@@: + lodsb + test eax,eax + jnz @r + pop eax + sub esi,eax + dec esi + mov [edi],esi + ret +;********************************************************************* +set_editbox_position_all: + mov ebx,inname + mov edi,edit1 + call set_editbox_position + + mov ebx,outname + mov edi,edit2 + call set_editbox_position + + mov ebx,path + mov edi,edit3 + call set_editbox_position + ret +;********************************************************************* +key: + mcall SF_GET_KEY + + push dword edit1 + call [edit_box_key] + + push dword edit2 + call [edit_box_key] + + push dword edit3 + call [edit_box_key] + + jmp still +;********************************************************************* +get_full_name: + push esi + mov esi,path + mov ecx,[esi-4] + mov edi,fullname + rep movsb + mov al,'/' + cmp [edi-1],al + jz @f + + stosb +;-------------------------------------- +@@: + pop esi + cmp [esi],al + jnz @f + + mov edi,fullname +;-------------------------------------- +@@: + mov ecx,[esi-4] + rep movsb + xor eax,eax + stosb + ret +;********************************************************************* +write_string: +; in: esi=pointer, ecx=length + mov edx,[message_cur_pos] +;-------------------------------------- +x1: + lea edi,[message_mem+edx] +;-------------------------------------- +do_write_char: + lodsb + cmp al,10 + jz newline + + stosb + inc edx + loop do_write_char + jmp x2 +;--------------------------------------------------------------------- +newline: + xor eax,eax + stosb + xchg eax,edx + push ecx + push eax + mov ecx,80 + div ecx + pop eax + xchg eax,edx + sub edx,eax + add edx,ecx + pop ecx + loop x1 +;-------------------------------------- +x2: + mov [message_cur_pos],edx +; update window + call draw_log_area +;-------------------------------------- +draw_messages: + mov ebx,12 shl 16 + LOG_Y + 7 + mov edi,message_mem +;-------------------------------------- +@@: + push edi + xor eax,eax + push 80 + pop ecx + repnz scasb + sub ecx,79 + neg ecx + mov esi,ecx + pop edi + mcall SF_DRAW_TEXT,,0xB0000000,edi + add ebx,16 + add edi,80 + cmp edi,message_cur_pos + jb @b + + ret +;********************************************************************* +draw_log_area: + DrawRectangle 5, LOG_Y, WIN_W-12, LOG_H, [sc.work_graph] + mcall SF_DRAW_RECT, <6,WIN_W-13>, , 0xFFFfff + DrawRectangle3D 6, LOG_Y+1, WIN_W-13, LOG_H-1, 0xDEDEDE, [sc.work_graph] + ret +;********************************************************************* +draw_window: +; start redraw + mcall SF_REDRAW,SSF_BEGIN_DRAW + mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,40 + ;-------------------------------------- + edit_boxes_set_sys_color edit1,editboxes_end,sc + check_boxes_set_sys_color2 check1,check1_end,sc + ;-------------------------------------- +; define window + mcall SF_STYLE_SETTINGS,SSF_GET_SKIN_HEIGHT + + mov ecx,100 shl 16 + WIN_H + add ecx, eax + + mov edx,[sc.work] + add edx,34000000h + xor esi,esi + xor edi,edi + mcall SF_CREATE_WINDOW,<250,WIN_W+10>,,,,caption_str + mcall SF_THREAD_INFO,procinfo,-1 + + mov eax,[procinfo+70] ;status of window + test eax,100b + jne .end +;-------------------------------------- +; draw lines and frame + call draw_log_area +; draw buttons + call draw_buttons +; draw messages + call draw_messages +; draw editbox's + call draw_editbox +; end redraw +.end: + mcall SF_REDRAW,SSF_END_DRAW + ret +;********************************************************************* +draw_editbox: + push dword edit1 + call [edit_box_draw] + + push dword edit2 + call [edit_box_draw] + + push dword edit3 + call [edit_box_draw] + + mov eax,[sc.work_text] + or eax, 0x90000000 + mov [check1.text_color], eax + push dword check1 + call [check_box_draw] + ret +;********************************************************************* +set_editbox_position: + mov esi,ebx + cld +@@: + lodsb + test al,al + jne @r + sub esi,ebx + mov eax,esi + dec eax + mov [edi+48], eax ;ed_size + mov [edi+52], eax ;ed_pos + ret +;********************************************************************* +draw_buttons: +; define compress button + mov cx,18 + mcall SF_DEFINE_BUTTON,, <3, 20>,2,[sc.work_button] +; uncompress button + inc edx + add ecx,LINE_H shl 16 + mcall +; question button + push esi + mov dl,7 + mcall ,, + mov ecx,[sc.work_button_text] + or ecx,0x90000000 + mov edx,aQuestion + mcall SF_DRAW_TEXT, + pop esi +; define Path button + mcall SF_DEFINE_BUTTON,<6,64>,,4 +; text on Path button + mov ebx,8 shl 16+5 + mov al,4 + mov ecx,[sc.work_text] + push buttons1names + pop edx + push 8 + pop esi +;-------------------------------------- +; text on settings buttons + mov ecx, [sc.work_text] + or ecx, 0x10000000 + mcall , <8, 5>, , buttons1names, 8 + + add edx,esi + add ebx,LINE_H + mcall + add edx,esi + add ebx,LINE_H + mov ecx,[sc.work_button_text] + or ecx, 0x10000000 + sub ebx, 10 shl 16 + mcall +; text on compress and decompress buttons + or ecx,0x80000000 + mcall ,,,aCompress + mcall ,,,aDecompress + ret +;********************************************************************* +;Pack procedures +include 'packpoc.inc' +;--------------------------------------------------------------------- +;UnPack procedures +include 'upacproc.inc' +;--------------------------------------------------------------------- +;lzma_compress: +include 'lzma_compress.inc' +;--------------------------------------------------------------------- +;lzma_set_dict_size: +include 'lzma_set_dict_size.inc' +;--------------------------------------------------------------------- +;lzma_decompress: +include 'lzma_decompress.inc' +;--------------------------------------------------------------------- +;kerpack code: +include 'kerpack.inc' +;--------------------------------------------------------------------- +;initialized variables and constants +include 'const_var.inc' +;--------------------------------------------------------------------- +IM_END: +;--------------------------------------------------------------------- +;uninitialized data +include 'data.inc' +;--------------------------------------------------------------------- +I_END: +;--------------------------------------------------------------------- diff --git a/programs/other/kpack/trunk/loader_lzma.inc b/programs/other/kpack/loader_lzma.inc similarity index 100% rename from programs/other/kpack/trunk/loader_lzma.inc rename to programs/other/kpack/loader_lzma.inc diff --git a/programs/other/kpack/trunk/lzma_compress.inc b/programs/other/kpack/lzma_compress.inc similarity index 100% rename from programs/other/kpack/trunk/lzma_compress.inc rename to programs/other/kpack/lzma_compress.inc diff --git a/programs/other/kpack/trunk/lzma_decompress.inc b/programs/other/kpack/lzma_decompress.inc similarity index 100% rename from programs/other/kpack/trunk/lzma_decompress.inc rename to programs/other/kpack/lzma_decompress.inc diff --git a/programs/other/kpack/trunk/lzma_set_dict_size.inc b/programs/other/kpack/lzma_set_dict_size.inc similarity index 100% rename from programs/other/kpack/trunk/lzma_set_dict_size.inc rename to programs/other/kpack/lzma_set_dict_size.inc diff --git a/programs/other/kpack/trunk/packpoc.inc b/programs/other/kpack/packpoc.inc similarity index 100% rename from programs/other/kpack/trunk/packpoc.inc rename to programs/other/kpack/packpoc.inc diff --git a/programs/other/kpack/trunk/upacproc.inc b/programs/other/kpack/upacproc.inc similarity index 100% rename from programs/other/kpack/trunk/upacproc.inc rename to programs/other/kpack/upacproc.inc diff --git a/programs/other/outdated/cdp/trunk/Tupfile.lua b/programs/other/outdated/cdp/Tupfile.lua similarity index 78% rename from programs/other/outdated/cdp/trunk/Tupfile.lua rename to programs/other/outdated/cdp/Tupfile.lua index 416a5db3c..29d7419a2 100644 --- a/programs/other/outdated/cdp/trunk/Tupfile.lua +++ b/programs/other/outdated/cdp/Tupfile.lua @@ -1,5 +1,5 @@ if tup.getconfig("NO_FASM") ~= "" then return end -HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR") +HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR") tup.include(HELPERDIR .. "/use_fasm.lua") add_include(tup.getvariantdir()) diff --git a/programs/other/outdated/cdp/trunk/build_en.bat b/programs/other/outdated/cdp/build_en.bat similarity index 100% rename from programs/other/outdated/cdp/trunk/build_en.bat rename to programs/other/outdated/cdp/build_en.bat diff --git a/programs/other/outdated/cdp/trunk/build_ru.bat b/programs/other/outdated/cdp/build_ru.bat similarity index 100% rename from programs/other/outdated/cdp/trunk/build_ru.bat rename to programs/other/outdated/cdp/build_ru.bat diff --git a/programs/other/outdated/cdp/trunk/cdp.asm b/programs/other/outdated/cdp/cdp.asm similarity index 99% rename from programs/other/outdated/cdp/trunk/cdp.asm rename to programs/other/outdated/cdp/cdp.asm index 4e7d29b2c..d9c497eb5 100644 --- a/programs/other/outdated/cdp/trunk/cdp.asm +++ b/programs/other/outdated/cdp/cdp.asm @@ -1,10 +1,13 @@ +; SPDX-License-Identifier: NOASSERTION +; + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; Audio CD player; code by Dmitry Yushko - dma@bn.by ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -include "..\..\..\..\macros.inc" +include "..\..\..\macros.inc" include "lang.inc" FALSE equ 0 diff --git a/programs/other/outdated/cmd/trunk/build_de.bat b/programs/other/outdated/cmd/build_de.bat similarity index 100% rename from programs/other/outdated/cmd/trunk/build_de.bat rename to programs/other/outdated/cmd/build_de.bat diff --git a/programs/other/outdated/cmd/trunk/build_en.bat b/programs/other/outdated/cmd/build_en.bat similarity index 100% rename from programs/other/outdated/cmd/trunk/build_en.bat rename to programs/other/outdated/cmd/build_en.bat diff --git a/programs/other/outdated/cmd/trunk/cmd.asm b/programs/other/outdated/cmd/cmd.asm similarity index 99% rename from programs/other/outdated/cmd/trunk/cmd.asm rename to programs/other/outdated/cmd/cmd.asm index 55feaf806..b1b18019e 100644 --- a/programs/other/outdated/cmd/trunk/cmd.asm +++ b/programs/other/outdated/cmd/cmd.asm @@ -1,3 +1,6 @@ +; SPDX-License-Identifier: NOASSERTION +; + ; CMD - Command line interpreter ; copyleft Chemist dmitry_gt@tut.by ; @@ -18,7 +21,7 @@ use32 dd 0x0 dd 0x0 -include "..\..\..\..\macros.inc" +include "..\..\..\macros.inc" include "lang.inc" ; Language support for locales: de_DE, en_US. START: diff --git a/programs/other/outdated/cmd/trunk/cmdipc.inc b/programs/other/outdated/cmd/cmdipc.inc similarity index 100% rename from programs/other/outdated/cmd/trunk/cmdipc.inc rename to programs/other/outdated/cmd/cmdipc.inc diff --git a/programs/other/outdated/cmd/trunk/examples/AUTOEXEC.CMD b/programs/other/outdated/cmd/examples/AUTOEXEC.CMD similarity index 100% rename from programs/other/outdated/cmd/trunk/examples/AUTOEXEC.CMD rename to programs/other/outdated/cmd/examples/AUTOEXEC.CMD diff --git a/programs/other/outdated/cmd/trunk/examples/EXAMPLE.CMD b/programs/other/outdated/cmd/examples/EXAMPLE.CMD similarity index 100% rename from programs/other/outdated/cmd/trunk/examples/EXAMPLE.CMD rename to programs/other/outdated/cmd/examples/EXAMPLE.CMD diff --git a/programs/other/outdated/cmd/trunk/examples/HELLO.ASM b/programs/other/outdated/cmd/examples/HELLO.ASM similarity index 100% rename from programs/other/outdated/cmd/trunk/examples/HELLO.ASM rename to programs/other/outdated/cmd/examples/HELLO.ASM diff --git a/programs/other/outdated/cmd/trunk/examples/PARAM.ASM b/programs/other/outdated/cmd/examples/PARAM.ASM similarity index 100% rename from programs/other/outdated/cmd/trunk/examples/PARAM.ASM rename to programs/other/outdated/cmd/examples/PARAM.ASM diff --git a/programs/other/outdated/cmd/trunk/readme.txt b/programs/other/outdated/cmd/readme.txt similarity index 100% rename from programs/other/outdated/cmd/trunk/readme.txt rename to programs/other/outdated/cmd/readme.txt diff --git a/programs/other/outdated/copy2/trunk/Tupfile.lua b/programs/other/outdated/copy2/Tupfile.lua similarity index 79% rename from programs/other/outdated/copy2/trunk/Tupfile.lua rename to programs/other/outdated/copy2/Tupfile.lua index 24ad72b48..bd744816a 100644 --- a/programs/other/outdated/copy2/trunk/Tupfile.lua +++ b/programs/other/outdated/copy2/Tupfile.lua @@ -1,5 +1,5 @@ if tup.getconfig("NO_FASM") ~= "" then return end -HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../../.." or tup.getconfig("HELPERDIR") +HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../../.." or tup.getconfig("HELPERDIR") tup.include(HELPERDIR .. "/use_fasm.lua") add_include(tup.getvariantdir()) diff --git a/programs/other/outdated/copy2/trunk/build_de.bat b/programs/other/outdated/copy2/build_de.bat similarity index 100% rename from programs/other/outdated/copy2/trunk/build_de.bat rename to programs/other/outdated/copy2/build_de.bat diff --git a/programs/other/outdated/copy2/trunk/build_en.bat b/programs/other/outdated/copy2/build_en.bat similarity index 100% rename from programs/other/outdated/copy2/trunk/build_en.bat rename to programs/other/outdated/copy2/build_en.bat diff --git a/programs/other/outdated/copy2/trunk/build_ru.bat b/programs/other/outdated/copy2/build_ru.bat similarity index 100% rename from programs/other/outdated/copy2/trunk/build_ru.bat rename to programs/other/outdated/copy2/build_ru.bat diff --git a/programs/other/outdated/copy2/trunk/copy2.asm b/programs/other/outdated/copy2/copy2.asm similarity index 96% rename from programs/other/outdated/copy2/trunk/copy2.asm rename to programs/other/outdated/copy2/copy2.asm index c15a60884..b0b9133c7 100644 --- a/programs/other/outdated/copy2/trunk/copy2.asm +++ b/programs/other/outdated/copy2/copy2.asm @@ -1,3 +1,9 @@ +; SPDX-License-Identifier: NOASSERTION +; + +; Text encoded with Code Page 866 - Cyrillic + + ; project name: SYSTREE FILE COPIER ; version: 1.2 ; Mario79 23/10/06 @@ -26,9 +32,9 @@ dd 0x10000 ; esp dd 0x0 , 0x0 ; I_Param , I_Icon -include 'lang.inc' -include '..\..\..\..\macros.inc' ; very useful stuff for MeOS -STRLEN = 48 ; maximal length of filename +include 'lang.inc' ; Language support for locales: ru_RU (CP866), en_US, de_DE. +include '..\..\..\macros.inc' +STRLEN = 48 ; maximum filename length START: ; start of execution @@ -315,9 +321,9 @@ get_param_info: source_info: ; SOURCE FILEINFO .subfunction dd 0 ; 0=READ - .start dd 0 - .size_high dd 0 - .size dd 0 + .start dd 0 + .size_high dd 0 + .size dd 0 .return dd 0x10000 .name: db '/hd0/1/kernel/kernel.mnt',0 ; ASCIIZ dir & filename @@ -325,9 +331,9 @@ source_info: ; SOURCE FILEINFO dest_info: ; DESTINATION FILEINFO .subfunction dd 2 ; 0=WRITE - .start dd 0 - .size_high dd 0 - .size dd 0 + .start dd 0 + .size_high dd 0 + .size dd 0 .return dd 0x10000 .name: db '/sys/kernel.mnt',0 ; ASCIIZ dir & filename