Subversion Repositories Kolibri OS

Rev

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

Rev 7048 Rev 7616
Line 394... Line 394...
394
	
394
	
395
	mov	[esi+1],byte 0
395
	mov	[esi+1],byte 0
396
	cld
396
	cld
397
	ret
397
	ret
-
 
398
;----------------------------------------------
-
 
399
align 4
-
 
400
.set_file_name:
-
 
401
	push ebp
-
 
402
	mov ebp,esp
-
 
403
	push eax ecx edi esi
-
 
404
	mov edi,[ebp+8] ;open dlg struct 
-
 
405
	mov edi,[edi+40] ;+40 - filename_area
-
 
406
	mov esi,[ebp+12] ;file name
-
 
407
	mov ecx,256
-
 
408
	;copy file name in dialog
-
 
409
	@@:
-
 
410
		lodsb
-
 
411
		stosb
-
 
412
		test eax,eax
-
 
413
		loop @b
-
 
414
	pop esi edi ecx eax
-
 
415
	pop ebp
-
 
416
	ret 8
-
 
417
;----------------------------------------------
-
 
418
align 4
-
 
419
.set_file_ext:
-
 
420
	push ebp
-
 
421
	mov ebp,esp
-
 
422
	push eax ecx edi esi
-
 
423
	mov esi,[ebp+8] ;open dlg struct 
-
 
424
 
-
 
425
	xor eax,eax
-
 
426
	mov ecx,256
-
 
427
	mov edi,[esi+40] ;+40 - filename_area
-
 
428
	repne scasb
-
 
429
	@@: ;found position of '.'
-
 
430
		dec edi
-
 
431
		cmp byte[edi],'.'
-
 
432
		je @f
-
 
433
		cmp edi,[esi+40]
-
 
434
		ja @b
-
 
435
		jmp .no_dot
-
 
436
	@@:
-
 
437
	inc edi
-
 
438
	mov esi,[ebp+12] ;file ext
-
 
439
	;copy file ext in dialog
-
 
440
	@@:
-
 
441
		lodsb
-
 
442
		stosb
-
 
443
		test eax,eax
-
 
444
		jnz @b
-
 
445
	
-
 
446
	.no_dot:
-
 
447
	pop esi edi ecx eax
-
 
448
	pop ebp
398
;----------------------------------------------
449
	ret 8
399
}
450
}
400
;*****************************************************************************
451
;*****************************************************************************