1) fix in 'libio'

2) small optimize 'editbox'

git-svn-id: svn://kolibrios.org@3130 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA 2012-12-21 18:57:14 +00:00
parent f7ddaf37bd
commit 55f8d8856f
2 changed files with 21 additions and 42 deletions

View File

@ -54,7 +54,20 @@ pushad
;----------------------------------------------------------
;--- ¯à®¢¥à塞, çâ® ­ ¦ â® --------------------------------
;----------------------------------------------------------
use_key_process backspace,delete,left,right,home,end,insert
cmp ah,8
jz edit_box_key.backspace
cmp ah,0xb6
jz edit_box_key.delete
cmp ah,176
jz edit_box_key.left
cmp ah,179
jz edit_box_key.right
cmp ah,180
jz edit_box_key.home
cmp ah,181
jz edit_box_key.end
cmp ah,185 ;insert
jz edit_box_key.insert
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;‡ £«ã誠 ­  ®¡à ¡®âªã ª« ¢¨è ¢¢¥àå ¨ ¢­¨§ â.¥. ¯à¨ ®¡­ à㦥­¨¨ íâ¨å ª®¤®¢ ¯à®¨á室¨â ¢ë室 ¨§ ®¡à ¡®â稪 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -756,45 +769,6 @@ pusha ;
or word ed_flags,ed_shift ;ãáâ ­®¢¨¬ ä« £
@@:edit_ex
}
;¬ ªà®á ª« ¢¨è ­  ª®â®àë¥ ¯à®¨á室¨â ॠªæ¨ï
macro use_key_process backspace,delete,left,right,home,end,insert
{
if backspace eq
else
cmp ah,8
jz edit_box_key.backspace
end if
if delete eq
else
cmp ah,0xb6
jz edit_box_key.delete
end if
if left eq
else
cmp ah,176
jz edit_box_key.left
end if
if right eq
else
cmp ah,179
jz edit_box_key.right
end if
if home eq
else
cmp ah,180
jz edit_box_key.home
end if
if home eq
else
cmp ah,181
jz edit_box_key.end
end if
if insert eq
else
cmp ah,185 ;insert
jz edit_box_key.insert
end if
}
macro use_key_no_process up,down,esc,enter,tab,numl,capsl,scrolll
{
@ -874,9 +848,8 @@ macro are_key_shift_press
popa
call edit_box_key.del_char
;;;;
mov eax,dword ed_shift_pos
mov ebx,ed_size
sub ebx,eax
sub ebx,dword ed_shift_pos
mov ed_size,ebx
pop eax
@@:

View File

@ -512,11 +512,17 @@ proc file.close _filed ;////////////////////////////////////////////////////////
;;------------------------------------------------------------------------------------------------;;
;# call `file.err` to obtain extended error information ;;
;;================================================================================================;;
cmp eax,32
jb .exit_error
mov eax, [_filed]
mov [eax + InternalFileInfo.Mode], 0
mov [eax + InternalFileInfo.FileName], 0
invoke mem.free, eax
xor eax, eax
jmp @f
.exit_error:
or eax, -1
@@:
ret
endp