optimize and fix 't_edit'
git-svn-id: svn://kolibrios.org@6086 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> box_lib.obj
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>⥬<EFBFBD><E2A5AC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⥪<EFBFBD> box_lib.obj
|
||||||
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TextEditor <20><><EFBFBD> Kolibri OS
|
; <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> TextEditor <20><><EFBFBD> Kolibri OS
|
||||||
; 䠩<> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> ࠧ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 28.06.2014 IgorA
|
; 䠩<> <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> ࠧ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 20.01.2016 IgorA
|
||||||
; <20><> <20><><EFBFBD> <20>ਬ<EFBFBD><E0A8AC><EFBFBD><EFBFBD><EFBFBD> GPL2 <20><>業<EFBFBD><E6A5AD><EFBFBD>
|
; <20><> <20><><EFBFBD> <20>ਬ<EFBFBD><E0A8AC><EFBFBD><EFBFBD><EFBFBD> GPL2 <20><>業<EFBFBD><E6A5AD><EFBFBD>
|
||||||
|
|
||||||
;input:
|
;input:
|
||||||
@@ -2124,14 +2124,13 @@ ted_text_colored:
|
|||||||
;description:
|
;description:
|
||||||
; <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>᪠ <20> <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᢥ祭<E1A2A5><E7A5AD> <>
|
; <20>㭪<EFBFBD><E3ADAA><EFBFBD> <20><><EFBFBD> <20><><EFBFBD>᪠ <20> <20>뤥<EFBFBD><EBA4A5><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ᢥ祭<E1A2A5><E7A5AD> <>
|
||||||
align 4
|
align 4
|
||||||
proc ted_text_find_sel_color
|
proc ted_text_find_sel_color uses eax ebx ecx esi
|
||||||
locals
|
locals
|
||||||
begPos dd ? ;<3B><>砫쭠<E7A0AB> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
begPos dd ? ;<3B><>砫쭠<E7A0AB> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
endPos dd ? ;<3B><><EFBFBD><EFBFBD>筠<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
endPos dd ? ;<3B><><EFBFBD><EFBFBD>筠<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
find db ? ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> / <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
find db ? ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> / <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
f_color db ? ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<><E6A2A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><E1ABAE>
|
f_color db ? ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 梥<><E6A2A5> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <><E1ABAE>
|
||||||
endl
|
endl
|
||||||
push eax ebx ecx esi
|
|
||||||
;eax = word_n ⥪<>騩 <20><><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><EFBFBD><E0AEA2>塞<EFBFBD><EFA5AC><EFBFBD> <><E1ABAE> <20> ᯨ᪥
|
;eax = word_n ⥪<>騩 <20><><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><EFBFBD><E0AEA2>塞<EFBFBD><EFA5AC><EFBFBD> <><E1ABAE> <20> ᯨ᪥
|
||||||
;ebx = <20><><EFBFBD> ࠧ<><E0A0A7><EFBFBD> 楫<><E6A5AB>
|
;ebx = <20><><EFBFBD> ࠧ<><E0A0A7><EFBFBD> 楫<><E6A5AB>
|
||||||
;ecx = l_pos <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD>室<EFBFBD>饣<EFBFBD> <><E1ABAE> <20> ᯨ᪥
|
;ecx = l_pos <20><><EFBFBD><E1ABA5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> (<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <20><><EFBFBD>室<EFBFBD>饣<EFBFBD> <><E1ABAE> <20> ᯨ᪥
|
||||||
@@ -2169,7 +2168,7 @@ endl
|
|||||||
|
|
||||||
mov dword[begPos],edx ;bP=i;
|
mov dword[begPos],edx ;bP=i;
|
||||||
mov esi,1
|
mov esi,1
|
||||||
|
align 4
|
||||||
.wh_2b: ;while(1){
|
.wh_2b: ;while(1){
|
||||||
call ted_iterat_next
|
call ted_iterat_next
|
||||||
|
|
||||||
@@ -2211,6 +2210,7 @@ mov byte[find],1
|
|||||||
call isalnum
|
call isalnum
|
||||||
jae .if_3e
|
jae .if_3e
|
||||||
mov byte[find],0
|
mov byte[find],0
|
||||||
|
jmp .if_4e
|
||||||
.if_3e:
|
.if_3e:
|
||||||
|
|
||||||
btr bx,3 ;4-1
|
btr bx,3 ;4-1
|
||||||
@@ -2230,6 +2230,7 @@ mov byte[find],1
|
|||||||
call isalnum
|
call isalnum
|
||||||
jae .if_5e
|
jae .if_5e
|
||||||
mov byte[find],0
|
mov byte[find],0
|
||||||
|
jmp .if_6e
|
||||||
.if_5e:
|
.if_5e:
|
||||||
|
|
||||||
btr bx,4 ;5-1
|
btr bx,4 ;5-1
|
||||||
@@ -2306,7 +2307,6 @@ mov byte[find],1
|
|||||||
mov edx,ted_tex
|
mov edx,ted_tex
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
pop esi ecx ebx eax
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@@ -2315,43 +2315,41 @@ endp
|
|||||||
;output:
|
;output:
|
||||||
; cf=1 if symbol is...
|
; cf=1 if symbol is...
|
||||||
align 4
|
align 4
|
||||||
tab_all_num db 0,0,0,0,0,0,11111111b,11b,11111110b,0xff,0xff,111b,11111110b,0xff,0xff,111b,0,0,0,0,0,0,0,0;,0,0,0,0,0,0,0,0 - tab_alpha_0,0,0,0,0,0,0,0
|
tab_all_num db 0,0,0,0,0,0,0xff,11b,11111110b,0xff,0xff,10000111b,11111110b,0xff,0xff,111b,0,0,0,0,0,0,0,0;,0,0,0,0,0,0,0,0 - tab_alpha_0,0,0,0,0,0,0,0
|
||||||
tab_alpha db 0,0,0,0,0,0,0,0,11111110b,0xff,0xff,111b,11111110b,0xff,0xff,111b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
tab_alpha db 0,0,0,0,0,0,0,0,11111110b,0xff,0xff,10000111b,11111110b,0xff,0xff,111b,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
|
||||||
|
|
||||||
|
;output:
|
||||||
|
; cf=1 <20> <20> [edx] <20>㪢<EFBFBD>, <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> '_'
|
||||||
align 4
|
align 4
|
||||||
isalnum:
|
isalnum:
|
||||||
push eax ebx
|
push eax ebx
|
||||||
mov al,byte[edx] ;al=offset
|
movzx eax,byte[edx] ;al=offset
|
||||||
shr al,3
|
shr eax,3
|
||||||
and eax,11111b
|
|
||||||
lea ebx,[tab_all_num]
|
lea ebx,[tab_all_num]
|
||||||
add ebx,eax
|
add ebx,eax
|
||||||
mov ah,byte[ebx]
|
movzx ax,byte[edx] ;al=bit
|
||||||
mov al,byte[edx] ;al=bit
|
|
||||||
and ax,111b
|
and ax,111b
|
||||||
mov bx,word[ebx]
|
bt word[ebx],ax
|
||||||
btr bx,ax
|
|
||||||
pop ebx eax
|
pop ebx eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
;output:
|
||||||
|
; cf=1 <20> <20> [edx] <20>㪢<EFBFBD> <20><><EFBFBD> '_'
|
||||||
align 4
|
align 4
|
||||||
isalpha:
|
isalpha:
|
||||||
push eax ebx
|
push eax ebx
|
||||||
mov al,byte[edx] ;al=offset
|
movzx eax,byte[edx] ;al=offset
|
||||||
shr al,3
|
shr eax,3
|
||||||
and eax,11111b
|
|
||||||
lea ebx,[tab_alpha]
|
lea ebx,[tab_alpha]
|
||||||
add ebx,eax
|
add ebx,eax
|
||||||
mov ah,byte[ebx]
|
movzx ax,byte[edx] ;al=bit
|
||||||
mov al,byte[edx] ;al=bit
|
|
||||||
and ax,111b
|
and ax,111b
|
||||||
mov bx,word[ebx]
|
bt word[ebx],ax
|
||||||
btr bx,ax
|
|
||||||
pop ebx eax
|
pop ebx eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
proc ted_show_help_f1, edit:dword
|
proc ted_show_help_f1 uses eax edx edi, edit:dword
|
||||||
push eax edx edi
|
|
||||||
mov edi,dword[edit]
|
mov edi,dword[edit]
|
||||||
|
|
||||||
call ted_get_pos_by_cursor
|
call ted_get_pos_by_cursor
|
||||||
@@ -2369,7 +2367,6 @@ proc ted_show_help_f1, edit:dword
|
|||||||
@@:
|
@@:
|
||||||
;call ted_draw_main_cursor
|
;call ted_draw_main_cursor
|
||||||
call ted_draw_help_f1
|
call ted_draw_help_f1
|
||||||
pop edi edx eax
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ ted_but_new_file:
|
|||||||
call On_NewFile
|
call On_NewFile
|
||||||
.ret_f:
|
.ret_f:
|
||||||
mov byte[openfile_path],0
|
mov byte[openfile_path],0
|
||||||
mcall 71,1,hed
|
mcall SF_SET_CAPTION,1,hed
|
||||||
pop ebx eax
|
pop ebx eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@@ -142,17 +142,25 @@ ted_but_open_file:
|
|||||||
@@:
|
@@:
|
||||||
cmp [OpenDialog_data.status],1
|
cmp [OpenDialog_data.status],1
|
||||||
jne .ret_f
|
jne .ret_f
|
||||||
|
stdcall auto_open_syntax,[OpenDialog_data.openfile_path]
|
||||||
|
stdcall [ted_open_file], tedit0,run_file_70,openfile_path
|
||||||
|
call ted_messages_after_open_file
|
||||||
|
.ret_f:
|
||||||
|
popad
|
||||||
|
ret
|
||||||
|
|
||||||
|
proc auto_open_syntax, of_path:dword
|
||||||
|
pushad
|
||||||
;<EFBFBD>饬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 䠩<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᢥ⪨ <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<EFBFBD>⮢<EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
;<EFBFBD>饬 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 䠩<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᢥ⪨ <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ⥪<EFBFBD>⮢<EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
||||||
mov esi,[OpenDialog_data.openfile_path]
|
mov esi,[of_path]
|
||||||
call strlen
|
call strlen
|
||||||
mov edx,openfile_path
|
mov edx,[of_path]
|
||||||
add edx,eax
|
add edx,eax
|
||||||
.f_beg:
|
.f_beg:
|
||||||
cmp byte[edx],'.'
|
cmp byte[edx],'.'
|
||||||
je .found
|
je .found
|
||||||
dec edx
|
dec edx
|
||||||
cmp edx,openfile_path
|
cmp edx,[of_path]
|
||||||
jg .f_beg
|
jg .f_beg
|
||||||
.found:
|
.found:
|
||||||
inc edx ;edx - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>७<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮣<EFBFBD> 䠩<EFBFBD><EFBFBD>
|
inc edx ;edx - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>७<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⮣<EFBFBD> 䠩<EFBFBD><EFBFBD>
|
||||||
@@ -169,17 +177,11 @@ ted_but_open_file:
|
|||||||
jmp .end_0
|
jmp .end_0
|
||||||
.ok: ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨥ 䠩<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᢥ⪨ <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>७<EFBFBD><EFBFBD>
|
.ok: ;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨥ 䠩<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᢥ⪨ <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᨬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>७<EFBFBD><EFBFBD>
|
||||||
sub ebx,32
|
sub ebx,32
|
||||||
;mov ecx,ebx
|
stdcall open_unpac_synt_file,ebx
|
||||||
;mcall 71,1
|
|
||||||
call open_unpac_synt_file
|
|
||||||
.end_0:
|
.end_0:
|
||||||
|
|
||||||
stdcall [ted_open_file], tedit0,run_file_70,openfile_path
|
|
||||||
call ted_messages_after_open_file
|
|
||||||
|
|
||||||
.ret_f:
|
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
;description:
|
;description:
|
||||||
; <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>맮<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
; <EFBFBD>㭪<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD>맮<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
@@ -269,8 +271,7 @@ proc ted_but_open_syntax uses eax ebx ecx edi, edit:dword
|
|||||||
jne @f
|
jne @f
|
||||||
stdcall dword[tl_node_get_data], tree1
|
stdcall dword[tl_node_get_data], tree1
|
||||||
mov [fn_col_option],eax
|
mov [fn_col_option],eax
|
||||||
mov ebx,eax
|
stdcall open_unpac_synt_file,eax
|
||||||
call open_unpac_synt_file
|
|
||||||
cmp ebx,-1
|
cmp ebx,-1
|
||||||
je @f
|
je @f
|
||||||
|
|
||||||
@@ -282,13 +283,13 @@ endp
|
|||||||
|
|
||||||
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨥ <EFBFBD> <EFBFBD><EFBFBD>ᯠ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᢥ⪨ ᨭ⠪<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨥ <EFBFBD> <EFBFBD><EFBFBD>ᯠ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>ᢥ⪨ ᨭ⠪<EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
;input:
|
;input:
|
||||||
; ebx - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> ᨭ⠪<EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> info)
|
; f_name - 㪠<EFBFBD><EFBFBD>⥫<EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>뢠<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> ᨭ⠪<EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> info)
|
||||||
;output:
|
;output:
|
||||||
; ebx - <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
; ebx - <EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⠭<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
||||||
; ecx - ࠧ<EFBFBD><EFBFBD>蠥<EFBFBD><EFBFBD><EFBFBD>
|
; ecx - ࠧ<EFBFBD><EFBFBD>蠥<EFBFBD><EFBFBD><EFBFBD>
|
||||||
align 4
|
align 4
|
||||||
open_unpac_synt_file:
|
proc open_unpac_synt_file uses eax edi esi, f_name:dword
|
||||||
push eax edi esi
|
mov ebx,[f_name]
|
||||||
mov edi,last_open_synt_file
|
mov edi,last_open_synt_file
|
||||||
stdcall strcmp,ebx,edi ;<EFBFBD>ࠢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD> ࠭<EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD><EFBFBD>
|
stdcall strcmp,ebx,edi ;<EFBFBD>ࠢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD> ࠭<EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD><EFBFBD>
|
||||||
test eax,eax
|
test eax,eax
|
||||||
@@ -296,14 +297,14 @@ push eax edi esi
|
|||||||
|
|
||||||
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD>)
|
;<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬 <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>祭<EFBFBD><EFBFBD>)
|
||||||
mov esi,ebx
|
mov esi,ebx
|
||||||
mov ecx,32
|
mov ecx,32/4
|
||||||
cld
|
cld
|
||||||
rep movsb
|
rep movsd
|
||||||
|
|
||||||
copy_path ebx,fn_syntax_dir,syntax_path,0
|
copy_path ebx,fn_syntax_dir,syntax_path,0
|
||||||
copy_path syntax_path,sys_path,file_name,0
|
copy_path syntax_path,sys_path,file_name,0
|
||||||
mov edi, tedit0
|
mov edi, tedit0
|
||||||
mov [run_file_70.Function], 0
|
mov [run_file_70.Function], SSF_READ_FILE
|
||||||
mov [run_file_70.Position], 0
|
mov [run_file_70.Position], 0
|
||||||
mov [run_file_70.Flags], 0
|
mov [run_file_70.Flags], 0
|
||||||
mov ecx, ted_syntax_file_size
|
mov ecx, ted_syntax_file_size
|
||||||
@@ -311,7 +312,7 @@ push eax edi esi
|
|||||||
m2m dword[run_file_70.Buffer], ted_syntax_file
|
m2m dword[run_file_70.Buffer], ted_syntax_file
|
||||||
mov byte[run_file_70+20], 0
|
mov byte[run_file_70+20], 0
|
||||||
mov [run_file_70.FileName], file_name
|
mov [run_file_70.FileName], file_name
|
||||||
mcall 70, run_file_70
|
mcall SF_FILE, run_file_70
|
||||||
cmp ebx,-1
|
cmp ebx,-1
|
||||||
jne .end_0
|
jne .end_0
|
||||||
call ted_on_init_synt_err
|
call ted_on_init_synt_err
|
||||||
@@ -337,8 +338,8 @@ push eax edi esi
|
|||||||
.end_unpack:
|
.end_unpack:
|
||||||
stdcall [ted_init_syntax_file], tedit0
|
stdcall [ted_init_syntax_file], tedit0
|
||||||
@@:
|
@@:
|
||||||
pop esi edi eax
|
|
||||||
ret
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
;description:
|
;description:
|
||||||
; <EFBFBD>맮<EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨥ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᪠
|
; <EFBFBD>맮<EFBFBD>/<EFBFBD><EFBFBD><EFBFBD><EFBFBD>⨥ <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>᪠
|
||||||
@@ -403,7 +404,7 @@ but_find_key_w:
|
|||||||
cmp byte[wnd_k_words_run],0
|
cmp byte[wnd_k_words_run],0
|
||||||
jne @f
|
jne @f
|
||||||
pushad
|
pushad
|
||||||
mcall 51,1,prop_start,thread_coords
|
mcall SF_CREATE_THREAD,1,prop_start,thread_coords
|
||||||
popad
|
popad
|
||||||
@@:
|
@@:
|
||||||
ret
|
ret
|
||||||
|
@@ -3,11 +3,7 @@
|
|||||||
use32
|
use32
|
||||||
org 0x0
|
org 0x0
|
||||||
db 'MENUET01' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC><EFBFBD> 䠩<><E4A0A9> <20>ᥣ<EFBFBD><E1A5A3> 8 <20><><EFBFBD><EFBFBD>
|
db 'MENUET01' ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>. <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC><EFBFBD> 䠩<><E4A0A9> <20>ᥣ<EFBFBD><E1A5A3> 8 <20><><EFBFBD><EFBFBD>
|
||||||
dd 0x01
|
dd 1, start, i_end, mem, stacktop
|
||||||
dd start
|
|
||||||
dd i_end ; ࠧ<><E0A0A7><EFBFBD> <20>ਫ<EFBFBD><E0A8AB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
dd mem
|
|
||||||
dd stacktop
|
|
||||||
dd file_name ; command line
|
dd file_name ; command line
|
||||||
dd sys_path
|
dd sys_path
|
||||||
|
|
||||||
@@ -21,6 +17,7 @@ include '../../proc32.inc'
|
|||||||
;include '../../config.inc'
|
;include '../../config.inc'
|
||||||
include '../../macros.inc'
|
include '../../macros.inc'
|
||||||
include '../../dll.inc'
|
include '../../dll.inc'
|
||||||
|
include '../../KOSfuncs.inc'
|
||||||
include '../../develop/libraries/box_lib/load_lib.mac'
|
include '../../develop/libraries/box_lib/load_lib.mac'
|
||||||
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
|
||||||
include '../../system/desktop/trunk/kglobals.inc'
|
include '../../system/desktop/trunk/kglobals.inc'
|
||||||
@@ -59,14 +56,14 @@ macro load_image_file path,buf,size
|
|||||||
stdcall mem.Alloc, dword size ;<3B>뤥<EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
stdcall mem.Alloc, dword size ;<3B>뤥<EFBFBD>塞 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||||
mov [buf],eax
|
mov [buf],eax
|
||||||
|
|
||||||
mov [run_file_70.Function], 0
|
mov [run_file_70.Function], SSF_READ_FILE
|
||||||
mov [run_file_70.Position], 0
|
mov [run_file_70.Position], 0
|
||||||
mov [run_file_70.Flags], 0
|
mov [run_file_70.Flags], 0
|
||||||
mov [run_file_70.Count], dword size
|
mov [run_file_70.Count], dword size
|
||||||
m2m [run_file_70.Buffer], eax
|
m2m [run_file_70.Buffer], eax
|
||||||
mov byte[run_file_70+20], 0
|
mov byte[run_file_70+20], 0
|
||||||
mov [run_file_70.FileName], file_name
|
mov [run_file_70.FileName], file_name
|
||||||
mcall 70,run_file_70 ;<3B><><EFBFBD><EFBFBD>㦠<EFBFBD><E3A6A0> 䠩<> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
mcall SF_FILE,run_file_70 ;<3B><><EFBFBD><EFBFBD>㦠<EFBFBD><E3A6A0> 䠩<> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD>
|
||||||
cmp ebx,0xffffffff
|
cmp ebx,0xffffffff
|
||||||
je @f
|
je @f
|
||||||
;<3B><>।<EFBFBD><E0A5A4>塞 <20><><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><>ॢ<EFBFBD><E0A5A2><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> image_data
|
;<3B><>।<EFBFBD><E0A5A4>塞 <20><><EFBFBD> <20><><EFBFBD><EFBFBD>ࠦ<EFBFBD><E0A0A6><EFBFBD><EFBFBD> <20> <20><>ॢ<EFBFBD><E0A5A2><EFBFBD><EFBFBD> <20><><EFBFBD> <20><> <20>६<EFBFBD><E0A5AC><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> image_data
|
||||||
@@ -84,14 +81,14 @@ icon_tl_sys dd 0 ;㪠
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
start:
|
start:
|
||||||
mcall 48,3,sc,sizeof.sys_colors_new
|
mcall SF_STYLE_SETTINGS,SSF_GET_COLORS,sc,sizeof.sys_colors_new
|
||||||
|
|
||||||
mcall 68,11
|
mcall SF_SYS_MISC,SSF_HEAP_INIT
|
||||||
or eax,eax
|
or eax,eax
|
||||||
jz button.exit
|
jz button.exit
|
||||||
|
|
||||||
mcall 66,1,1 ;scan code
|
mcall SF_KEYBOARD,SSF_SET_INPUT_MODE,1 ;scan code
|
||||||
mcall 40,0xC0000027
|
mcall SF_SET_EVENTS_MASK,0xC0000027
|
||||||
|
|
||||||
mov esi,file_name
|
mov esi,file_name
|
||||||
call strlen
|
call strlen
|
||||||
@@ -107,7 +104,7 @@ mov ebp,lib0
|
|||||||
.test_lib_open:
|
.test_lib_open:
|
||||||
cmp dword [ebp+ll_struc_size-4],0
|
cmp dword [ebp+ll_struc_size-4],0
|
||||||
jz @f
|
jz @f
|
||||||
mcall -1 ;exit not correct
|
mcall SF_TERMINATE_PROCESS ;exit not correct
|
||||||
@@:
|
@@:
|
||||||
add ebp,ll_struc_size
|
add ebp,ll_struc_size
|
||||||
cmp ebp,load_lib_end
|
cmp ebp,load_lib_end
|
||||||
@@ -209,7 +206,7 @@ mov ebp,lib0
|
|||||||
mov dword[tree1.data_img],eax
|
mov dword[tree1.data_img],eax
|
||||||
;------------------------------------------------------------------------------
|
;------------------------------------------------------------------------------
|
||||||
copy_path fn_syntax_dir,sys_path,file_name,0 ;<3B><>६ <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9><EFBFBD><EFBFBD> ᨭ⠪<E1A8AD><E2A0AA><EFBFBD><EFBFBD>
|
copy_path fn_syntax_dir,sys_path,file_name,0 ;<3B><>६ <20><><EFBFBD><EFBFBD> <20> <20><><EFBFBD><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9><EFBFBD><EFBFBD> ᨭ⠪<E1A8AD><E2A0AA><EFBFBD><EFBFBD>
|
||||||
mcall 70,tree_file_struct
|
mcall SF_FILE,tree_file_struct
|
||||||
|
|
||||||
cmp ebx,-1
|
cmp ebx,-1
|
||||||
je .end_dir_init
|
je .end_dir_init
|
||||||
@@ -272,13 +269,13 @@ mov ebp,lib0
|
|||||||
@@:
|
@@:
|
||||||
|
|
||||||
;--- load color option file ---
|
;--- load color option file ---
|
||||||
mov ebx,dword[fn_col_option]
|
stdcall open_unpac_synt_file,[fn_col_option]
|
||||||
call open_unpac_synt_file
|
|
||||||
|
|
||||||
;--- get cmd line ---
|
;--- get cmd line ---
|
||||||
cmp byte[openfile_path+3],0 ;openfile_path
|
cmp byte[openfile_path+3],0 ;openfile_path
|
||||||
je @f ;if file names exist
|
je @f ;if file names exist
|
||||||
mov esi,openfile_path
|
mov esi,openfile_path
|
||||||
|
stdcall auto_open_syntax,esi
|
||||||
call strlen ;eax=strlen
|
call strlen ;eax=strlen
|
||||||
call but_no_msg_OpenFile
|
call but_no_msg_OpenFile
|
||||||
@@:
|
@@:
|
||||||
@@ -291,7 +288,7 @@ red_win:
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
still:
|
still:
|
||||||
mcall 10
|
mcall SF_WAIT_EVENT
|
||||||
cmp dword[exit_code],1
|
cmp dword[exit_code],1
|
||||||
je button.exit
|
je button.exit
|
||||||
|
|
||||||
@@ -309,28 +306,24 @@ still:
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
draw_window:
|
draw_window:
|
||||||
mcall 12,1
|
mcall SF_REDRAW,SSF_BEGIN_DRAW
|
||||||
|
|
||||||
mov edx,[sc.work]
|
mov edx,[sc.work]
|
||||||
or edx,0x73000000
|
or edx,0x73000000
|
||||||
mov edi,hed
|
mcall SF_CREATE_WINDOW,dword[wnd_s_pos],dword[wnd_s_pos+4],,,hed
|
||||||
mcall 0,dword[wnd_s_pos],dword[wnd_s_pos+4]
|
|
||||||
|
|
||||||
mcall 9,procinfo,-1
|
mcall SF_THREAD_INFO,procinfo,-1
|
||||||
mov edi,tedit0 ;<3B><><EFBFBD>祭<EFBFBD><E7A5AD> edi <20>㦭<EFBFBD> <20><><EFBFBD> EvSize <20> ted_wnd_t
|
mov edi,tedit0 ;<3B><><EFBFBD>祭<EFBFBD><E7A5AD> edi <20>㦭<EFBFBD> <20><><EFBFBD> EvSize <20> ted_wnd_t
|
||||||
call EvSize
|
call EvSize
|
||||||
|
|
||||||
movzx ebx,word[procinfo.client_box.width]
|
movzx ebx,word[procinfo.client_box.width]
|
||||||
inc bx
|
inc bx
|
||||||
mcall 13,,ted_wnd_t ;<3B><><EFBFBD>孨<EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⪨ <20><><EFBFBD>孥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
mcall SF_DRAW_RECT,,ted_wnd_t ;<3B><><EFBFBD>孨<EFBFBD> <20><>אַ㣮<EFACAE>쭨<EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⪨ <20><><EFBFBD>孥<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
|
|
||||||
call draw_but_toolbar
|
call draw_but_toolbar
|
||||||
|
|
||||||
stdcall [kmainmenu_draw], [main_menu]
|
stdcall [kmainmenu_draw], [main_menu]
|
||||||
|
|
||||||
stdcall [ted_draw], tedit0
|
stdcall [ted_draw], tedit0
|
||||||
|
|
||||||
mcall 12,2
|
mcall SF_REDRAW,SSF_END_DRAW
|
||||||
ret
|
ret
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
@@ -363,7 +356,7 @@ endp
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
key:
|
key:
|
||||||
mcall 66,3 ;66.3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ﭨ<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
mcall SF_KEYBOARD,SSF_GET_CONTROL_KEYS ;66.3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ﭨ<EFBFBD> <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
xor esi,esi
|
xor esi,esi
|
||||||
mov ecx,1
|
mov ecx,1
|
||||||
test al,0x03 ;[Shift]
|
test al,0x03 ;[Shift]
|
||||||
@@ -385,8 +378,8 @@ key:
|
|||||||
or esi,KM_NUMLOCK
|
or esi,KM_NUMLOCK
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
mcall 26,2,,conv_tabl ;26.2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᪫<EFBFBD><E1AAAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
mcall SF_SYSTEM_GET,SSF_KEYBOARD_LAYOUT,,conv_tabl ;26.2 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>᪫<EFBFBD><E1AAAB><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||||
mcall 2 ;<3B><><EFBFBD><EFBFBD>砥<EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
mcall SF_GET_KEY
|
||||||
stdcall [tl_key], tree1
|
stdcall [tl_key], tree1
|
||||||
|
|
||||||
test word [edit2.flags],10b;ed_focus ; <20> <20><> <20> 䮪<><E4AEAA><EFBFBD>, <20><>室<EFBFBD><E5AEA4>
|
test word [edit2.flags],10b;ed_focus ; <20> <20><> <20> 䮪<><E4AEAA><EFBFBD>, <20><>室<EFBFBD><E5AEA4>
|
||||||
@@ -415,7 +408,7 @@ key:
|
|||||||
align 4
|
align 4
|
||||||
button:
|
button:
|
||||||
|
|
||||||
mcall 17 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>⮩ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
mcall SF_GET_BUTTON
|
||||||
cmp ah,3
|
cmp ah,3
|
||||||
jne @f
|
jne @f
|
||||||
call ted_but_new_file
|
call ted_but_new_file
|
||||||
@@ -531,7 +524,7 @@ button:
|
|||||||
|
|
||||||
stdcall [ted_delete], tedit0
|
stdcall [ted_delete], tedit0
|
||||||
stdcall [tl_data_clear], tree1
|
stdcall [tl_data_clear], tree1
|
||||||
mcall -1 ;<3B><>室 <20><> <20>ணࠬ<E0AEA3><E0A0AC>
|
mcall SF_TERMINATE_PROCESS ;<3B><>室 <20><> <20>ணࠬ<E0AEA3><E0A0AC>
|
||||||
|
|
||||||
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
|
edit2 edit_box TED_PANEL_WIDTH-1, 0, 20, 0xffffff, 0xff80, 0xff0000, 0xff, 0x4080, 300, buf_find, mouse_dd, 0
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user