forked from KolibriOS/kolibrios
add functions
git-svn-id: svn://kolibrios.org@5933 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
ba715bd842
commit
d340c1ed34
@ -5,7 +5,7 @@
|
|||||||
#include "../lib/math.h"
|
#include "../lib/math.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef INCLUDE_IO_H
|
#ifndef INCLUDE_FS_H
|
||||||
#include "../lib/obj/fs.h"
|
#include "../lib/obj/fs.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -813,6 +813,7 @@ void ______INIT______()
|
|||||||
$pop ebx
|
$pop ebx
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
ExitProcess();
|
||||||
}
|
}
|
||||||
______STOP______:
|
______STOP______:
|
||||||
#endif
|
#endif
|
@ -15,6 +15,9 @@
|
|||||||
dword remove_pointer;
|
dword remove_pointer;
|
||||||
byte remove(dword path);
|
byte remove(dword path);
|
||||||
|
|
||||||
|
dword open_pointer;
|
||||||
|
dword open(dword path);
|
||||||
|
|
||||||
dword read_pointer;
|
dword read_pointer;
|
||||||
dword read(dword path);
|
dword read(dword path);
|
||||||
|
|
||||||
@ -27,10 +30,14 @@
|
|||||||
dword copy_pointer;
|
dword copy_pointer;
|
||||||
byte copy(dword path1,path2);
|
byte copy(dword path1,path2);
|
||||||
|
|
||||||
|
dword write_pointer;
|
||||||
|
byte write(dword path1,path2,path3);
|
||||||
|
|
||||||
dword get_size_pointer;
|
dword get_size_pointer;
|
||||||
qword get_size(dword path);
|
qword get_size(dword path);
|
||||||
|
|
||||||
dword callback_copy;
|
dword callback_copy_pointer;
|
||||||
|
byte callback_copy(dword path1,path2,ptr);
|
||||||
} fs;
|
} fs;
|
||||||
|
|
||||||
:byte FILE_SYSTEM_FUNCTION::remove(dword path)
|
:byte FILE_SYSTEM_FUNCTION::remove(dword path)
|
||||||
@ -49,6 +56,16 @@
|
|||||||
return EAX;
|
return EAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:byte FILE_SYSTEM_FUNCTION::write(dword path1,path2,path3)
|
||||||
|
{
|
||||||
|
dword tmp1 = path1;
|
||||||
|
dword tmp2 = path2;
|
||||||
|
dword tmp3 = path3;
|
||||||
|
lib_init_fs();
|
||||||
|
write_pointer stdcall(tmp1,tmp2,tmp3);
|
||||||
|
return EAX;
|
||||||
|
}
|
||||||
|
|
||||||
:dword FILE_SYSTEM_FUNCTION::run(dword path,arg)
|
:dword FILE_SYSTEM_FUNCTION::run(dword path,arg)
|
||||||
{
|
{
|
||||||
dword tmp1 = path1;
|
dword tmp1 = path1;
|
||||||
@ -62,7 +79,17 @@
|
|||||||
{
|
{
|
||||||
dword tmp = path;
|
dword tmp = path;
|
||||||
lib_init_fs();
|
lib_init_fs();
|
||||||
get_size_pointer stdcall(tmp);
|
//get_size_pointer stdcall(tmp);
|
||||||
|
$push tmp
|
||||||
|
$call get_size_pointer
|
||||||
|
$add esi,4
|
||||||
|
}
|
||||||
|
|
||||||
|
:dword FILE_SYSTEM_FUNCTION::open(dword path)
|
||||||
|
{
|
||||||
|
dword tmp = path;
|
||||||
|
lib_init_fs();
|
||||||
|
open_pointer stdcall(tmp);
|
||||||
return EAX;
|
return EAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,6 +111,16 @@
|
|||||||
return EAX;
|
return EAX;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:byte FILE_SYSTEM_FUNCTION::callback_copy(dword path1,path2,ptr)
|
||||||
|
{
|
||||||
|
dword tmp1 = path1;
|
||||||
|
dword tmp2 = path2;
|
||||||
|
lib_init_fs();
|
||||||
|
callback_copy_pointer stdcall(tmp1,tmp2,ptr);
|
||||||
|
return EAX;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
:byte __CHECK_FS__ = 0;
|
:byte __CHECK_FS__ = 0;
|
||||||
:void lib_init_fs()
|
:void lib_init_fs()
|
||||||
{
|
{
|
||||||
@ -92,10 +129,12 @@
|
|||||||
fs.remove_pointer = library.get("fs.remove");
|
fs.remove_pointer = library.get("fs.remove");
|
||||||
fs.get_size_pointer = library.get("fs.get_size");
|
fs.get_size_pointer = library.get("fs.get_size");
|
||||||
fs.move_pointer = library.get("fs.move");
|
fs.move_pointer = library.get("fs.move");
|
||||||
|
fs.open_pointer = library.get("fs.open");
|
||||||
fs.copy_pointer = library.get("fs.copy");
|
fs.copy_pointer = library.get("fs.copy");
|
||||||
fs.read_pointer = library.get("fs.read");
|
fs.read_pointer = library.get("fs.read");
|
||||||
fs.run_pointer = library.get("fs.execute");
|
fs.run_pointer = library.get("fs.execute");
|
||||||
fs.callback_copy = library.get("fs.callback_copy");
|
fs.write_pointer = library.get("fs.write");
|
||||||
|
fs.callback_copy_pointer = library.get("fs.callback_copy");
|
||||||
__CHECK_FS__ = true;
|
__CHECK_FS__ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user