Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 8532 → Rev 8533

/programs/develop/libraries/box_lib/trunk/t_edit.asm
1,6 → 1,6
; ¬ ªà®á ¤«ï á¨á⥬­®© ¡¨¡«¨®â¥ª¨ box_lib.obj
; í«¥¬¥­â TextEditor ¤«ï Kolibri OS
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 10.06.2020 IgorA
; ä ©« ¯®á«¥¤­¨© à § ¨§¬¥­ï«áï 12.01.2021 IgorA
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
 
;input:
2201,7 → 2201,7
locals
begPos dd ? ;­ ç «ì­ ï ¯®§¨æ¨ï
endPos dd ? ;ª®­¥ç­ ï ¯®§¨æ¨ï
find db ? ;­ ©¤¥­® / ­¥ ­ ©¤¥­®
find db ? ;0 - ­¥ ­ ©¤¥­®, 1 - ­ ©¤¥­®, 2 - ­ ©¤¥­® ¢ ª®­æ¥ ä ©« 
f_color db ? ;¨­¤¥ªá æ¢¥â  ­ ©¤¥­®£® á«®¢ 
endl
;eax = word_n ⥪ã騩 ­®¬¥à (¯®§¨æ¨ï) ¯à®¢¥à塞®£® á«®¢  ¢ ᯨ᪥
2217,9 → 2217,8
cmp edx,ted_tex_1
jle .cycle0end
 
xor eax,eax
mov al,byte[edx]
shl ax,2 ;eax*=4
movzx eax,byte[edx]
shl eax,2 ;eax*=4
add eax,ted_arr_key_pos
mov eax,[eax]
cmp eax,0
2323,6 → 2322,7
jg @f
;¥á«¨ ¤®è«¨ ¤® ª®­æ  ä ©«  ¨ ­¥ ­ è«¨ ᨬ¢®« ª®­æ  à §¬¥âª¨
call ted_iterat_perv
mov byte[find],2
@@:
mov dword[endPos],edx
.if_7e:
2361,14 → 2361,14
jmp .wh_2b
.wh_2e:
 
cmp byte[find],1 ;if(fnd)break;
je .cycle0end
cmp byte[find],0 ;if(fnd)break;
jne .cycle0end
mov edx,[begPos];i=bP;
jmp .cycle0
.cycle0end:
 
cmp byte[find],1
jne .if_1e ;if(fnd){ // ¢ë¤¥«¥­¨¥ ­ ©¤¥­®£® ⥪áâ 
cmp byte[find],0
je .if_1e ;if(fnd){ // ¢ë¤¥«¥­¨¥ ­ ©¤¥­®£® ⥪áâ 
;if(!mode_sf1 || (mode_sf1 && strlen(Col[word_n].f1->c_str())>0)){
mov eax,[begPos]
mov bl,[f_color]
2375,6 → 2375,8
mov [eax+1],bl ;tex[bP].col=f_color;
mov eax,[endPos]
mov byte[eax+1],0xff ;tex[eP].col=255;
cmp byte[find],2
je .if_1e
;return ItPoPerv(eP); // ¢®§¢à é ¥¬ ¯®§¨æ¨î ª®­æ  ¢å®¦¤¥­¨ï
mov edx,[endPos]
call ted_get_text_perv_pos
2456,9 → 2458,8
; ebx = l_pos
mov ted_help_id,-1
 
xor ebx,ebx
mov bl,[edx]
shl bx,2 ;ebx*=4
movzx ebx,byte[edx]
shl ebx,2 ;ebx*=4
add ebx,ted_arr_key_pos
mov ecx,[ebx]
cmp ecx,0
3386,17 → 3387,15
cmp edx,ted_tex_1
jle .exit
.on_first:
xor eax,eax
mov al,byte[edx+1]
or al,al ;¥á«¨ al=0 ⮠梥⠭¥ ¬¥­ï¥âáï
movzx eax,byte[edx+1]
or eax,eax ;¥á«¨ al=0 ⮠梥⠭¥ ¬¥­ï¥âáï
jz @b
 
cmp eax,ted_colors_text_count
jge .exit
 
shl ax,2 ;㬭®¦ ¥¬ ¨­¤¥ªá æ¢¥â  ­  4 ¡ ©â 
mov ecx,ted_text_colors ;¯à¨¡ ¢«ï¥¬ ᬥ饭¨¥ 1-£® 梥â 
add ecx,eax
lea ecx,[ecx+4*eax]
mov ecx,[ecx] ;ãáâ ­ ¢«¨¢ ¥¬ ⥪ã騩 梥â ⥪áâ  ¯® ᬥ饭¨î
.exit:
or ecx,ted_font_size
3774,9 → 3773,8
add ebx,13 ;=3+10
 
;SetTextColor
xor eax,eax
mov al,byte[edx+MAX_COLOR_WORD_LEN+7]
shl ax,2
movzx eax,byte[edx+MAX_COLOR_WORD_LEN+7]
shl eax,2
mov ecx,ted_text_colors
add ecx,eax
mov ecx,[ecx]
4131,15 → 4129,14
or ebx,ebx
jz @f
;--------------------------------------
xor eax,eax ;eax ¡ã¤¥â ¬¥­ïâìáï
mov al,byte[edx+1]
or al,al
;eax ¡ã¤¥â ¬¥­ïâìáï
movzx eax,byte[edx+1]
or eax,eax
jz .no_color
cmp eax,ted_colors_text_count
jge .no_color
xor ecx,ecx
mov cl,byte[edx+1]
shl cx,2
movzx ecx,byte[edx+1]
shl ecx,2
add ecx,ted_text_colors
mov ecx,[ecx]
.no_color:
/programs/develop/libraries/box_lib/trunk/tree_list.asm
1,6 → 1,6
; í«¥¬¥­â TreeList ¤«ï ¡¨¡«¨®â¥ª¨ box_lib.obj
; ­  ª®¤ ¯à¨¬¥­¥­  GPL2 «¨æ¥­§¨ï
; ¯®á«¥¤­ïï ¬®¤¨ä¨ª æ¨ï 12.09.2017 IgorA
; ¯®á«¥¤­ïï ¬®¤¨ä¨ª æ¨ï 12.01.2021 IgorA
 
 
struct TreeNode
243,7 → 243,11
mcall SF_MOUSE_GET,SSF_BUTTON_EXT
test eax,$01000000
jz @f
cmp tl_on_press,0
je @f
call tl_on_press
add esp,8
popad
ret
@@:
bt eax,0 ;left mouse button press
299,8 → 303,7
jl .no_open_close ;ªãàá®à á⮨⠭  ¯ãá⮬ ¬¥áâ¥, ¡¥§ 㧫®¢
imul eax,sizeof.TreeNode
add eax,tl_data_nodes
xor bx,bx
mov bl,byte[eax+TreeNode.level] ;á®å࠭塞 ã஢¥­ì ⥪ã饣® 㧫 
movzx bx,byte[eax+TreeNode.level] ;á®å࠭塞 ã஢¥­ì ⥪ã饣® 㧫 
inc bx ;+ ¯®«¥ ¤«ï ªãàá®à 
 
cmp si,tl_img_cx
307,8 → 310,7
jl .no_open_close ;¬ë襩 ¯®¯ «¨ ­  «¥¢®¥ ¯®«¥ ¤«ï ªãàá®à , £¤¥ â®ç­® ­¥â '+' ¨ '-'
mov eax,esi
xor edx,edx
xor ecx,ecx
mov cx,tl_img_cx
movzx ecx,tl_img_cx
div ecx
 
cmp ax,bx