Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 474 → Rev 485

/programs/fs/kfar/trunk/dialogs.inc
315,13 → 315,13
.event:
push 10
pop eax
int 40h
mcall
dec eax
jz .redraw
dec eax
jz .key
or eax, -1
int 40h
mcall
.redraw:
push ebx ebp
call draw_window
329,7 → 329,7
jmp .event
.key:
mov al, 2
int 40h
mcall
shr eax, 8
cmp al, 0xE0
jnz @f
1239,7 → 1239,7
cmp [ctrlstate], 1
sbb ecx, -2
mov edx, layout
int 0x40
mcall
popad
; translate scancode to ASCII
movzx eax, al
/programs/fs/kfar/trunk/filetool.inc
6,7 → 6,7
push 70
pop eax
mov ebx, delinfo
int 0x40
mcall
pop ebx
test eax, eax
jz .ret
102,7 → 102,7
mov [ebx+dirinfo.name-dirinfo], execdata
push 70
pop eax
int 0x40
mcall
; if we get read error, the best available action is try to delete directory itself
test eax, eax
jz @f
/programs/fs/kfar/trunk/kfar.asm
8,6 → 8,7
dd 0, app_path
 
include 'lang.inc'
include '..\..\..\macros.inc'
include 'font.inc'
include 'sort.inc'
include 'kglobals.inc'
60,7 → 61,7
pop eax
push 11
pop ebx
int 0x40
mcall
call init_console
call draw_window
push 66
68,7 → 69,7
push 1
pop ebx
mov ecx, ebx
int 40h ; set keyboard mode to scancodes
mcall ; set keyboard mode to scancodes
mov eax, 200
mov [panel1_nfa], eax
mov [panel2_nfa], eax
249,7 → 250,7
event:
push 10
pop eax
int 40h
mcall
dec eax
jz redraw
dec eax
257,13 → 258,13
; button - we have only one button, close
exit:
or eax, -1
int 40h
mcall
redraw:
; query kbd state from OS
mov al, 66
push 3
pop ebx
int 0x40
mcall
and eax, 0x3F
cmp al, [ctrlstate]
mov [ctrlstate], al
273,7 → 274,7
mov al, 9
mov ebx, procinfo
or ecx, -1
int 40h
mcall
; test if rolled up
; height of rolled up window is [skinh]+3
mov eax, [ebx+46]
283,14 → 284,14
mov al, 12
push 1
pop ebx
int 0x40
mcall
xor eax, eax
; ebx, ecx, edi are ignored by function 0 after first redraw
mov edx, 0x53000000
int 0x40
mcall
mov al, 12
inc ebx
int 0x40
mcall
jmp event
@@:
xor ecx, ecx
364,7 → 365,7
imul esi, font_height
add esi, [skinh]
add esi, 5-1
int 40h
mcall
.resize_draw:
mov ecx, [MemForImage]
call pgfree
394,7 → 395,7
pop eax
push 5
pop ebx
int 0x40
mcall
push eax
sub eax, [esp+2]
inc eax
427,11 → 428,11
add esi, 4
push 67
pop eax
int 0x40
mcall
jmp redraw.resize_draw
key:
mov al, 2
int 40h
mcall
test al, al
jnz event
xchg al, ah
1025,7 → 1026,7
.cmdlinelenok:
push 70
pop eax
int 40h
mcall
xor esi, esi
xchg esi, [restore_semicolon]
test esi, esi
1057,7 → 1058,7
pop eax
push 20
pop ebx
int 0x40
mcall
jmp .ctrl_r
@@:
ret
1235,7 → 1236,7
mov byte [tmpname+1], 0
push 70
pop eax
int 40h
mcall
mov ebx, dirinfo
test eax, eax
jnz .drive_loop_e_done
1251,7 → 1252,7
.drive_loop_i:
push 70
pop eax
int 40h
mcall
mov ebx, dirinfo
test eax, eax
jnz .drive_loop_i_done
1541,7 → 1542,7
mov [ebx + attrinfo.name - attrinfo], esi
push 70
pop eax
int 0x40
mcall
mov cl, byte [attrinfo.attr]
@@:
test cl, 0x10
1610,7 → 1611,7
mov ebx, readinfo
push 70
pop eax
int 0x40
mcall
test eax, eax
jz .copyreadok
cmp eax, 6
1642,7 → 1643,7
mov ebx, writeinfo
push 70
pop eax
int 0x40
mcall
test eax, eax
jz .copywriteok
push edi
1699,7 → 1700,7
mov dword [ebx+21], edi
push 70
pop eax
int 0x40
mcall
; ignore errors
pop dword [delinfo+21]
jmp .copydone
2140,7 → 2141,7
push 70
pop eax
mov ebx, mkdirinfo
int 0x40
mcall
test eax, eax
jz @f
push dword CopyDestEditBuf+12
2435,10 → 2436,10
pop eax
push 1
pop ebx
int 40h
mcall
mov al, 48
mov bl, 4
int 40h
mcall
mov [skinh], eax
mov ebx, [cur_width]
imul ebx, font_width
2448,8 → 2449,8
lea ecx, [eax+ecx+5-1+100*65536]
xor eax, eax
mov edx, 0x53000000
mov edi, header
int 40h
mov edi, title
mcall
mov al, 13
xor edx, edx
cmp [fill_width], 0
2463,7 → 2464,7
mov cx, word [wnd_height]
sub cx, word [skinh]
sub cx, 5-1
int 0x40
mcall
@@:
cmp [fill_height], 0
jz @f
2476,7 → 2477,7
sub ecx, 5-1
shl ecx, 16
mov cx, word [fill_height]
int 0x40
mcall
@@:
; xor ecx, ecx
; call draw_image
2493,12 → 2494,12
mov esi, 8
mov edi, console_colors
xor ebp, ebp
int 0x40
mcall
@@:
mov al, 12
push 2
pop ebx
int 40h
mcall
ret
 
draw_image.nomem:
2510,7 → 2511,7
mov ecx, [skinh-2]
mov cx, word [cur_height]
imul cx, font_height
int 40h
mcall
mov al, 4
mov ebx, 32*65536+32
mov ecx, 0xFFFFFF
2517,7 → 2518,7
mov edx, nomem_draw
push nomem_draw.size
pop esi
int 40h
mcall
ret
 
draw_image:
2714,7 → 2715,7
mov edi, console_colors
push 8
pop esi
int 40h
mcall
.nodraw:
ret
 
3936,7 → 3937,7
push 70
pop eax
mov ebx, dirinfo
int 40h
mcall
test eax, eax
jz .ok
cmp eax, 6
5165,7 → 5166,7
pop esi
ret
 
header db 'Kolibri Far 0.32',0
title db 'Kolibri Far 0.32',0
 
nomem_draw db 'No memory for redraw.',0
.size = $ - nomem_draw
/programs/fs/kfar/trunk/tools.inc
6,7 → 6,7
pop eax
push 12
pop ebx
int 0x40
mcall
pop ebx
ret
 
18,7 → 18,7
pop eax
push 13
pop ebx
int 0x40
mcall
pop ebx
ret
 
30,7 → 30,7
pop eax
push 20
pop ebx
int 0x40
mcall
pop ebx
ret
 
188,7 → 188,7
pop eax
push 19
pop ebx
int 0x40
mcall
mov edi, aInvalidDLL
test eax, eax
jz .sayerr
/programs/fs/kfar/trunk/viewer.inc
62,7 → 62,7
.attr_retry:
push 70
pop eax
int 40h
mcall
test eax, eax
jz @f
lea ebx, [ebp+viewer_data.filename]
105,7 → 105,7
.retry:
push 70
pop eax
int 40h
mcall
mov [ebp+viewer_data.buf_size], ebx
test eax, eax
jz .readok
196,7 → 196,7
mov ebx, readinfo
push 70
pop eax
int 40h
mcall
test eax, eax
jz .readok
cmp eax, 6
978,7 → 978,7
mov [ebx+21], eax
push 70
pop eax
int 40h
mcall
test eax, eax
jz .readok
cmp eax, 6
1030,7 → 1030,7
@@:
push 70
pop eax
int 40h
mcall
test eax, eax
jz @f
cmp eax, 6