forked from KolibriOS/kolibrios
t_edit: fix open null file
git-svn-id: svn://kolibrios.org@8262 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -820,6 +820,12 @@ proc ted_on_open_file
|
||||
push edx ;source
|
||||
push esi
|
||||
|
||||
or ebx,ebx
|
||||
jnz @f
|
||||
;¥á«¨ ä ©« ¯ãá⮩
|
||||
stdcall ted_clear,edi,1 ;ç¨á⨬ ¢áî ¯ ¬ïâì
|
||||
jmp .end_opn
|
||||
@@:
|
||||
stdcall ted_clear,edi,0 ;ç¨á⨬ ¥ ¢áî ¯ ¬ïâì, ¯®â®¬ã çâ® ¨¦¥ ¡ã¤¥¬ ¥¥ § ¯®«ïâì ®¢ë¬¨ ¤ 묨
|
||||
|
||||
;ª®£¤ ᨬ¢®« § ¢¥à襨ï áâப¨ ⮫쪮 10 (¡¥§ 13)
|
||||
@@ -842,9 +848,8 @@ proc ted_on_open_file
|
||||
.no_10:
|
||||
|
||||
;¯¥à¥¢®¤¨¬ ®âªàëâë© ä ©« ¢ãâàì í«¥¬¥â t_edit
|
||||
mov eax,ebx
|
||||
mov ecx,ebx
|
||||
add eax,2
|
||||
lea eax,[ebx+2]
|
||||
ConvertIndexToPointer eax
|
||||
mov edx,ted_tex
|
||||
add edx,ebx
|
||||
@@ -860,8 +865,8 @@ proc ted_on_open_file
|
||||
mov dword[eax+symbol.tc],-1
|
||||
mov dword[eax+symbol.td],0
|
||||
|
||||
cmp ecx,0
|
||||
je @f
|
||||
or ecx,ecx
|
||||
jz @f
|
||||
dec ecx
|
||||
dec edx
|
||||
sub eax,sizeof.symbol
|
||||
@@ -890,11 +895,11 @@ proc ted_on_open_file
|
||||
@@: ;clear memory, need if before was open big file
|
||||
add edx,sizeof.symbol
|
||||
cmp edx,ted_tex_end
|
||||
jge @f
|
||||
jge .end_opn
|
||||
mov dword[edx+symbol.tc],0
|
||||
mov dword[edx+symbol.td],0
|
||||
jmp @b
|
||||
@@:
|
||||
.end_opn:
|
||||
|
||||
call ted_get_num_lines
|
||||
cmp eax,TED_LINES_IN_NEW_FILE
|
||||
@@ -2446,12 +2451,11 @@ endp
|
||||
; edi = pointer to tedit struct
|
||||
; end_pos = position end 'symbol' struct
|
||||
align 16
|
||||
proc ted_find_help_id, end_pos:dword
|
||||
proc ted_find_help_id uses ebx ecx, end_pos:dword
|
||||
; ecx = word_n
|
||||
; ebx = l_pos
|
||||
mov ted_help_id,-1
|
||||
|
||||
push ebx ecx
|
||||
xor ebx,ebx
|
||||
mov bl,[edx]
|
||||
shl bx,2 ;ebx*=4
|
||||
@@ -2518,7 +2522,6 @@ proc ted_find_help_id, end_pos:dword
|
||||
;return word_n;
|
||||
|
||||
.if_0e:
|
||||
pop ecx ebx
|
||||
ret
|
||||
endp
|
||||
|
||||
@@ -2588,8 +2591,7 @@ align 4
|
||||
or eax,eax
|
||||
jz @f
|
||||
cmp eax,6
|
||||
je @f
|
||||
jmp .ret_f
|
||||
jne .ret_f
|
||||
@@:
|
||||
cmp ebx,-1
|
||||
je .ret_f
|
||||
@@ -3427,8 +3429,7 @@ align 4
|
||||
cmp byte[edx],9
|
||||
je @f
|
||||
cmp byte[edx],13
|
||||
je @f
|
||||
jmp .end_f
|
||||
jne .end_f
|
||||
@@:
|
||||
lea edx,[ted_symbol_space]
|
||||
.end_f:
|
||||
@@ -3472,8 +3473,8 @@ proc ted_draw, edit:dword
|
||||
|
||||
stdcall ted_clear_line_before_draw, edi,ebx,1,esi
|
||||
call ted_get_first_visible_pos
|
||||
cmp edx,0
|
||||
je .no_draw_text
|
||||
or edx,edx
|
||||
jz .no_draw_text
|
||||
mov esi,1 ;¤«¨ ¢ë¢®¤¨¬®£® ⥪áâ ¯® 1-¬ã ᨬ¢®«ã
|
||||
@@:
|
||||
call ted_iterat_next
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use32
|
||||
org 0x0
|
||||
org 0
|
||||
db 'MENUET01' ;¨¤¥â¨ä. ¨á¯®«ï¥¬®£® ä ©« ¢á¥£¤ 8 ¡ ©â
|
||||
dd 1, start, i_end, mem, stacktop, 0, sys_path
|
||||
|
||||
@@ -7,9 +7,10 @@ include '../../../../macros.inc'
|
||||
include '../../../../proc32.inc'
|
||||
include '../../../../KOSfuncs.inc'
|
||||
include '../../../../load_img.inc'
|
||||
include '../../../../load_lib.mac'
|
||||
include '../../../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||
|
||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
@use_library mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||
caption db '<27>à®á¬®âà ¨ä®à¬ 樨 Exif 11.03.16',0 ;¯®¤¯¨áì ®ª
|
||||
|
||||
run_file_70 FileInfoBlock
|
||||
@@ -555,38 +556,20 @@ db 0
|
||||
|
||||
|
||||
|
||||
head_f_i:
|
||||
head_f_l db '‘¨á⥬ ï ®è¨¡ª ',0
|
||||
|
||||
system_dir_0 db '/sys/lib/'
|
||||
lib_name_0 db 'proc_lib.obj',0
|
||||
err_message_found_lib_0 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'proc_lib.obj',39,0
|
||||
err_message_import_0 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'proc_lib.obj',39,0
|
||||
|
||||
system_dir_1 db '/sys/lib/'
|
||||
lib_name_1 db 'libimg.obj',0
|
||||
err_message_found_lib_1 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'libimg.obj',39,0
|
||||
err_message_import_1 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'libimg.obj',39,0
|
||||
|
||||
system_dir_2 db '/sys/lib/'
|
||||
lib_name_2 db 'buf2d.obj',0
|
||||
err_msg_found_lib_2 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'buf2d.obj',39,0
|
||||
err_msg_import_2 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'buf2d',39,0
|
||||
|
||||
system_dir_3 db '/sys/lib/'
|
||||
lib_name_3 db 'exif.obj',0
|
||||
err_msg_found_lib_3 db '<27>¥ ©¤¥ ¡¨¡«¨®â¥ª ',39,'exif.obj',39,0
|
||||
err_msg_import_3 db 'Žè¨¡ª ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ ',39,'exif',39,0
|
||||
|
||||
l_libs_start:
|
||||
lib_0 l_libs lib_name_0, sys_path, file_name, system_dir_0,\
|
||||
err_message_found_lib_0, head_f_l, proclib_import,err_message_import_0, head_f_i
|
||||
lib_1 l_libs lib_name_1, sys_path, file_name, system_dir_1,\
|
||||
err_message_found_lib_1, head_f_l, import_libimg, err_message_import_1, head_f_i
|
||||
lib_2 l_libs lib_name_2, sys_path, file_name, system_dir_2,\
|
||||
err_msg_found_lib_2,head_f_l,import_buf2d,err_msg_import_2,head_f_i
|
||||
lib_3 l_libs lib_name_3, sys_path, file_name, system_dir_3,\
|
||||
err_msg_found_lib_3,head_f_l,import_exif,err_msg_import_3,head_f_i
|
||||
lib_0 l_libs lib_name_0, file_name, system_dir_0, import_proclib
|
||||
lib_1 l_libs lib_name_1, file_name, system_dir_1, import_libimg
|
||||
lib_2 l_libs lib_name_2, file_name, system_dir_2, import_buf2d
|
||||
lib_3 l_libs lib_name_3, file_name, system_dir_3, import_exif
|
||||
l_libs_end:
|
||||
|
||||
align 4
|
||||
@@ -637,7 +620,7 @@ import_libimg:
|
||||
aimg_draw db 'img_draw',0
|
||||
|
||||
align 4
|
||||
proclib_import: ;®¯¨á ¨¥ íªá¯®àâ¨à㥬ëå äãªæ¨©
|
||||
import_proclib: ;®¯¨á ¨¥ íªá¯®àâ¨à㥬ëå äãªæ¨©
|
||||
OpenDialog_Init dd aOpenDialog_Init
|
||||
OpenDialog_Start dd aOpenDialog_Start
|
||||
dd 0,0
|
||||
|
||||
Reference in New Issue
Block a user