Subversion Repositories Kolibri OS

Rev

Rev 5895 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5895 Rev 5933
Line 13... Line 13...
13
:struct FILE_SYSTEM_FUNCTION
13
:struct FILE_SYSTEM_FUNCTION
14
{
14
{
15
	dword remove_pointer;
15
	dword remove_pointer;
16
	byte remove(dword path);
16
	byte remove(dword path);
Line -... Line 17...
-
 
17
	
-
 
18
	dword open_pointer;
-
 
19
	dword open(dword path);
17
	
20
	
18
	dword read_pointer;
21
	dword read_pointer;
Line 19... Line 22...
19
	dword read(dword path);
22
	dword read(dword path);
20
	
23
	
Line 25... Line 28...
25
	byte move(dword path1,path2);
28
	byte move(dword path1,path2);
Line 26... Line 29...
26
	
29
	
27
	dword copy_pointer;
30
	dword copy_pointer;
Line -... Line 31...
-
 
31
	byte copy(dword path1,path2);
-
 
32
	
-
 
33
	dword write_pointer;
28
	byte copy(dword path1,path2);
34
	byte write(dword path1,path2,path3);
29
	
35
	
Line 30... Line 36...
30
	dword get_size_pointer;
36
	dword get_size_pointer;
-
 
37
	qword get_size(dword path);
31
	qword get_size(dword path);
38
	
Line 32... Line 39...
32
	
39
	dword callback_copy_pointer;
33
	dword callback_copy;
40
	byte callback_copy(dword path1,path2,ptr);
34
} fs;
41
} fs;
Line 47... Line 54...
47
	lib_init_fs();
54
	lib_init_fs();
48
	read_pointer stdcall(tmp);
55
	read_pointer stdcall(tmp);
49
	return EAX;
56
	return EAX;
50
}
57
}
Line -... Line 58...
-
 
58
 
-
 
59
:byte FILE_SYSTEM_FUNCTION::write(dword path1,path2,path3)
-
 
60
{
-
 
61
	dword tmp1 = path1;
-
 
62
	dword tmp2 = path2;
-
 
63
	dword tmp3 = path3;
-
 
64
	lib_init_fs();
-
 
65
	write_pointer stdcall(tmp1,tmp2,tmp3);
-
 
66
	return EAX;
-
 
67
}
51
 
68
 
52
:dword FILE_SYSTEM_FUNCTION::run(dword path,arg)
69
:dword FILE_SYSTEM_FUNCTION::run(dword path,arg)
53
{
70
{
54
	dword tmp1 = path1;
71
	dword tmp1 = path1;
55
	dword tmp2 = arg;
72
	dword tmp2 = arg;
Line 60... Line 77...
60
 
77
 
61
:qword FILE_SYSTEM_FUNCTION::get_size(dword path)
78
:qword FILE_SYSTEM_FUNCTION::get_size(dword path)
62
{
79
{
63
	dword tmp = path;
80
	dword tmp = path;
64
	lib_init_fs();
81
	lib_init_fs();
-
 
82
	//get_size_pointer stdcall(tmp);
-
 
83
	$push tmp
-
 
84
	$call get_size_pointer
-
 
85
	$add esi,4
-
 
86
}
-
 
87
 
-
 
88
:dword FILE_SYSTEM_FUNCTION::open(dword path)
-
 
89
{
-
 
90
	dword tmp = path;
-
 
91
	lib_init_fs();
65
	get_size_pointer stdcall(tmp);
92
	open_pointer stdcall(tmp);
66
	return EAX;
93
	return EAX;
Line 67... Line 94...
67
}
94
}
68
 
95
 
Line 82... Line 109...
82
	lib_init_fs();
109
	lib_init_fs();
83
	copy_pointer stdcall(tmp1,tmp2);
110
	copy_pointer stdcall(tmp1,tmp2);
84
	return EAX;
111
	return EAX;
85
}
112
}
Line -... Line 113...
-
 
113
 
-
 
114
:byte FILE_SYSTEM_FUNCTION::callback_copy(dword path1,path2,ptr)
-
 
115
{
-
 
116
	dword tmp1 = path1;
-
 
117
	dword tmp2 = path2;
-
 
118
	lib_init_fs();
-
 
119
	callback_copy_pointer stdcall(tmp1,tmp2,ptr);
-
 
120
	return EAX;
-
 
121
}
-
 
122
 
86
 
123
 
87
:byte __CHECK_FS__ = 0;
124
:byte __CHECK_FS__ = 0;
88
:void lib_init_fs()
125
:void lib_init_fs()
89
{
126
{
90
	IF(__CHECK_FS__)return;
127
	IF(__CHECK_FS__)return;
91
	library.load("/sys/LIB/FS.OBJ");
128
	library.load("/sys/LIB/FS.OBJ");
92
	fs.remove_pointer = library.get("fs.remove");
129
	fs.remove_pointer = library.get("fs.remove");
93
	fs.get_size_pointer = library.get("fs.get_size");
130
	fs.get_size_pointer = library.get("fs.get_size");
-
 
131
	fs.move_pointer = library.get("fs.move");
94
	fs.move_pointer = library.get("fs.move");
132
	fs.open_pointer = library.get("fs.open");
95
	fs.copy_pointer = library.get("fs.copy");
133
	fs.copy_pointer = library.get("fs.copy");
96
	fs.read_pointer = library.get("fs.read");
134
	fs.read_pointer = library.get("fs.read");
-
 
135
	fs.run_pointer = library.get("fs.execute");
97
	fs.run_pointer = library.get("fs.execute");
136
	fs.write_pointer = library.get("fs.write");
98
	fs.callback_copy = library.get("fs.callback_copy");
137
	fs.callback_copy_pointer = library.get("fs.callback_copy");
99
	__CHECK_FS__ = true;
138
	__CHECK_FS__ = true;
Line 100... Line 139...
100
}
139
}
101
 
140