Subversion Repositories Kolibri OS

Rev

Rev 7583 | Rev 8036 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7583 Rev 7877
Line 2187... Line 2187...
2187
;esi = ¤«ï à §­ëå 楫¥©, ­®¬¥à ¯à®¢¥à塞®£® ᨬ¢®«  ¢ á«®¢¥
2187
;esi = ¤«ï à §­ëå 楫¥©, ­®¬¥à ¯à®¢¥à塞®£® ᨬ¢®«  ¢ á«®¢¥
2188
	mov dword[begPos],1
2188
	mov dword[begPos],1
2189
	mov dword[endPos],1
2189
	mov dword[endPos],1
2190
	mov byte[find],0
2190
	mov byte[find],0
2191
	mov byte[f_color],1
2191
	mov byte[f_color],1
2192
	@@:
2192
	.cycle0:
2193
		call ted_iterat_next
2193
		call ted_iterat_next
2194
		cmp edx,ted_tex_1
2194
		cmp edx,ted_tex_1
2195
		jle @f
2195
		jle .cycle0end
Line 2196... Line 2196...
2196
 
2196
 
2197
		xor eax,eax
2197
		xor eax,eax
2198
		mov al,byte[edx]
2198
		mov al,byte[edx]
2199
		shl ax,2 ;eax*=4
2199
		shl ax,2 ;eax*=4
2200
		add eax,ted_arr_key_pos
2200
		add eax,ted_arr_key_pos
2201
		mov eax,[eax]
2201
		mov eax,[eax]
2202
		cmp eax,0
2202
		cmp eax,0
Line 2203... Line 2203...
2203
		jl @b ;if( (word_n=ted_arr_key_pos[(unsigned char)tex[i].c])>-1 ){
2203
		jl .cycle0 ;if( (word_n=ted_arr_key_pos[(unsigned char)tex[i].c])>-1 ){
2204
 
2204
 
2205
		mov ecx,eax
2205
		mov ecx,eax
2206
		;while(l_pos
2206
		;while(l_pos
Line 2221... Line 2221...
2221
align 4
2221
align 4
2222
		.wh_2b: ;while(1){
2222
		.wh_2b: ;while(1){
2223
		call ted_iterat_next
2223
		call ted_iterat_next
Line 2224... Line 2224...
2224
 
2224
 
2225
		;while(l_pos>word_n && Col[l_pos-1].Text[pos]!=tex[i].c)
2225
		;while(l_pos>word_n && Col[l_pos-1].Text[pos]!=tex[i].c)
2226
		.wh_3b:
2226
		@@:
2227
			cmp ecx,eax
2227
			cmp ecx,eax
2228
			jle .wh_3e
2228
			jle @f
2229
			dec ecx
2229
			dec ecx
2230
			ColToIndexOffset ecx,ebx
2230
			ColToIndexOffset ecx,ebx
2231
			inc ecx
2231
			inc ecx
2232
			;cmp byte[ebx+esi],byte[edx]
2232
			;cmp byte[ebx+esi],byte[edx]
2233
			mov bl,byte[ebx+esi]
2233
			mov bl,byte[ebx+esi]
2234
			cmp bl,byte[edx]
2234
			cmp bl,byte[edx]
2235
			je .wh_3e
2235
			je @f
2236
				dec ecx
2236
				dec ecx
2237
			jmp .wh_3b
2237
			jmp @b
Line 2238... Line 2238...
2238
		.wh_3e:
2238
		@@:
2239
 
2239
 
2240
		ColToIndexOffset eax,ebx
2240
		ColToIndexOffset eax,ebx
2241
		cmp byte[ebx+esi],0
2241
		cmp byte[ebx+esi],0
Line 2253... Line 2253...
2253
			push edx
2253
			push edx
2254
			mov edx,[begPos]
2254
			mov edx,[begPos]
2255
			call ted_iterat_perv
2255
			call ted_iterat_perv
Line 2256... Line 2256...
2256
 
2256
 
2257
			btr bx,0 ;1-1
2257
			btr bx,0 ;1-1
2258
			jae .if_3e ;if(Col[word_n].wwo&1)
2258
			jae @f ;if(Col[word_n].wwo&1)
2259
				;u1= !(isalnum(cont_s)||cont_s=='_')
2259
				;u1= !(isalnum(cont_s)||cont_s=='_')
2260
				call isalnum
2260
				call isalnum
2261
				jae .if_3e
2261
				jae @f
2262
					mov byte[find],0
2262
					mov byte[find],0
2263
					jmp .if_4e
2263
					jmp .if_4e
Line 2264... Line 2264...
2264
			.if_3e:
2264
			@@:
2265
 
2265
 
2266
			btr bx,3 ;4-1
2266
			btr bx,3 ;4-1
2267
			jae .if_4e ;if(Col[word_n].wwo&8)
2267
			jae .if_4e ;if(Col[word_n].wwo&8)
Line 2273... Line 2273...
2273
 
2273
 
2274
			mov edx,[endPos]
2274
			mov edx,[endPos]
Line 2275... Line 2275...
2275
			;call ted_iterat_next
2275
			;call ted_iterat_next
2276
 
2276
 
2277
			btr bx,1 ;2-1
2277
			btr bx,1 ;2-1
2278
			jae .if_5e ;if(Col[word_n].wwo&2)
2278
			jae @f ;if(Col[word_n].wwo&2)
2279
				;u1= !(isalnum(cont_s)||cont_s=='_')
2279
				;u1= !(isalnum(cont_s)||cont_s=='_')
2280
				call isalnum
2280
				call isalnum
2281
				jae .if_5e
2281
				jae @f
2282
					mov byte[find],0
2282
					mov byte[find],0
Line 2283... Line 2283...
2283
					jmp .if_6e
2283
					jmp .if_6e
2284
			.if_5e:
2284
			@@:
2285
 
2285
 
2286
			btr bx,4 ;5-1
2286
			btr bx,4 ;5-1
Line 2295... Line 2295...
2295
			jae .if_7e ;if(Col[word_n].wwo&4)
2295
			jae .if_7e ;if(Col[word_n].wwo&4)
2296
				ColToIndexOffset eax,ebx
2296
				ColToIndexOffset eax,ebx
2297
				mov bx,word[ebx+MAX_COLOR_WORD_LEN+5]
2297
				mov bx,word[ebx+MAX_COLOR_WORD_LEN+5]
2298
				call ted_iterat_next_pos_char
2298
				call ted_iterat_next_pos_char
2299
				cmp edx,ted_tex_1
2299
				cmp edx,ted_tex_1
2300
				jle .if_7e
2300
				jg @f
-
 
2301
					;¥á«¨ ¤®è«¨ ¤® ª®­æ  ä ©«  ¨ ­¥ ­ è«¨ ᨬ¢®« ª®­æ  à §¬¥âª¨
-
 
2302
					call ted_iterat_perv
-
 
2303
				@@:
2301
					mov dword[endPos],edx
2304
					mov dword[endPos],edx
2302
			.if_7e:
2305
			.if_7e:
Line 2303... Line 2306...
2303
 
2306
 
2304
			pop edx
2307
			pop edx
Line 2334... Line 2337...
2334
			inc esi ;pos++;
2337
			inc esi ;pos++;
2335
			jmp .wh_2b
2338
			jmp .wh_2b
2336
		.wh_2e:
2339
		.wh_2e:
Line 2337... Line 2340...
2337
 
2340
 
2338
		cmp byte[find],1 ;if(fnd)break;
2341
		cmp byte[find],1 ;if(fnd)break;
2339
		je @f
2342
		je .cycle0end
2340
			mov edx,[begPos];i=bP;
2343
			mov edx,[begPos];i=bP;
2341
		jmp @b
2344
		jmp .cycle0
Line 2342... Line 2345...
2342
	@@:
2345
	.cycle0end:
2343
 
2346
 
2344
	cmp byte[find],1
2347
	cmp byte[find],1
2345
	jne .if_1e ;if(fnd){ // ¢ë¤¥«¥­¨¥ ­ ©¤¥­®£® ⥪áâ 
2348
	jne .if_1e ;if(fnd){ // ¢ë¤¥«¥­¨¥ ­ ©¤¥­®£® ⥪áâ 
Line 4329... Line 4332...
4329
	push eax ebx ecx
4332
	push eax ebx ecx
4330
	mcall SF_MOUSE_GET,SSF_SCROLL_DATA
4333
	mcall SF_MOUSE_GET,SSF_SCROLL_DATA
4331
	or ax,ax
4334
	or ax,ax
4332
	jz .no_scroll
4335
	jz .no_scroll
4333
		mov ecx,ted_scr_w
4336
		mov ecx,ted_scr_w
4334
		mov ebx,[ecx+sb_offs_position] ;copy old scroll position
-
 
4335
		and eax,0xffff
-
 
4336
		btr ax,15
4337
		movsx eax,ax
4337
		jae @f
-
 
4338
			or eax,0xffff8000
-
 
4339
		@@:
-
 
4340
		add [ecx+sb_offs_position],eax
4338
		lea eax,[eax+eax*2] ;㬭®¦ ¥¬ ­  3 (ç¨á«® áâப ¯à®ªàã⪨ §  ®¤­® ¤¢¨¦¥­¨¥ ª®«¥á  ¬ëè¨)
4341
 
-
 
4342
		mov eax,[ecx+sb_offs_position]
4339
		add eax,[ecx+sb_offs_position]
4343
		cmp eax,[ecx+sb_offs_max_area]
4340
		mov ebx,[ecx+sb_offs_max_area]
4344
		jb @f
4341
		shl ebx,1
4345
			mov [ecx+sb_offs_position],ebx ;if scroll position out of range
4342
		sub ebx,[ecx+sb_offs_cur_area] ;®â­¨¬ ¥¬ ¯®«®¢¨­ã ¢ëá®âë ®ª­ 
-
 
4343
		shr ebx,1
-
 
4344
		cmp eax,ebx
4346
			jmp .no_scroll
4345
		jae .no_scroll
4347
		@@:
4346
		mov [ecx+sb_offs_position],eax
4348
		stdcall ted_draw,edi
4347
		stdcall ted_draw,edi
4349
	.no_scroll:
4348
	.no_scroll:
4350
	pop ecx ebx eax
4349
	pop ecx ebx eax
4351
	ret
4350
	ret