forked from KolibriOS/kolibrios
tedit: add case sensitive
git-svn-id: svn://kolibrios.org@7583 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3040d1b8a2
commit
a6277573f7
@ -722,7 +722,7 @@ proc ted_clear uses ecx edi, edit:dword, cl_al_mem:dword
|
|||||||
inc edx
|
inc edx
|
||||||
loop @b
|
loop @b
|
||||||
mov edx,ted_tex
|
mov edx,ted_tex
|
||||||
mov dword [edx+6],1
|
mov dword [edx+symbol.next],1
|
||||||
pop edx
|
pop edx
|
||||||
|
|
||||||
.exit:
|
.exit:
|
||||||
@ -833,14 +833,14 @@ proc ted_on_open_file
|
|||||||
push ebx
|
push ebx
|
||||||
@@:
|
@@:
|
||||||
mov ebx,[edx]
|
mov ebx,[edx]
|
||||||
mov byte [eax],bl
|
mov byte[eax],bl
|
||||||
mov dword [eax+2],ecx
|
mov dword[eax+symbol.perv],ecx
|
||||||
inc dword [eax+2]
|
inc dword[eax+symbol.perv]
|
||||||
mov dword [eax+6],ecx
|
mov dword[eax+symbol.next],ecx
|
||||||
add dword [eax+6],3
|
add dword[eax+symbol.next],3
|
||||||
;mov byte[eax+1],0 ;col=0
|
;mov byte[eax+1],0 ;col=0
|
||||||
mov dword [eax+10],-1 ;tc=-1
|
mov dword[eax+symbol.tc],-1
|
||||||
mov dword [eax+14],0 ;td=0
|
mov dword[eax+symbol.td],0
|
||||||
|
|
||||||
cmp ecx,0
|
cmp ecx,0
|
||||||
je @f
|
je @f
|
||||||
@ -850,32 +850,31 @@ proc ted_on_open_file
|
|||||||
jmp @b
|
jmp @b
|
||||||
@@:
|
@@:
|
||||||
pop ebx
|
pop ebx
|
||||||
add eax,2
|
mov dword[eax+symbol.perv],0 ; first sumbol 'perv=0'
|
||||||
mov dword [eax],0 ; first sumbol 'perv=0'
|
|
||||||
|
|
||||||
mov edx,ted_tex ; áâனª¨ ç «ì®£® á«ã¦¥¡®£® ᨬ¢®«
|
mov edx,ted_tex ; áâனª¨ ç «ì®£® á«ã¦¥¡®£® ᨬ¢®«
|
||||||
; begining sumbol 'perv=0' 'next=2'
|
; begining sumbol 'perv=0' 'next=2'
|
||||||
mov dword [edx+2],0
|
mov dword[edx+symbol.perv],0
|
||||||
mov dword [edx+6],2
|
mov dword[edx+symbol.next],2
|
||||||
|
|
||||||
add edx,sizeof.symbol ; áâனª¨ ª®¥ç®£® á«ã¦¥¡®£® ᨬ¢®«
|
add edx,sizeof.symbol ; áâனª¨ ª®¥ç®£® á«ã¦¥¡®£® ᨬ¢®«
|
||||||
mov dword [edx+6],0 ; last sumbol 'next=0'
|
mov dword[edx+symbol.next],0 ; last sumbol 'next=0'
|
||||||
mov dword [edx+2],ebx ; last sumbol 'perv=last'
|
mov dword[edx+symbol.perv],ebx ; last sumbol 'perv=last'
|
||||||
inc dword [edx+2]
|
inc dword[edx+symbol.perv]
|
||||||
mov dword [edx+10],0 ; áâ ¢¨¬ ¢à¥¬ï ᮧ¤ ¨ï à ¢®¥ 0, çâ® ¡ë ᨬ¢®« ¯à ¢¨«ì® ®¡à ¡ âë¢ «áï ¯à¨ ®âªàë⨨ ä ©«®¢ ¡®«ìè¨å 28 ¡ ©â
|
mov dword[edx+symbol.tc],0 ; áâ ¢¨¬ ¢à¥¬ï ᮧ¤ ¨ï à ¢®¥ 0, çâ® ¡ë ᨬ¢®« ¯à ¢¨«ì® ®¡à ¡ âë¢ «áï ¯à¨ ®âªàë⨨ ä ©«®¢ ¡®«ìè¨å 28 ¡ ©â
|
||||||
|
|
||||||
mov edx,ebx
|
mov edx,ebx
|
||||||
inc edx ;2 = rezerv sumbols
|
inc edx ;2 = rezerv sumbols
|
||||||
imul edx,sizeof.symbol
|
imul edx,sizeof.symbol
|
||||||
add edx,ted_tex
|
add edx,ted_tex
|
||||||
mov dword [edx+6],1 ; last sumbol 'next=1'
|
mov dword[edx+symbol.next],1 ; last sumbol 'next=1'
|
||||||
|
|
||||||
@@: ;clear memory, need if before was open big file
|
@@: ;clear memory, need if before was open big file
|
||||||
add edx,sizeof.symbol
|
add edx,sizeof.symbol
|
||||||
cmp edx,ted_tex_end
|
cmp edx,ted_tex_end
|
||||||
jge @f
|
jge @f
|
||||||
mov dword[edx+10],0
|
mov dword[edx+symbol.tc],0
|
||||||
mov dword[edx+14],0
|
mov dword[edx+symbol.td],0
|
||||||
jmp @b
|
jmp @b
|
||||||
@@:
|
@@:
|
||||||
|
|
||||||
@ -908,7 +907,7 @@ ted_iterat_perv:
|
|||||||
je .else
|
je .else
|
||||||
push ebx
|
push ebx
|
||||||
@@:
|
@@:
|
||||||
mov edx,[edx+2]
|
mov edx,[edx+symbol.perv]
|
||||||
or edx,edx
|
or edx,edx
|
||||||
jz @f
|
jz @f
|
||||||
imul edx,sizeof.symbol
|
imul edx,sizeof.symbol
|
||||||
@ -925,12 +924,12 @@ ted_iterat_perv:
|
|||||||
pop ebx
|
pop ebx
|
||||||
ret
|
ret
|
||||||
.else:
|
.else:
|
||||||
mov edx,[edx+2]
|
mov edx,[edx+symbol.perv]
|
||||||
or edx,edx
|
or edx,edx
|
||||||
jz @f
|
jz @f
|
||||||
imul edx,sizeof.symbol
|
imul edx,sizeof.symbol
|
||||||
add edx,ted_tex
|
add edx,ted_tex
|
||||||
cmp dword [edx+14],0
|
cmp dword[edx+symbol.td],0
|
||||||
jne .else
|
jne .else
|
||||||
cmp byte[edx],10 ;¯à®¯ã᪠ᨬ¢®« á ª®¤®¬ 10
|
cmp byte[edx],10 ;¯à®¯ã᪠ᨬ¢®« á ª®¤®¬ 10
|
||||||
je .else
|
je .else
|
||||||
@ -951,7 +950,7 @@ ted_iterat_next:
|
|||||||
je .else
|
je .else
|
||||||
push ebx
|
push ebx
|
||||||
@@:
|
@@:
|
||||||
mov edx,[edx+6]
|
mov edx,[edx+symbol.next]
|
||||||
cmp edx,1
|
cmp edx,1
|
||||||
jle @f
|
jle @f
|
||||||
imul edx,sizeof.symbol
|
imul edx,sizeof.symbol
|
||||||
@ -969,13 +968,13 @@ ted_iterat_next:
|
|||||||
pop ebx
|
pop ebx
|
||||||
ret
|
ret
|
||||||
.else:
|
.else:
|
||||||
mov edx,[edx+6]
|
mov edx,[edx+symbol.next]
|
||||||
cmp edx,1
|
cmp edx,1
|
||||||
jle @f
|
jle @f
|
||||||
imul edx,sizeof.symbol
|
imul edx,sizeof.symbol
|
||||||
add edx,ted_tex
|
add edx,ted_tex
|
||||||
|
|
||||||
cmp dword [edx+14],0
|
cmp dword[edx+symbol.td],0
|
||||||
jne .else
|
jne .else
|
||||||
cmp byte[edx],10 ;¯à®¯ã᪠ᨬ¢®« á ª®¤®¬ 10
|
cmp byte[edx],10 ;¯à®¯ã᪠ᨬ¢®« á ª®¤®¬ 10
|
||||||
je .else
|
je .else
|
||||||
@ -1055,10 +1054,9 @@ ted_symbol_not_vis:
|
|||||||
push eax
|
push eax
|
||||||
|
|
||||||
xor bl,bl
|
xor bl,bl
|
||||||
|
cmp dword[edx+symbol.td],0
|
||||||
cmp dword [edx+14],0
|
|
||||||
je @f
|
je @f
|
||||||
mov eax,[edx+14] ;eax=tex[i].td
|
mov eax,[edx+symbol.td] ;eax=tex[i].td
|
||||||
add eax,ted_tim_undo
|
add eax,ted_tim_undo
|
||||||
cmp eax,ted_tim_ch
|
cmp eax,ted_tim_ch
|
||||||
jg @f
|
jg @f
|
||||||
@ -1069,7 +1067,7 @@ ted_symbol_not_vis:
|
|||||||
|
|
||||||
mov eax,ted_tim_ch
|
mov eax,ted_tim_ch
|
||||||
sub eax,ted_tim_undo
|
sub eax,ted_tim_undo
|
||||||
cmp [edx+10],eax
|
cmp [edx+symbol.tc],eax
|
||||||
jle @f
|
jle @f
|
||||||
or bl,1
|
or bl,1
|
||||||
@@:
|
@@:
|
||||||
@ -1141,9 +1139,9 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
|
|||||||
|
|
||||||
mov edx,ted_ptr_free_symb
|
mov edx,ted_ptr_free_symb
|
||||||
.beg_cycle: ;for(i=...;i<ted_max_chars;i++)
|
.beg_cycle: ;for(i=...;i<ted_max_chars;i++)
|
||||||
cmp dword [edx+10],0 ;if(!tex[i].tc && !tex[i].td)
|
cmp dword[edx+symbol.tc],0 ;if(!tex[i].tc && !tex[i].td)
|
||||||
jne .u1f
|
jne .u1f
|
||||||
cmp dword [edx+14],0
|
cmp dword[edx+symbol.td],0
|
||||||
jne .u1f
|
jne .u1f
|
||||||
test dword[add_opt],ted_opt_ed_change_time ;if(n_tim) ted_tim_ch++;
|
test dword[add_opt],ted_opt_ed_change_time ;if(n_tim) ted_tim_ch++;
|
||||||
jz .no_tim
|
jz .no_tim
|
||||||
@ -1173,21 +1171,21 @@ proc ted_text_add, edit:dword, text:dword, t_len:dword, add_opt:dword
|
|||||||
|
|
||||||
mov cl,byte[esi] ;tex[i].c=ta[ns];
|
mov cl,byte[esi] ;tex[i].c=ta[ns];
|
||||||
mov byte[edx],cl
|
mov byte[edx],cl
|
||||||
m2m dword[edx+10],ted_tim_ch ;tex[i].tc=ted_tim_ch;
|
m2m dword[edx+symbol.tc],ted_tim_ch ;tex[i].tc=ted_tim_ch;
|
||||||
mov [edx+2],eax ;tex[i].perv=po_t;
|
mov [edx+symbol.perv],eax ;tex[i].perv=po_t;
|
||||||
|
|
||||||
mov ecx,eax
|
mov ecx,eax
|
||||||
imul ecx,sizeof.symbol
|
imul ecx,sizeof.symbol
|
||||||
add ecx,ted_tex ; *** ecx = tex[po_t] ***
|
add ecx,ted_tex ; *** ecx = tex[po_t] ***
|
||||||
add ecx,6 ; *** ecx = tex[po_t].next ***
|
add ecx,symbol.next ; *** ecx = tex[po_t].next ***
|
||||||
m2m dword[edx+6],dword[ecx] ;tex[i].next=tex[po_t].next;
|
m2m dword[edx+symbol.next],dword[ecx] ;tex[i].next=tex[po_t].next;
|
||||||
|
|
||||||
call ted_get_text_arr_index ;*** eax = i ***
|
call ted_get_text_arr_index ;*** eax = i ***
|
||||||
mov [ecx],eax ;tex[po_t].next=i; // áá뫪¨ ¯¥à¥ ¯à ¢«ï¥¬
|
mov [ecx],eax ;tex[po_t].next=i; // áá뫪¨ ¯¥à¥ ¯à ¢«ï¥¬
|
||||||
mov ecx,[edx+6] ; *** ecx = tex[i].next ***
|
mov ecx,[edx+symbol.next] ; *** ecx = tex[i].next ***
|
||||||
imul ecx,sizeof.symbol
|
imul ecx,sizeof.symbol
|
||||||
add ecx,ted_tex ; *** ecx = tex[tex[i].next] ***
|
add ecx,ted_tex ; *** ecx = tex[tex[i].next] ***
|
||||||
mov [ecx+2],eax ;tex[tex[i].next].perv=i;
|
mov [ecx+symbol.perv],eax ;tex[tex[i].next].perv=i;
|
||||||
|
|
||||||
; *** ¢áâ ¢ª ¤®¯®«¨â¥«ìëå áâப ¨ ¯à®¡¥«®¢
|
; *** ¢áâ ¢ª ¤®¯®«¨â¥«ìëå áâப ¨ ¯à®¡¥«®¢
|
||||||
; ¥á«¨ ªãàá®à ¢® ¢à¥¬ï ¢áâ ¢ª¨ 室¨«áï § ⥪á⮬ ***
|
; ¥á«¨ ªãàá®à ¢® ¢à¥¬ï ¢áâ ¢ª¨ 室¨«áï § ⥪á⮬ ***
|
||||||
@ -1268,9 +1266,9 @@ ted_char_add:
|
|||||||
.loop_b:
|
.loop_b:
|
||||||
cmp ecx,ted_tex_end
|
cmp ecx,ted_tex_end
|
||||||
jge .end_f
|
jge .end_f
|
||||||
cmp dword[ecx+10],0
|
cmp dword[ecx+symbol.tc],0
|
||||||
jne @f
|
jne @f
|
||||||
cmp dword[ecx+14],0
|
cmp dword[ecx+symbol.td],0
|
||||||
je .loop_e
|
je .loop_e
|
||||||
@@:
|
@@:
|
||||||
add ecx,sizeof.symbol
|
add ecx,sizeof.symbol
|
||||||
@ -1280,23 +1278,23 @@ align 4
|
|||||||
|
|
||||||
push eax ebx
|
push eax ebx
|
||||||
mov eax,ted_tim_ch
|
mov eax,ted_tim_ch
|
||||||
mov dword[ecx+10],eax
|
mov [ecx+symbol.tc],eax
|
||||||
mov ax,si
|
mov ax,si
|
||||||
mov byte[ecx],al
|
mov byte[ecx],al
|
||||||
|
|
||||||
call ted_get_text_arr_index ; *** eax=pos ***
|
call ted_get_text_arr_index ; *** eax=pos ***
|
||||||
mov [ecx+2],eax ;tex[i].perv=pos;
|
mov [ecx+symbol.perv],eax ;tex[i].perv=pos;
|
||||||
m2m dword[ecx+6],dword[edx+6] ;tex[i].next=tex[pos].next;
|
m2m dword[ecx+symbol.next],dword[edx+symbol.next] ;tex[i].next=tex[pos].next;
|
||||||
|
|
||||||
push edx
|
push edx
|
||||||
mov edx,ecx
|
mov edx,ecx
|
||||||
call ted_get_text_arr_index ; *** eax=i ***
|
call ted_get_text_arr_index ; *** eax=i ***
|
||||||
pop edx
|
pop edx
|
||||||
|
|
||||||
mov [edx+6],eax ;tex[pos].next=i; // áá뫪¨ ¯¥à¥ ¯à ¢«ï¥¬
|
mov [edx+symbol.next],eax ;tex[pos].next=i; // áá뫪¨ ¯¥à¥ ¯à ¢«ï¥¬
|
||||||
mov ebx,[ecx+6]
|
mov ebx,[ecx+symbol.next]
|
||||||
ConvertIndexToPointer ebx
|
ConvertIndexToPointer ebx
|
||||||
mov [ebx+2],eax ;tex[tex[i].next].perv=i; // ...
|
mov [ebx+symbol.perv],eax ;tex[tex[i].next].perv=i; // ...
|
||||||
pop ebx eax
|
pop ebx eax
|
||||||
|
|
||||||
.end_f:
|
.end_f:
|
||||||
@ -1314,7 +1312,7 @@ proc ted_but_convert_by_table uses eax edx edi esi, edit:dword, table:dword
|
|||||||
mov edx,ted_tex
|
mov edx,ted_tex
|
||||||
.cycle:
|
.cycle:
|
||||||
;¯¥à¥å®¤¨¬ á«¥¤ãî騩 ᨬ¢®«
|
;¯¥à¥å®¤¨¬ á«¥¤ãî騩 ᨬ¢®«
|
||||||
mov edx,[edx+6]
|
mov edx,[edx+symbol.next]
|
||||||
cmp edx,1
|
cmp edx,1
|
||||||
jle .end_text
|
jle .end_text
|
||||||
imul edx,sizeof.symbol
|
imul edx,sizeof.symbol
|
||||||
@ -1380,7 +1378,7 @@ proc ted_convert_sel_text, conv_fun:dword
|
|||||||
cmp byte[edx],al
|
cmp byte[edx],al
|
||||||
pop eax
|
pop eax
|
||||||
je .no_change
|
je .no_change
|
||||||
m2m dword [edx+14],ted_tim_ch
|
m2m dword[edx+symbol.td],ted_tim_ch
|
||||||
call ted_char_add ;b_pos=ted_char_add(tex[i].c^32,i,false,b_pos);
|
call ted_char_add ;b_pos=ted_char_add(tex[i].c^32,i,false,b_pos);
|
||||||
call ted_get_text_next_pos ;go to added symbol
|
call ted_get_text_next_pos ;go to added symbol
|
||||||
inc dword[conv_cou]
|
inc dword[conv_cou]
|
||||||
@ -1424,7 +1422,7 @@ proc ted_text_del uses ecx edx edi, edit:dword, del_opt:dword
|
|||||||
jz @f
|
jz @f
|
||||||
inc ted_tim_ch
|
inc ted_tim_ch
|
||||||
@@:
|
@@:
|
||||||
m2m dword[edx+14], ted_tim_ch
|
m2m dword[edx+symbol.td], ted_tim_ch
|
||||||
mov cl,1
|
mov cl,1
|
||||||
.no_del:
|
.no_del:
|
||||||
mov bl,cl
|
mov bl,cl
|
||||||
@ -1461,7 +1459,7 @@ proc ted_sel_text_del uses ebx ecx edx esi, del_opt:dword
|
|||||||
je @f
|
je @f
|
||||||
cmp edx,ebx ;if(i==te)break;
|
cmp edx,ebx ;if(i==te)break;
|
||||||
je @f
|
je @f
|
||||||
m2m dword[edx+14],ted_tim_ch
|
m2m dword[edx+symbol.td],ted_tim_ch
|
||||||
mov esi,ted_opt_ed_change_time
|
mov esi,ted_opt_ed_change_time
|
||||||
not esi
|
not esi
|
||||||
and dword[del_opt],esi ;n_tim=false;
|
and dword[del_opt],esi ;n_tim=false;
|
||||||
@ -1510,35 +1508,35 @@ ted_revers:
|
|||||||
@@:
|
@@:
|
||||||
|
|
||||||
push esi
|
push esi
|
||||||
mov edx,[eax+2] ; *** edx = tex[p0].perv ***
|
mov edx,[eax+symbol.perv] ; *** edx = tex[p0].perv ***
|
||||||
ConvertIndexToPointer edx
|
ConvertIndexToPointer edx
|
||||||
add edx,6
|
add edx,symbol.next
|
||||||
mov ecx,[edx] ;tmp = tex[tex[p0].perv].next;
|
mov ecx,[edx] ;ecx = tex[tex[p0].perv].next
|
||||||
|
|
||||||
mov esi,[ebx+6] ; *** esi = tex[p1].next ***
|
mov esi,[ebx+symbol.next] ; *** esi = tex[p1].next ***
|
||||||
ConvertIndexToPointer esi
|
ConvertIndexToPointer esi
|
||||||
add esi,2
|
add esi,symbol.perv
|
||||||
m2m dword[edx],dword[esi] ;tex[tex[p0].perv].next = tex[tex[p1].next].perv;
|
m2m dword[edx],dword[esi] ;tex[tex[p0].perv].next = tex[tex[p1].next].perv
|
||||||
|
|
||||||
mov [esi],ecx ;tex[tex[p1].next].perv = tmp;
|
mov [esi],ecx ;tex[tex[p1].next].perv = ecx
|
||||||
pop esi
|
pop esi
|
||||||
|
|
||||||
mov ecx,[eax+2] ;tmp = tex[p0].perv;
|
mov ecx,[eax+symbol.perv] ;ecx = tex[p0].perv
|
||||||
m2m dword[eax+2],dword[ebx+6] ;tex[p0].perv = tex[p1].next;
|
m2m dword[eax+symbol.perv],dword[ebx+symbol.next] ;tex[p0].perv = tex[p1].next
|
||||||
mov [ebx+6],ecx ;tex[p1].next = tmp;
|
mov [ebx+symbol.next],ecx ;tex[p1].next = ecx
|
||||||
|
|
||||||
mov edx,eax ;i=p0;
|
mov edx,eax ;i=p0;
|
||||||
@@:
|
@@:
|
||||||
mov ecx,[edx+6] ;tmp = tex[i].next;
|
mov ecx,[edx+symbol.next] ;ecx = tex[i].next
|
||||||
m2m dword[edx+6],dword[edx+2] ;tex[i].next = tex[i].perv;
|
m2m dword[edx+symbol.next],dword[edx+symbol.perv] ;tex[i].next = tex[i].perv
|
||||||
mov [edx+2],ecx ;tex[i].perv = tmp;
|
mov [edx+symbol.perv],ecx ;tex[i].perv = ecx
|
||||||
cmp edx,ebx ;if(i==p1)break;
|
cmp edx,ebx ;if(i==p1)break;
|
||||||
je @f
|
je @f
|
||||||
; ---
|
; ---
|
||||||
;cmp edx,ted_tex
|
;cmp edx,ted_tex
|
||||||
;je @f
|
;je @f
|
||||||
; ---
|
; ---
|
||||||
mov edx,ecx ;i = tmp;
|
mov edx,ecx ;i = ecx
|
||||||
ConvertIndexToPointer edx
|
ConvertIndexToPointer edx
|
||||||
jmp @b
|
jmp @b
|
||||||
@@:
|
@@:
|
||||||
@ -1804,7 +1802,7 @@ ted_get_text_arr_index:
|
|||||||
; edx = pointer to 'perv' struct
|
; edx = pointer to 'perv' struct
|
||||||
align 16
|
align 16
|
||||||
ted_get_text_perv_pos:
|
ted_get_text_perv_pos:
|
||||||
mov edx,[edx+2]
|
mov edx,[edx+symbol.perv]
|
||||||
imul edx,sizeof.symbol
|
imul edx,sizeof.symbol
|
||||||
add edx,ted_tex
|
add edx,ted_tex
|
||||||
ret
|
ret
|
||||||
@ -1815,7 +1813,7 @@ ted_get_text_perv_pos:
|
|||||||
; edx = pointer to 'next' symbol struct
|
; edx = pointer to 'next' symbol struct
|
||||||
align 16
|
align 16
|
||||||
ted_get_text_next_pos:
|
ted_get_text_next_pos:
|
||||||
mov edx,[edx+6]
|
mov edx,[edx+symbol.next]
|
||||||
imul edx,sizeof.symbol
|
imul edx,sizeof.symbol
|
||||||
add edx,ted_tex
|
add edx,ted_tex
|
||||||
ret
|
ret
|
||||||
@ -2005,8 +2003,8 @@ proc ted_set_undo
|
|||||||
;if(tex[i].tc>ted_tim_ch){ // ¥á«¨ ᮧ¤ ¨¥ ᨬ¢®« ¡ë«® ®â¬¥¥®
|
;if(tex[i].tc>ted_tim_ch){ // ¥á«¨ ᮧ¤ ¨¥ ᨬ¢®« ¡ë«® ®â¬¥¥®
|
||||||
cmp [edx+symbol.tc],eax
|
cmp [edx+symbol.tc],eax
|
||||||
jle .no_u1
|
jle .no_u1
|
||||||
mov dword [edx+symbol.tc],0
|
mov dword[edx+symbol.tc],0
|
||||||
mov dword [edx+symbol.td],0
|
mov dword[edx+symbol.td],0
|
||||||
|
|
||||||
mov ebx,[edx+symbol.perv]
|
mov ebx,[edx+symbol.perv]
|
||||||
imul ebx,sizeof.symbol
|
imul ebx,sizeof.symbol
|
||||||
@ -2029,7 +2027,7 @@ proc ted_set_undo
|
|||||||
;else if(tex[i].td>ted_tim_ch) tex[i].td=0; // ¥á«¨ 㤠«¥¨¥ ᨬ¢®« ¡ë«® ®â¬¥¥®
|
;else if(tex[i].td>ted_tim_ch) tex[i].td=0; // ¥á«¨ 㤠«¥¨¥ ᨬ¢®« ¡ë«® ®â¬¥¥®
|
||||||
cmp [edx+symbol.td],eax
|
cmp [edx+symbol.td],eax
|
||||||
jle .no_u2
|
jle .no_u2
|
||||||
mov dword [edx+symbol.td],0
|
mov dword[edx+symbol.td],0
|
||||||
.no_u2:
|
.no_u2:
|
||||||
|
|
||||||
call ted_get_text_next_pos
|
call ted_get_text_next_pos
|
||||||
@ -2869,24 +2867,30 @@ endp
|
|||||||
; f_opt = ¯ à ¬¥âàë ¯®¨áª :
|
; f_opt = ¯ à ¬¥âàë ¯®¨áª :
|
||||||
; (0 - ¨áª âì ¨¦¥ ªãàá®à , 1 - ¨áª âì ¢ëè¥ ªãàá®à , 2 - ¨áª âì ®â ç « ä ©« )
|
; (0 - ¨áª âì ¨¦¥ ªãàá®à , 1 - ¨áª âì ¢ëè¥ ªãàá®à , 2 - ¨áª âì ®â ç « ä ©« )
|
||||||
; ¥á«¨ ãáâ ®¢«¥ 31-© ¡¨â, â® ¥ ®¡®¢«ï¥âáï ®ª®
|
; ¥á«¨ ãáâ ®¢«¥ 31-© ¡¨â, â® ¥ ®¡®¢«ï¥âáï ®ª®
|
||||||
|
; ¥á«¨ ãáâ ®¢«¥ 30-© ¡¨â, â® ¯®¨áª ¨¤¥â ¡¥§ ãç¥â ॣ¨áâà ᨬ¢®«®¢
|
||||||
;output:
|
;output:
|
||||||
; eax = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
; eax = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
||||||
align 16
|
align 16
|
||||||
proc ted_but_find uses ebx ecx edx edi esi, edit:dword, f_opt:dword
|
proc ted_but_find uses ebx ecx edx edi esi, edit:dword, f_opt:dword
|
||||||
|
mov eax,[f_opt]
|
||||||
|
push eax
|
||||||
push [edit]
|
push [edit]
|
||||||
cmp word[f_opt],2
|
cmp al,2
|
||||||
jne @f
|
jne @f
|
||||||
call _but_find_first
|
call _but_find_first
|
||||||
jmp .end0
|
jmp .end0
|
||||||
@@:
|
@@:
|
||||||
cmp word[f_opt],0
|
cmp al,0
|
||||||
jne @f
|
jne @f
|
||||||
call _but_find_next
|
call _but_find_next
|
||||||
jmp .end0
|
jmp .end0
|
||||||
@@:
|
@@:
|
||||||
cmp word[f_opt],1
|
cmp al,1
|
||||||
jne .end0
|
jne @f
|
||||||
call _but_find_perv
|
call _but_find_perv
|
||||||
|
jmp .end0
|
||||||
|
@@:
|
||||||
|
add esp,8
|
||||||
.end0:
|
.end0:
|
||||||
|
|
||||||
bt dword[f_opt],31
|
bt dword[f_opt],31
|
||||||
@ -2907,11 +2911,13 @@ endp
|
|||||||
|
|
||||||
;description:
|
;description:
|
||||||
; äãªæ¨ï 室¨â ⥪áâ ®â ç « ä ©« , ¨«¨ ®â ª®æ ⥪ã饣® ¢ë¤¥«¥¨ï
|
; äãªæ¨ï 室¨â ⥪áâ ®â ç « ä ©« , ¨«¨ ®â ª®æ ⥪ã饣® ¢ë¤¥«¥¨ï
|
||||||
|
;input:
|
||||||
|
; f_opt = ®¯æ¨¨ ¤«ï ¯®¨áª
|
||||||
;output:
|
;output:
|
||||||
; eax = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
; eax = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
||||||
; ebx, ecx, edx, edi, edi - ¯®àâïâáï
|
; ebx, ecx, edx, edi, edi - ¯®àâïâáï
|
||||||
align 16
|
align 16
|
||||||
proc _but_find_first, edit:dword
|
proc _but_find_first, edit:dword, f_opt:dword
|
||||||
mov edi,[edit]
|
mov edi,[edit]
|
||||||
|
|
||||||
call ted_is_select
|
call ted_is_select
|
||||||
@ -2927,11 +2933,11 @@ proc _but_find_first, edit:dword
|
|||||||
mov edx,ted_tex
|
mov edx,ted_tex
|
||||||
call ted_iterat_next
|
call ted_iterat_next
|
||||||
.end0:
|
.end0:
|
||||||
mov eax,ted_buffer_find
|
mov ebx,ted_buffer_find
|
||||||
mov bl,byte[eax]
|
|
||||||
@@:
|
@@:
|
||||||
|
mov eax,[f_opt]
|
||||||
call ted_get_find_rezult
|
call ted_get_find_rezult
|
||||||
cmp bh,1
|
cmp ah,1
|
||||||
je @f ; find
|
je @f ; find
|
||||||
call ted_iterat_next
|
call ted_iterat_next
|
||||||
cmp edx,ted_tex_1
|
cmp edx,ted_tex_1
|
||||||
@ -2944,12 +2950,15 @@ endp
|
|||||||
|
|
||||||
;description:
|
;description:
|
||||||
; äãªæ¨ï 室¨â ⥪áâ ¢ëè¥ ªãàá®à
|
; äãªæ¨ï 室¨â ⥪áâ ¢ëè¥ ªãàá®à
|
||||||
|
;input:
|
||||||
|
; f_opt = ®¯æ¨¨ ¤«ï ¯®¨áª
|
||||||
;output:
|
;output:
|
||||||
; eax = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
; eax = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
||||||
; ebx, ecx, edx, edi, edi - ¯®àâïâáï
|
; ebx, ecx, edx, edi, edi - ¯®àâïâáï
|
||||||
align 16
|
align 16
|
||||||
proc _but_find_perv, edit:dword
|
proc _but_find_perv, edit:dword, f_opt:dword
|
||||||
mov edi,[edit]
|
mov edi,[edit]
|
||||||
|
|
||||||
call ted_is_select
|
call ted_is_select
|
||||||
or al,al
|
or al,al
|
||||||
jz @f
|
jz @f
|
||||||
@ -2963,11 +2972,11 @@ proc _but_find_perv, edit:dword
|
|||||||
@@:
|
@@:
|
||||||
call ted_get_pos_by_cursor
|
call ted_get_pos_by_cursor
|
||||||
.end0:
|
.end0:
|
||||||
mov eax,ted_buffer_find
|
mov ebx,ted_buffer_find
|
||||||
mov bl,byte[eax]
|
|
||||||
@@:
|
@@:
|
||||||
|
mov eax,[f_opt]
|
||||||
call ted_get_find_rezult
|
call ted_get_find_rezult
|
||||||
cmp bh,1
|
cmp ah,1
|
||||||
je @f ; find
|
je @f ; find
|
||||||
call ted_iterat_perv
|
call ted_iterat_perv
|
||||||
cmp edx,ted_tex_1
|
cmp edx,ted_tex_1
|
||||||
@ -2980,19 +2989,21 @@ endp
|
|||||||
|
|
||||||
;description:
|
;description:
|
||||||
; äãªæ¨ï 室¨â ⥪áâ ¨¦¥ ªãàá®à
|
; äãªæ¨ï 室¨â ⥪áâ ¨¦¥ ªãàá®à
|
||||||
|
;input:
|
||||||
|
; f_opt = ®¯æ¨¨ ¤«ï ¯®¨áª
|
||||||
;output:
|
;output:
|
||||||
; eax = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
; eax = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
||||||
; ebx, edx, edi, esi - ¯®àâïâáï
|
; ebx, ecx, edx, edi, esi - ¯®àâïâáï
|
||||||
align 16
|
align 16
|
||||||
proc _but_find_next, edit:dword
|
proc _but_find_next, edit:dword, f_opt:dword
|
||||||
mov edi,[edit]
|
mov edi,[edit]
|
||||||
|
|
||||||
call ted_get_pos_by_cursor
|
call ted_get_pos_by_cursor
|
||||||
mov eax,ted_buffer_find
|
mov ebx,ted_buffer_find
|
||||||
mov bl,byte[eax]
|
|
||||||
@@:
|
@@:
|
||||||
|
mov eax,[f_opt]
|
||||||
call ted_get_find_rezult
|
call ted_get_find_rezult
|
||||||
cmp bh,1
|
cmp ah,1
|
||||||
je @f ; find
|
je @f ; find
|
||||||
call ted_iterat_next
|
call ted_iterat_next
|
||||||
cmp edx,ted_tex_1
|
cmp edx,ted_tex_1
|
||||||
@ -3006,11 +3017,11 @@ endp
|
|||||||
;description:
|
;description:
|
||||||
; ¢á¯®¬®£ ⥫ì ï äãªæ¨ï, ¢ë¤¥«ï¥â ©¤¥ë© ⥪áâ
|
; ¢á¯®¬®£ ⥫ì ï äãªæ¨ï, ¢ë¤¥«ï¥â ©¤¥ë© ⥪áâ
|
||||||
;input:
|
;input:
|
||||||
; bh = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
; ah = ¡ë« «¨ ©¤¥ ¨áª®¬ë© ⥪áâ (0 - ¥â, 1 - ¤ )
|
||||||
; esi = first symbol pointer
|
; esi = first symbol pointer
|
||||||
align 16
|
align 16
|
||||||
_but_find_select:
|
_but_find_select:
|
||||||
or bh,bh
|
or ah,ah
|
||||||
jz @f
|
jz @f
|
||||||
call ted_get_text_coords
|
call ted_get_text_coords
|
||||||
inc ebx ;move cursor right
|
inc ebx ;move cursor right
|
||||||
@ -3067,45 +3078,58 @@ proc ted_but_replace uses edx edi esi, edit:dword, rpl_text:dword, r_opt:dword,
|
|||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
;input:
|
|
||||||
; eax - text need find
|
|
||||||
; bl - first symbol to find
|
|
||||||
; edx - first symbol pointer
|
|
||||||
; edi - pointer to tedit struct
|
|
||||||
;output:
|
|
||||||
; bh - rezult
|
|
||||||
; edx - last text position (if find sucess)
|
|
||||||
; esi - first symbol pointer
|
|
||||||
;description:
|
;description:
|
||||||
; ”ãªæ¨ï ¯à®¢¥àï¥â ᮢ¯ ¤ ¥â «¨ ⥪áâ ¢ ¡ãä¥à¥ eax
|
; ”ãªæ¨ï ¯à®¢¥àï¥â ᮢ¯ ¤ ¥â «¨ ⥪áâ ¢ ¡ãä¥à¥ ebx
|
||||||
; á ⥪á⮬ । ªâ®à ¯® 㪠§ ⥫î edx.
|
; á ⥪á⮬ । ªâ®à ¯® 㪠§ ⥫î edx.
|
||||||
; ‘â ¤ àâë¥ äãªæ¨¨ ( ¯à. strcmp) âãâ ¥ ¯®¤®©¤ãâ, ¯®â®¬ã çâ®
|
; ‘â ¤ àâë¥ äãªæ¨¨ ( ¯à. strcmp) âãâ ¥ ¯®¤®©¤ãâ, ¯®â®¬ã çâ®
|
||||||
; ¢ ¯ ¬ï⨠। ªâ®à ⥪áâ ᮤ¥à¦¨âáï ¥ ¢ ¢¨¤¥ ascii áâப.
|
; ¢ ¯ ¬ï⨠। ªâ®à ⥪áâ ᮤ¥à¦¨âáï ¥ ¢ ¢¨¤¥ ascii áâப.
|
||||||
|
;input:
|
||||||
|
; eax - options to find
|
||||||
|
; ebx - text need find
|
||||||
|
; edx - first symbol pointer
|
||||||
|
; edi - pointer to tedit struct
|
||||||
|
;output:
|
||||||
|
; ah - rezult
|
||||||
|
; edx - last text position (if find sucess)
|
||||||
|
; esi - first symbol pointer
|
||||||
align 16
|
align 16
|
||||||
ted_get_find_rezult:
|
proc ted_get_find_rezult uses ebx
|
||||||
push eax
|
mov al,byte[ebx]
|
||||||
mov bh,1
|
bt eax,30
|
||||||
mov esi,edx ;copy edx
|
jnc @f
|
||||||
|
call fb_char_toupper
|
||||||
@@:
|
@@:
|
||||||
cmp byte[edx],bl
|
mov ah,1
|
||||||
|
mov esi,edx ;copy edx
|
||||||
|
.cycle0:
|
||||||
|
mov cl,al
|
||||||
|
mov al,byte[edx]
|
||||||
|
bt eax,30
|
||||||
|
jnc @f
|
||||||
|
call fb_char_toupper
|
||||||
|
@@:
|
||||||
|
cmp al,cl
|
||||||
jne .no_text
|
jne .no_text
|
||||||
|
|
||||||
inc eax ;*** get next symbol (in find text) ***
|
inc ebx ;*** get next symbol (in find text) ***
|
||||||
mov bl,byte[eax]
|
mov al,byte[ebx]
|
||||||
or bl,bl
|
or al,al
|
||||||
jz @f ;end of find text
|
jz .end_f ;end of find text
|
||||||
|
bt eax,30
|
||||||
|
jnc @f
|
||||||
|
call fb_char_toupper
|
||||||
|
@@:
|
||||||
|
|
||||||
call ted_iterat_next ;*** get next symbol (in editor text) ***
|
call ted_iterat_next ;*** get next symbol (in editor text) ***
|
||||||
cmp edx,ted_tex_1
|
cmp edx,ted_tex_1
|
||||||
jg @b
|
jg .cycle0
|
||||||
align 4
|
align 4
|
||||||
.no_text:
|
.no_text:
|
||||||
xor bh,bh
|
xor ah,ah
|
||||||
mov edx,esi ;restore edx
|
mov edx,esi ;restore edx
|
||||||
@@:
|
.end_f:
|
||||||
pop eax
|
|
||||||
mov bl,byte[eax] ;restore bl
|
|
||||||
ret
|
ret
|
||||||
|
endp
|
||||||
|
|
||||||
;input:
|
;input:
|
||||||
; edi = pointer to tedit struct
|
; edi = pointer to tedit struct
|
||||||
@ -4134,8 +4158,7 @@ endp
|
|||||||
;description:
|
;description:
|
||||||
; äãªæ¨ï 㦠¤«ï ®¯â¨¬¨§ 樨 ¢ë¢®¤ ⥪áâ
|
; äãªæ¨ï 㦠¤«ï ®¯â¨¬¨§ 樨 ¢ë¢®¤ ⥪áâ
|
||||||
align 16
|
align 16
|
||||||
proc ted_opt_draw_line_right
|
proc ted_opt_draw_line_right uses eax
|
||||||
push eax
|
|
||||||
mov eax,edx
|
mov eax,edx
|
||||||
@@:
|
@@:
|
||||||
cmp edx,ted_tex_1
|
cmp edx,ted_tex_1
|
||||||
@ -4148,8 +4171,6 @@ proc ted_opt_draw_line_right
|
|||||||
@@:
|
@@:
|
||||||
mov edx,eax ;perv sumbol
|
mov edx,eax ;perv sumbol
|
||||||
call ted_get_symb_color
|
call ted_get_symb_color
|
||||||
|
|
||||||
pop eax
|
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
|
|
||||||
@ -4375,8 +4396,6 @@ align 4
|
|||||||
|
|
||||||
or eax,eax
|
or eax,eax
|
||||||
jz .no_msg
|
jz .no_msg
|
||||||
;cmp eax,6
|
|
||||||
;je @f
|
|
||||||
cmp ax,10
|
cmp ax,10
|
||||||
jl .zifra_0_9
|
jl .zifra_0_9
|
||||||
mov al,'?'
|
mov al,'?'
|
||||||
|
@ -232,6 +232,10 @@ get_find_options:
|
|||||||
je @f
|
je @f
|
||||||
inc eax
|
inc eax
|
||||||
@@:
|
@@:
|
||||||
|
bt dword[ch1.flags],1
|
||||||
|
jc @f
|
||||||
|
bts eax,30
|
||||||
|
@@:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
|
File diff suppressed because one or more lines are too long
@ -217,35 +217,43 @@ draw_but_toolbar: ;
|
|||||||
;txtBLe db 27
|
;txtBLe db 27
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
proc draw_panels uses edi, edit:dword
|
proc draw_panels uses eax edx edi, edit:dword
|
||||||
mov edi,[edit]
|
mov edi,[edit]
|
||||||
cmp ted_panel_id,TED_PANEL_FIND
|
cmp ted_panel_id,TED_PANEL_FIND
|
||||||
jne @f
|
jne @f
|
||||||
|
mcall SF_DEFINE_BUTTON,,,0x80000000+200
|
||||||
|
mcall ,,,0x80000000+202
|
||||||
|
mcall ,,,0x80000000+203
|
||||||
|
mcall ,,,0x80000000+204
|
||||||
call p_find
|
call p_find
|
||||||
jmp .end_f
|
jmp .end_f
|
||||||
@@:
|
@@:
|
||||||
cmp ted_panel_id,TED_PANEL_REPLACE
|
cmp ted_panel_id,TED_PANEL_REPLACE
|
||||||
jne @f
|
jne @f
|
||||||
|
mcall SF_DEFINE_BUTTON,,,0x80000000+200
|
||||||
|
mcall ,,,0x80000000+201
|
||||||
|
mcall ,,,0x80000000+204
|
||||||
call p_replace
|
call p_replace
|
||||||
jmp .end_f
|
jmp .end_f
|
||||||
@@:
|
@@:
|
||||||
cmp ted_panel_id,TED_PANEL_GOTO
|
cmp ted_panel_id,TED_PANEL_GOTO
|
||||||
jne @f
|
jne @f
|
||||||
|
mcall SF_DEFINE_BUTTON,,,0x80000000+200
|
||||||
|
mcall ,,,0x80000000+201
|
||||||
|
mcall ,,,0x80000000+202
|
||||||
|
mcall ,,,0x80000000+203
|
||||||
call p_goto
|
call p_goto
|
||||||
jmp .end_f
|
jmp .end_f
|
||||||
@@:
|
@@:
|
||||||
cmp ted_panel_id,TED_PANEL_SYNTAX
|
cmp ted_panel_id,TED_PANEL_SYNTAX
|
||||||
jne @f
|
jne @f
|
||||||
call p_syntax
|
mcall SF_DEFINE_BUTTON,,,0x80000000+201
|
||||||
jmp .end_f
|
|
||||||
@@:
|
|
||||||
push eax edx
|
|
||||||
mcall SF_DEFINE_BUTTON,,,0x80000000+200
|
|
||||||
mcall ,,,0x80000000+201
|
|
||||||
mcall ,,,0x80000000+202
|
mcall ,,,0x80000000+202
|
||||||
mcall ,,,0x80000000+203
|
mcall ,,,0x80000000+203
|
||||||
mcall ,,,0x80000000+204
|
mcall ,,,0x80000000+204
|
||||||
pop edx eax
|
call p_syntax
|
||||||
|
;jmp .end_f
|
||||||
|
@@:
|
||||||
.end_f:
|
.end_f:
|
||||||
ret
|
ret
|
||||||
endp
|
endp
|
||||||
@ -271,7 +279,7 @@ p_find:
|
|||||||
|
|
||||||
mov ecx,ted_wnd_t
|
mov ecx,ted_wnd_t
|
||||||
shl ecx,16
|
shl ecx,16
|
||||||
add ecx,(93 shl 16)+20
|
add ecx,(111 shl 16)+20
|
||||||
mcall SF_DEFINE_BUTTON,(5 shl 16)+85,,201,[sc.work_button] ;201 - button id
|
mcall SF_DEFINE_BUTTON,(5 shl 16)+85,,201,[sc.work_button] ;201 - button id
|
||||||
|
|
||||||
mov ebx,(23 shl 16)+7
|
mov ebx,(23 shl 16)+7
|
||||||
@ -282,11 +290,12 @@ p_find:
|
|||||||
|
|
||||||
mov ecx,[sc.work_button_text]
|
mov ecx,[sc.work_button_text]
|
||||||
or ecx,0x80000000
|
or ecx,0x80000000
|
||||||
mov ebx,(15 shl 16)+100
|
mov ebx,(15 shl 16)+118
|
||||||
add ebx,ted_wnd_t
|
add ebx,ted_wnd_t
|
||||||
mcall ,,,txtFindNext
|
mcall ,,,txtFindNext
|
||||||
|
|
||||||
stdcall [option_box_draw], opt_grlist1
|
stdcall [option_box_draw], opt_grlist1
|
||||||
|
stdcall [check_box_draw], ch1
|
||||||
pop edx ecx ebx eax
|
pop edx ecx ebx eax
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -70,6 +70,8 @@ mov ebp,lib0
|
|||||||
stdcall [ted_init], tedit0
|
stdcall [ted_init], tedit0
|
||||||
stdcall [tl_data_init], tree1
|
stdcall [tl_data_init], tree1
|
||||||
option_boxes_set_sys_color sc,opt_grlist1
|
option_boxes_set_sys_color sc,opt_grlist1
|
||||||
|
init_checkboxes2 check_boxes,check_boxes_end
|
||||||
|
check_boxes_set_sys_color2 check_boxes,check_boxes_end,sc
|
||||||
|
|
||||||
; OpenDialog initialisation
|
; OpenDialog initialisation
|
||||||
stdcall [OpenDialog_Init],OpenDialog_data
|
stdcall [OpenDialog_Init],OpenDialog_data
|
||||||
@ -243,6 +245,7 @@ mouse:
|
|||||||
jne @f
|
jne @f
|
||||||
stdcall [edit_box_mouse], edit_find
|
stdcall [edit_box_mouse], edit_find
|
||||||
stdcall [option_box_mouse], opt_grlist1
|
stdcall [option_box_mouse], opt_grlist1
|
||||||
|
stdcall [check_box_mouse], ch1
|
||||||
@@:
|
@@:
|
||||||
cmp byte[tedit0.panel_id],TED_PANEL_REPLACE
|
cmp byte[tedit0.panel_id],TED_PANEL_REPLACE
|
||||||
jne @f
|
jne @f
|
||||||
|
Loading…
Reference in New Issue
Block a user