diff --git a/data/common/lib/array.obj b/data/common/lib/array.obj index 815fc5acfc..d6498c1cdc 100644 Binary files a/data/common/lib/array.obj and b/data/common/lib/array.obj differ diff --git a/data/common/lib/fs.obj b/data/common/lib/fs.obj index 6fc4df5a02..06fd354f83 100644 Binary files a/data/common/lib/fs.obj and b/data/common/lib/fs.obj differ diff --git a/data/common/lib/library.obj b/data/common/lib/library.obj index d4a4b365fe..1787cc559c 100644 Binary files a/data/common/lib/library.obj and b/data/common/lib/library.obj differ diff --git a/programs/cmm/eolite/Eolite.c b/programs/cmm/eolite/Eolite.c index a43d99684f..cb3ff1668d 100644 --- a/programs/cmm/eolite/Eolite.c +++ b/programs/cmm/eolite/Eolite.c @@ -18,6 +18,7 @@ //obj #include "..\lib\obj\libini.h" #include "..\lib\obj\box_lib.h" +#include "..\lib\obj\fs.h" byte CMD_ENABLE_SAVE_IMG = false; @@ -124,6 +125,9 @@ void main() load_dll(boxlib, #box_lib_init,0); load_dll(libini, #lib_init,1); + + lib_init_fs(); + eolite_ini_path = abspath("Eolite.ini"); fd_path_eolite_ini_path = "/fd/1/File Managers/Eolite.ini"; @@ -874,7 +878,7 @@ void Del_Form() int del_error; int Del_File2(dword way, sh_progr) { - dword dirbuf, fcount, i, filename; + /*dword dirbuf, fcount, i, filename; int error; char del_from[4096]; if (isdir(way)) @@ -896,7 +900,8 @@ int Del_File2(dword way, sh_progr) } } } - if (error = DeleteFile(way)) del_error = error; + if (error = DeleteFile(way)) del_error = error;*/ + fs.remove(way); } void Del_File_Thread() diff --git a/programs/cmm/eolite/include/copy.h b/programs/cmm/eolite/include/copy.h index 4998a5127e..bb79896330 100644 --- a/programs/cmm/eolite/include/copy.h +++ b/programs/cmm/eolite/include/copy.h @@ -7,12 +7,14 @@ enum {NOCUT, CUT}; Clipboard clipboard; +dword _copy_path_ = 0; void Copy(dword pcth, char cut) { dword selected_offset2; byte copy_t[4096]; dword buff_data; int ind = 0; + /* if (selected_count) { buff_data = malloc(selected_count*4096+10); @@ -42,6 +44,9 @@ void Copy(dword pcth, char cut) } cut_active = cut; free(buff_data); + */ + _copy_path_ = strdup(#file_path); + cut_active = cut; } @@ -56,9 +61,27 @@ void PasteThread() int j; int cnt = 0; dword buf; + dword tmp; file_count_copy = 0; copy_bar.value = 0; - + if(_copy_path_) + { + DisplayOperationForm(); + IF(!TEMP) TEMP = malloc(4096); + buf = _copy_path_; + while(DSBYTE[buf]) + { + IF(DSBYTE[buf]=='/')tmp = buf; + buf++; + } + sprintf(TEMP,"%s/%s",#path,tmp); + IF(cut_active) fs.move(_copy_path_,TEMP); + ELSE fs.copy(_copy_path_,TEMP); + free(_copy_path_); + DialogExit(); + } + _copy_path_ = 0; + /* buf = clipboard.GetSlotData(clipboard.GetSlotCount()-1); if (DSDWORD[buf+4] != 3) return; cnt = ESINT[buf+8]; @@ -101,11 +124,8 @@ void PasteThread() Del_File2(#copy_from, 0); } - } - if (cut_active) - { - cut_active=false; - } + }*/ + cut_active=false; if (info_after_copy) notify(INFO_AFTER_COPY); - DialogExit(); + } \ No newline at end of file diff --git a/programs/cmm/eolite/include/properties.h b/programs/cmm/eolite/include/properties.h index 2d85979fe4..fa9a0f030d 100644 --- a/programs/cmm/eolite/include/properties.h +++ b/programs/cmm/eolite/include/properties.h @@ -155,6 +155,7 @@ void Quest() DrawFlatButton(145,138,70,20,302,0xC6DFC6,T_NO); } +/* void GetSizeDir(dword way) { dword dirbuf, fcount, i, filename; @@ -184,17 +185,21 @@ void GetSizeDir(dword way) free(cur_file); } } +*/ void GetSizeMoreFiles(dword way) { char cur_file[4096]; dword selected_offset2; - + size_dir = 0; for (i=0; i]\n" + +#ifndef INCLUDE_KOLIBRI_H +#include "../lib/kolibri.h" +#endif + +#ifndef INCLUDE_DLL_H +#include "../lib/dll.h" +#endif + +:struct FILE_SYSTEM_FUNCTION +{ + dword remove_pointer; + byte remove(dword path); + + dword move_pointer; + byte move(dword path1,path2); + + dword copy_pointer; + byte copy(dword path1,path2); + + dword get_size_pointer; + qword get_size(dword path); +} fs; + +:byte FILE_SYSTEM_FUNCTION::remove(dword path) +{ + dword tmp = path; + remove_pointer stdcall(tmp); + return EAX; +} + +:qword FILE_SYSTEM_FUNCTION::get_size(dword path) +{ + dword tmp = path; + get_size_pointer stdcall(tmp); + return EAX; +} + +:byte FILE_SYSTEM_FUNCTION::move(dword path1,path2) +{ + dword tmp1 = path1; + dword tmp2 = path2; + move_pointer stdcall(tmp1,tmp2); + return EAX; +} + +:byte FILE_SYSTEM_FUNCTION::copy(dword path1,path2) +{ + dword tmp1 = path1; + dword tmp2 = path2; + copy_pointer stdcall(tmp1,tmp2); + return EAX; +} + +:void lib_init_fs() +{ + library.load("/sys/LIB/FS.OBJ"); + fs.remove_pointer = library.get("fs.remove"); + fs.get_size_pointer = library.get("fs.get_size"); + fs.move_pointer = library.get("fs.move"); + fs.copy_pointer = library.get("fs.copy"); + //alert(itoa(fs.get_size("/sys/"))); +} + +#endif \ No newline at end of file