add new functions in open dialog,

fix programs info3ds, info3ds_u

git-svn-id: svn://kolibrios.org@7616 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
IgorA
2019-03-23 08:31:59 +00:00
parent 0c01e81393
commit 2ef19ac48c
6 changed files with 125 additions and 15 deletions

View File

@@ -396,5 +396,56 @@ OpenDialog_exit
cld
ret
;----------------------------------------------
align 4
.set_file_name:
push ebp
mov ebp,esp
push eax ecx edi esi
mov edi,[ebp+8] ;open dlg struct
mov edi,[edi+40] ;+40 - filename_area
mov esi,[ebp+12] ;file name
mov ecx,256
;copy file name in dialog
@@:
lodsb
stosb
test eax,eax
loop @b
pop esi edi ecx eax
pop ebp
ret 8
;----------------------------------------------
align 4
.set_file_ext:
push ebp
mov ebp,esp
push eax ecx edi esi
mov esi,[ebp+8] ;open dlg struct
xor eax,eax
mov ecx,256
mov edi,[esi+40] ;+40 - filename_area
repne scasb
@@: ;found position of '.'
dec edi
cmp byte[edi],'.'
je @f
cmp edi,[esi+40]
ja @b
jmp .no_dot
@@:
inc edi
mov esi,[ebp+12] ;file ext
;copy file ext in dialog
@@:
lodsb
stosb
test eax,eax
jnz @b
.no_dot:
pop esi edi ecx eax
pop ebp
ret 8
}
;*****************************************************************************