Subversion Repositories Kolibri OS

Rev

Rev 8960 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8960 Rev 9014
Line 2218... Line 2218...
2218
	mov	ebx, SearchString
2218
	mov	ebx, SearchString
2219
	xor	eax, eax
2219
	xor	eax, eax
2220
	cmp	byte [ebx], al
2220
	cmp	byte [ebx], al
2221
	jz	.f7.ret
2221
	jz	.f7.ret
2222
	mov	esi, tolower_table
2222
	mov	esi, tolower_table
2223
	test	[find_in_file_dlgdata.flags_case], 10h
2223
	test	[find_in_file_dlgdata.case.flags], 10h
2224
	jz	@f
2224
	jz	@f
2225
	mov	esi, identical_table
2225
	mov	esi, identical_table
2226
@@:
2226
@@:
2227
	test	[find_in_file_dlgdata.flags_whole], 10h
2227
	test	[find_in_file_dlgdata.whole.flags], 10h
2228
	setnz	al
2228
	setnz	al
2229
	push	eax
2229
	push	eax
2230
	push	dword [ebp+editor_data.encoding]; always cp866 for now
2230
	push	dword [ebp+editor_data.encoding]; always cp866 for now
2231
				; needs to be revisited after Unicode support in editor
2231
				; needs to be revisited after Unicode support in editor
2232
	call	search_string_pre
2232
	call	search_string_pre
Line 2237... Line 2237...
2237
	jnc	.f7.notfound
2237
	jnc	.f7.notfound
2238
	xor	edi, edi
2238
	xor	edi, edi
2239
	push	ebx esi
2239
	push	ebx esi
2240
	push	edi
2240
	push	edi
2241
	push	edi
2241
	push	edi
2242
	test	[find_in_file_dlgdata.flags_whole], 10h
2242
	test	[find_in_file_dlgdata.whole.flags], 10h
2243
	jnz	@f
2243
	jnz	@f
2244
	movzx	eax, byte [esi+ebx]
2244
	movzx	eax, byte [esi+ebx]
2245
	jmp	.search_loop_next
2245
	jmp	.search_loop_next
2246
@@:
2246
@@:
2247
	mov	edi, edx
2247
	mov	edi, edx
Line 2282... Line 2282...
2282
.f7.nextblock:
2282
.f7.nextblock:
2283
	call	editor_normalize_offs
2283
	call	editor_normalize_offs
2284
	jc	.f7.nonextblock
2284
	jc	.f7.nonextblock
2285
.f7.notfound_pop:
2285
.f7.notfound_pop:
2286
; last chance - if we are looking for a whole word, EOF is ok for last symbol
2286
; last chance - if we are looking for a whole word, EOF is ok for last symbol
2287
	test	[find_in_file_dlgdata.flags_whole], 10h
2287
	test	[find_in_file_dlgdata.whole.flags], 10h
2288
	jz	@f
2288
	jz	@f
2289
	mov	esi, [ebp + editor_data.last_block]
2289
	mov	esi, [ebp + editor_data.last_block]
2290
	add	esi, ebp
2290
	add	esi, ebp
2291
	mov	ebx, [esi + edit_block_header.limit]
2291
	mov	ebx, [esi + edit_block_header.limit]
2292
	movzx	edi, byte [edi+' ']
2292
	movzx	edi, byte [edi+' ']
Line 2298... Line 2298...
2298
	jmp	search_failed
2298
	jmp	search_failed
2299
.f7.found:
2299
.f7.found:
2300
	or	[ebp + editor_data.cur_delta], -1
2300
	or	[ebp + editor_data.cur_delta], -1
2301
	sub	ebx, ecx
2301
	sub	ebx, ecx
2302
	inc	ebx
2302
	inc	ebx
2303
	test	[find_in_file_dlgdata.flags_whole], 10h
2303
	test	[find_in_file_dlgdata.whole.flags], 10h
2304
	jz	@f
2304
	jz	@f
2305
	inc	ebx
2305
	inc	ebx
2306
@@:
2306
@@:
2307
	cmp	ebx, [EditBlockStart]
2307
	cmp	ebx, [EditBlockStart]
2308
	jge	@f
2308
	jge	@f
Line 2322... Line 2322...
2322
	pop	ecx
2322
	pop	ecx
2323
	pop	eax
2323
	pop	eax
2324
	pop	edi
2324
	pop	edi
2325
; esi:ebx -> last symbol of match, eax = row, edi = delta in lines
2325
; esi:ebx -> last symbol of match, eax = row, edi = delta in lines
2326
	pop	esi ebx
2326
	pop	esi ebx
2327
	test	[find_in_file_dlgdata.flags_whole], 10h
2327
	test	[find_in_file_dlgdata.whole.flags], 10h
2328
	jz	@f
2328
	jz	@f
2329
	dec	ecx
2329
	dec	ecx
2330
@@:
2330
@@:
2331
	push	ebx esi
2331
	push	ebx esi
2332
	sub	eax, ecx
2332
	sub	eax, ecx
Line 2548... Line 2548...
2548
        mov     eax, [cur_width]
2548
        mov     eax, [cur_width]
2549
        sub     eax, 12
2549
        sub     eax, 12
2550
        mov     [ebx + dlgtemplate.width], eax
2550
        mov     [ebx + dlgtemplate.width], eax
2551
        dec     eax
2551
        dec     eax
2552
        dec     eax
2552
        dec     eax
2553
        mov     [ebx - find_in_file_dlgdata + find_in_file_dlgdata.width2], eax
2553
        mov     [ebx + FindInFileDlgdata.efind.x2], eax
2554
        shr     eax, 1
2554
        shr     eax, 1
2555
        dec     eax
2555
        dec     eax
2556
        dec     eax
2556
        dec     eax
2557
        mov     [ebx - find_in_file_dlgdata + find_in_file_dlgdata.search_x2], eax
2557
        mov     [ebx + FindInFileDlgdata.search.x2], eax
2558
        sub     eax, aSearchBLength-1
2558
        sub     eax, aSearchBLength-1
2559
        mov     [ebx - find_in_file_dlgdata + find_in_file_dlgdata.search_x1], eax
2559
        mov     [ebx + FindInFileDlgdata.search.x1], eax
2560
        add     eax, aSearchBLength+3
2560
        add     eax, aSearchBLength+3
2561
        mov     [ebx - find_in_file_dlgdata + find_in_file_dlgdata.cnl_x1], eax
2561
        mov     [ebx + FindInFileDlgdata.cnl.x1], eax
2562
        add     eax, aCancelBLength - 1
2562
        add     eax, aCancelBLength - 1
2563
        mov     [ebx - find_in_file_dlgdata + find_in_file_dlgdata.cnl_x2], eax
2563
        mov     [ebx + FindInFileDlgdata.cnl.x2], eax
2564
        mov     byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags0], 0xC
2564
        mov     byte [ebx + FindInFileDlgdata.efind.flags], 0xC
2565
        and     byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags1], not 4
2565
        and     byte [ebx + FindInFileDlgdata.search.flags], not 4
2566
        and     byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags2], not 4
2566
        and     byte [ebx + FindInFileDlgdata.cnl.flags], not 4
2567
	and	byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags_case], not 4
2567
	and	byte [ebx + FindInFileDlgdata.case.flags], not 4
2568
	and	byte [ebx - find_in_file_dlgdata + find_in_file_dlgdata.flags_whole], not 4
2568
	and	byte [ebx + FindInFileDlgdata.whole.flags], not 4
2569
        push    ebx
2569
        push    ebx
2570
        call    DialogBox
2570
        call    DialogBox
2571
	cmp	eax, find_in_file_dlgdata.search_btn
2571
	cmp	eax, find_in_file_dlgdata.search
2572
	ret
2572
	ret