forked from KolibriOS/kolibrios
FASM: fix whole system hung if source was "dd %t" (by Prohor Nikiforov)
KFM: buildin buttons.bmp CMM: update libs git-svn-id: svn://kolibrios.org@7863 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
6aac7a3d5a
commit
dad5229ccd
@ -30,7 +30,6 @@ img_files = {
|
||||
{"DEVELOP/T_EDIT.INI", PROGS .. "/other/t_edit/t_edit.ini"},
|
||||
{"File Managers/ICONS.INI", "common/File Managers/icons.ini"},
|
||||
{"File Managers/KFM.INI", "common/File Managers/kfm.ini"},
|
||||
{"File Managers/BUTTONS.BMP", PROGS .. "/fs/kfm/trunk/buttons.bmp"},
|
||||
{"File Managers/ICONS.BMP", PROGS .. "/fs/kfm/trunk/icons.bmp"},
|
||||
{"File Managers/FNAV/ABOUT.TXT", "common/File Managers/fNav/About.txt"},
|
||||
{"File Managers/FNAV/FNAV", "common/File Managers/fNav/fNav.kex"},
|
||||
|
@ -11,3 +11,4 @@ tup.rule("console.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK
|
||||
tup.rule("info.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "info.com")
|
||||
tup.rule("pigex.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "pigex.com")
|
||||
tup.rule("netcheck.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "netcheck.com")
|
||||
tup.rule("math.c", "c-- /D=AUTOBUILD /D=$(C_LANG) %f" .. tup.getconfig("KPACK_CMD"), "math.com")
|
||||
|
@ -322,11 +322,18 @@
|
||||
{
|
||||
dword n;
|
||||
dword inc(dword _addition);
|
||||
dword set(dword _new_val);
|
||||
};
|
||||
|
||||
:dword incn::inc(dword _addition)
|
||||
{
|
||||
n+=_addition;
|
||||
n += _addition;
|
||||
return n;
|
||||
}
|
||||
|
||||
:dword incn::set(dword _new_val)
|
||||
{
|
||||
n =_new_val;
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,6 @@ struct proc_info
|
||||
|
||||
:void GetProcessInfo(dword _process_struct_pointer, _process_id)
|
||||
{
|
||||
skin_height = GetSkinHeight();
|
||||
EAX = 9;
|
||||
EBX = _process_struct_pointer;
|
||||
ECX = _process_id;
|
||||
|
@ -26,7 +26,9 @@ struct llist
|
||||
int KeyDown();
|
||||
int KeyUp();
|
||||
int KeyHome();
|
||||
int KeyHomeHor();
|
||||
int KeyEnd();
|
||||
int KeyEndHor();
|
||||
int KeyPgDown();
|
||||
int KeyPgUp();
|
||||
int KeyLeft();
|
||||
@ -124,6 +126,13 @@ struct llist
|
||||
|
||||
:int llist::ProcessKey(dword key)
|
||||
{
|
||||
if (horisontal_selelection) switch(key)
|
||||
{
|
||||
case SCAN_CODE_LEFT: return KeyLeft();
|
||||
case SCAN_CODE_RIGHT: return KeyRight();
|
||||
case SCAN_CODE_HOME: return KeyHomeHor();
|
||||
case SCAN_CODE_END: return KeyEndHor();
|
||||
}
|
||||
switch(key)
|
||||
{
|
||||
case SCAN_CODE_DOWN: return KeyDown();
|
||||
@ -133,11 +142,6 @@ struct llist
|
||||
case SCAN_CODE_PGUP: return KeyPgUp();
|
||||
case SCAN_CODE_PGDN: return KeyPgDown();
|
||||
}
|
||||
if (horisontal_selelection) switch(key)
|
||||
{
|
||||
case SCAN_CODE_LEFT: return KeyLeft();
|
||||
case SCAN_CODE_RIGHT: return KeyRight();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -164,8 +168,8 @@ struct llist
|
||||
if (cur_y < first) || (cur_y >= first + visible)
|
||||
{
|
||||
first = cur_y;
|
||||
CheckDoesValuesOkey();
|
||||
}
|
||||
CheckDoesValuesOkey();
|
||||
return 1;
|
||||
}
|
||||
|
||||
@ -196,6 +200,21 @@ struct llist
|
||||
return 1;
|
||||
}
|
||||
|
||||
:int llist::KeyHomeHor()
|
||||
{
|
||||
if (cur_x==0) return 0;
|
||||
cur_x = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
:int llist::KeyEndHor()
|
||||
{
|
||||
if (cur_x==column_max) return 0;
|
||||
cur_x = column_max;
|
||||
CheckDoesValuesOkey();
|
||||
return 1;
|
||||
}
|
||||
|
||||
:int llist::KeyHome()
|
||||
{
|
||||
if (cur_y==0) && (first==0) return 0;
|
||||
@ -237,6 +256,7 @@ struct llist
|
||||
if (visible + first > count) first = count - visible;
|
||||
if (first < 0) first = 0;
|
||||
if (cur_y >= count) cur_y = count - 1;
|
||||
if (cur_x >= column_max) cur_x = column_max;
|
||||
if (cur_y < 0) cur_y = 0;
|
||||
if (cur_x < 0) cur_x = 0;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ void _http::receive()
|
||||
|
||||
}
|
||||
|
||||
bool _http::handle_redirect()
|
||||
:bool _http::handle_redirect()
|
||||
{
|
||||
dword redirect;
|
||||
http_find_header_field stdcall (transfer, "location\0");
|
||||
@ -152,7 +152,7 @@ bool DOWNLOADER::MonitorProgress()
|
||||
=====================================*/
|
||||
|
||||
|
||||
int check_is_the_adress_local(dword _in)
|
||||
:int check_is_the_adress_local(dword _in)
|
||||
{
|
||||
if (ESBYTE[_in]!='/') return false;
|
||||
_in++;
|
||||
@ -168,7 +168,7 @@ int check_is_the_adress_local(dword _in)
|
||||
return false;
|
||||
}
|
||||
|
||||
int check_is_the_url_absolute(dword _in)
|
||||
:int check_is_the_url_absolute(dword _in)
|
||||
{
|
||||
if(!strncmp(_in,"ftp:",4)) return true;
|
||||
if(!strncmp(_in,"http:",5)) return true;
|
||||
@ -181,7 +181,7 @@ int check_is_the_url_absolute(dword _in)
|
||||
return false;
|
||||
}
|
||||
|
||||
void get_absolute_url(dword _rez, _base, _new)
|
||||
:void get_absolute_url(dword _rez, _base, _new)
|
||||
{
|
||||
int i;
|
||||
//case: ./valera.html
|
||||
|
@ -927,11 +927,11 @@ inline void MEMSETD(EDI,ECX,EAX)
|
||||
}
|
||||
|
||||
:replace_char(dword in_str, char from_char, to_char, int length) {
|
||||
int i;
|
||||
for (i=0; i<length; i++) {
|
||||
if (ESBYTE[in_str+i] == from_char) ESBYTE[in_str+i] = to_char;
|
||||
dword max = in_str + length;
|
||||
while (in_str < max) {
|
||||
if (ESBYTE[in_str] == from_char) ESBYTE[in_str] = to_char;
|
||||
in_str++;
|
||||
}
|
||||
ESBYTE[in_str+length]=0;
|
||||
}
|
||||
|
||||
#endif
|
@ -252,15 +252,15 @@ draw_window:
|
||||
mcallb SF_DRAW_TEXT,ebx,ecx,s_debug
|
||||
|
||||
;MAGIC1 = 6*(text.line_size-1)+14 ;MAGIC???? MAGIC??????????? GO FYSLF.
|
||||
;mpack ebx,MAGIC1+6,1+ 14/2-3+ 14*0
|
||||
;mov esi,[PROCESS_INFO.client_box.width]
|
||||
;sub esi,MAGIC1*2+6+3
|
||||
;mov eax,esi
|
||||
;mov cl,6
|
||||
;div cl
|
||||
;cmp al,MAX_PATH
|
||||
;jbe @f
|
||||
;mov al,MAX_PATH
|
||||
;mpack ebx,MAGIC1+6,1+ 14/2-3+ 14*0
|
||||
;mov esi,[PROCESS_INFO.client_box.width]
|
||||
;sub esi,MAGIC1*2+6+3
|
||||
;mov eax,esi
|
||||
;mov cl,6
|
||||
;div cl
|
||||
;cmp al,MAX_PATH
|
||||
;jbe @f
|
||||
;mov al,MAX_PATH
|
||||
;@@:
|
||||
movzx esi,al
|
||||
|
||||
@ -452,7 +452,7 @@ CUI_START:
|
||||
|
||||
call init_memory
|
||||
|
||||
call make_timestamp
|
||||
call get_tickcount
|
||||
mov [start_time],eax
|
||||
|
||||
call preprocessor
|
||||
@ -470,7 +470,7 @@ CUI_START:
|
||||
call display_number
|
||||
mov esi,_passes_suffix
|
||||
call display_string
|
||||
call make_timestamp
|
||||
call get_tickcount
|
||||
sub eax,[start_time]
|
||||
xor edx,edx
|
||||
mov ebx,100
|
||||
|
@ -39,13 +39,131 @@ exit_program:
|
||||
or eax,-1
|
||||
mcall
|
||||
|
||||
make_timestamp:
|
||||
get_tickcount:
|
||||
push ebx
|
||||
mcall SF_SYSTEM_GET,SSF_TIME_COUNT
|
||||
imul eax,10
|
||||
pop ebx
|
||||
retn
|
||||
|
||||
macro BCDtoHEX al {
|
||||
aam 16
|
||||
aad 10 }
|
||||
|
||||
make_timestamp:
|
||||
mcall SF_GET_SYS_DATE ; $00SSMMHH (BCD)
|
||||
mov edx,eax
|
||||
shr eax,16
|
||||
BCDtoHEX al
|
||||
push eax ; SECONDS
|
||||
mov al,dh
|
||||
BCDtoHEX al
|
||||
push eax ; MINUTES
|
||||
mov al,dl
|
||||
BCDtoHEX al
|
||||
push eax ; HOURS
|
||||
mcall SF_GET_SYS_DATE ; $00DDMMYY (BCD)
|
||||
mov edx,eax
|
||||
shr eax,16
|
||||
BCDtoHEX al
|
||||
push eax ; DAY
|
||||
mov al,dl
|
||||
BCDtoHEX al
|
||||
add eax,2000
|
||||
push eax ; YEAR
|
||||
mov ecx,eax
|
||||
mov al,dh
|
||||
BCDtoHEX al
|
||||
push eax ; MONTH
|
||||
; ecx: YEAR
|
||||
; stack: MONTH, YEAR, DAY, HOURS, MINUTES, SECONDS, retaddr
|
||||
mov eax,ecx
|
||||
sub eax,1970
|
||||
mov ebx,365
|
||||
mul ebx
|
||||
mov ebp,eax
|
||||
mov eax,ecx
|
||||
sub eax,1969
|
||||
shr eax,2
|
||||
add ebp,eax
|
||||
mov eax,ecx
|
||||
xor edx,edx
|
||||
sub eax,1901
|
||||
mov ebx,100
|
||||
div ebx
|
||||
sub ebp,eax
|
||||
mov eax,ecx
|
||||
xor edx,edx
|
||||
sub eax,1601
|
||||
mov ebx,400
|
||||
div ebx
|
||||
add ebp,eax
|
||||
pop ecx
|
||||
; ecx: MONTH
|
||||
; stack: YEAR, DAY, HOURS, MINUTES, SECONDS, retaddr
|
||||
mov eax,ecx
|
||||
dec eax
|
||||
mov ebx,30
|
||||
mul ebx
|
||||
add ebp,eax
|
||||
cmp ecx,8
|
||||
jbe months_correction
|
||||
mov eax,ecx
|
||||
sub eax,7
|
||||
shr eax,1
|
||||
add ebp,eax
|
||||
mov ecx,8
|
||||
months_correction:
|
||||
mov eax,ecx
|
||||
shr eax,1
|
||||
add ebp,eax
|
||||
cmp ecx,2
|
||||
pop ecx
|
||||
; ecx: YEAR
|
||||
; stack: DAY, HOURS, MINUTES, SECONDS, retaddr
|
||||
jbe day_correction_ok
|
||||
sub ebp,2
|
||||
test ecx,11b
|
||||
jnz day_correction_ok
|
||||
xor edx,edx
|
||||
mov eax,ecx
|
||||
mov ebx,100
|
||||
div ebx
|
||||
or edx,edx
|
||||
jnz day_correction
|
||||
mov eax,ecx
|
||||
mov ebx,400
|
||||
div ebx
|
||||
or edx,edx
|
||||
jnz day_correction_ok
|
||||
day_correction:
|
||||
inc ebp
|
||||
day_correction_ok:
|
||||
pop eax
|
||||
; eax: DAY
|
||||
; stack: HOURS, MINUTES, SECONDS, retaddr
|
||||
dec eax
|
||||
add eax,ebp
|
||||
mov ebx,24
|
||||
mul ebx
|
||||
pop ecx
|
||||
; ecx: HOURS
|
||||
; stack: MINUTES, SECONDS, retaddr
|
||||
add eax,ecx
|
||||
mov ebx,60
|
||||
mul ebx
|
||||
pop ecx
|
||||
; ecx: MINUTES
|
||||
; stack: SECONDS, retaddr
|
||||
add eax,ecx
|
||||
mov ebx,60
|
||||
mul ebx
|
||||
pop ecx
|
||||
; ecx: SECONDS
|
||||
; stack: retaddr
|
||||
add eax,ecx
|
||||
retn
|
||||
|
||||
symbol_dump:
|
||||
|
||||
push edi
|
||||
|
@ -271,4 +271,6 @@ align 4
|
||||
sysopen:
|
||||
dd 7,0,start_parameter,0,0
|
||||
db '/sys/@open',0
|
||||
;---------------------------------------------------------------------
|
||||
;---------------------------------------------------------------------
|
||||
buttons_file_data file 'images/buttons.raw'
|
||||
;icons_file_data file 'icons.bmp'
|
@ -8,72 +8,32 @@ draw_buttons_panel:
|
||||
sub ebx,9
|
||||
add ebx,5 shl 16
|
||||
mcall 13,,,0xffffff
|
||||
|
||||
mov edx,15 shl 16+20
|
||||
add edx,[skin_high]
|
||||
pusha
|
||||
call .calculate_button
|
||||
mcall ,,,150
|
||||
popa
|
||||
mcall 7,[buttons_img_start],<16,16>
|
||||
add edx,26 shl 16
|
||||
add ebx,16*16*3
|
||||
pusha
|
||||
call .calculate_button
|
||||
mcall ,,,151
|
||||
popa
|
||||
mcall
|
||||
add edx,26 shl 16
|
||||
add ebx,16*16*3
|
||||
pusha
|
||||
call .calculate_button
|
||||
mcall ,,,152
|
||||
popa
|
||||
mcall
|
||||
add edx,26 shl 16
|
||||
add ebx,16*16*3
|
||||
pusha
|
||||
call .calculate_button
|
||||
mcall ,,,153
|
||||
popa
|
||||
mcall
|
||||
add edx,26 shl 16
|
||||
add ebx,16*16*3
|
||||
pusha
|
||||
call .calculate_button
|
||||
mcall ,,,154
|
||||
popa
|
||||
mcall
|
||||
add edx,26 shl 16
|
||||
add ebx,16*16*3
|
||||
pusha
|
||||
call .calculate_button
|
||||
mcall ,,,155
|
||||
popa
|
||||
mcall
|
||||
add edx,26 shl 16
|
||||
add ebx,16*16*3
|
||||
pusha
|
||||
call .calculate_button
|
||||
mcall ,,,156
|
||||
popa
|
||||
mcall
|
||||
add edx,26 shl 16
|
||||
add ebx,16*16*3
|
||||
pusha
|
||||
call .calculate_button
|
||||
mcall ,,,157
|
||||
popa
|
||||
mcall 7,buttons_file_data,<198,16>
|
||||
|
||||
mov ecx, 20
|
||||
add ecx, [skin_high]
|
||||
shl ecx, 16
|
||||
add ecx, 16
|
||||
mcall 8,<15,16>,,150+0x40000000
|
||||
|
||||
_new_but:
|
||||
add ebx,26 shl 16
|
||||
inc edx
|
||||
mcall
|
||||
cmp edx, 157+0x40000000
|
||||
jl _new_but
|
||||
|
||||
ret
|
||||
;--------------------------------------
|
||||
.calculate_button:
|
||||
mov esi,0xffffff
|
||||
mov ebx,edx
|
||||
mov bx,15
|
||||
mov ecx,edx
|
||||
shl ecx,16
|
||||
mov cx,bx
|
||||
mov eax,8
|
||||
ret
|
||||
;------------------------------------------------------------------------------
|
||||
draw_left_sort_button:
|
||||
|
@ -7,9 +7,6 @@ read_folder_1_error:
|
||||
initiation_error:
|
||||
mov [error_pointer],ini_file_name
|
||||
jmp error_window
|
||||
buttons_error:
|
||||
mov [error_pointer],buttons_file_name
|
||||
jmp error_window
|
||||
icon_error:
|
||||
mov [error_pointer],icons_file_name
|
||||
error_window:
|
||||
|
BIN
programs/fs/kfm/trunk/images/buttons.bmp
Normal file
BIN
programs/fs/kfm/trunk/images/buttons.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.4 KiB |
BIN
programs/fs/kfm/trunk/images/buttons.raw
Normal file
BIN
programs/fs/kfm/trunk/images/buttons.raw
Normal file
Binary file not shown.
@ -69,7 +69,6 @@ START:
|
||||
mov [read_folder_name],ax
|
||||
mov [read_folder_1_name],ax
|
||||
call load_icon_and_convert_to_img
|
||||
call load_buttons_and_convert_to_img
|
||||
call load_initiation_file
|
||||
call add_memory_for_folders
|
||||
call device_detect_f70
|
||||
@ -258,20 +257,6 @@ load_icon_and_convert_to_img:
|
||||
call sub_application_memory
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
load_buttons_and_convert_to_img:
|
||||
mov ebx,buttons_file_name
|
||||
call prepare_load_data
|
||||
jnz buttons_error
|
||||
mov eax,[appl_memory]
|
||||
mov [buttons_img_start],eax
|
||||
call prepare_load_data_2
|
||||
add eax,[buttons_img_start]
|
||||
call prepare_load_data_1
|
||||
jnz buttons_error
|
||||
call convert_bmp_to_img
|
||||
call sub_application_memory
|
||||
ret
|
||||
;---------------------------------------------------------------------
|
||||
load_initiation_file:
|
||||
mov ebx,ini_file_name
|
||||
call prepare_load_data
|
||||
|
@ -85,9 +85,6 @@ ini_file_name:
|
||||
icons_file_name:
|
||||
db 'icons.bmp',0
|
||||
;---------------------------------------------------------------------
|
||||
buttons_file_name:
|
||||
db 'buttons.bmp',0
|
||||
;---------------------------------------------------------------------
|
||||
error_type:
|
||||
db 'File system error',0
|
||||
;---------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user