Subversion Repositories Kolibri OS

Rev

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

Rev 5631 Rev 5640
Line 1... Line 1...
1
#ifndef INCLUDE_FILESYSTEM_H
1
#ifndef INCLUDE_FILESYSTEM_H
2
#define INCLUDE_FILESYSTEM_H
2
#define INCLUDE_FILESYSTEM_H
3
#ifndef INCLUDE_KOLIBRI_H
-
 
4
#include "../lib/kolibri.h"
-
 
5
#endif
-
 
Line 6... Line 3...
6
 
3
 
7
#ifndef INCLUDE_STRING_H
4
#ifndef INCLUDE_DATE_H
8
#include "../lib/strings.h"
5
#include "../lib/date.h"
Line 9... Line 6...
9
#endif
6
#endif
10
 
7
 
11
:struct f70{
8
:struct f70{
Line 16... Line 13...
16
	dword	param4;
13
	dword	param4;
17
	char	rezerv;
14
	char	rezerv;
18
	dword	name;
15
	dword	name;
19
};
16
};
Line 20... Line -...
20
 
-
 
21
:struct date
-
 
22
{
-
 
23
	byte day;
-
 
24
	byte month;
-
 
25
	word year;
-
 
26
};
-
 
27
 
17
 
28
:struct BDVK {
18
:struct BDVK {
29
	dword	readonly:1, hidden:1, system:1, volume_label:1, isfolder:1, notarchived:1, :0;
19
	dword	readonly:1, hidden:1, system:1, volume_label:1, isfolder:1, notarchived:1, :0;
30
	byte	type_name;
20
	byte	type_name;
31
	byte	rez1, rez2, selected;
21
	byte	rez1, rez2, selected;
Line 39... Line 29...
39
	dword	sizehi;
29
	dword	sizehi;
40
	char	name[518];
30
	char	name[518];
41
};
31
};
Line 42... Line -...
42
 
-
 
43
 
32
 
44
:void DrawDate(dword x, y, color, in_date)
-
 
45
{
-
 
46
	//char text[15];
-
 
47
	EDI = in_date;
-
 
48
	EAX = 47;
-
 
49
	EBX = 2<<16;
-
 
50
	EDX = x<<16+y;
-
 
51
	ESI = 0x80<<24+color;
-
 
52
	ECX = EDI.date.day;
-
 
53
	$int 0x40;
-
 
54
	EDX += 18<<16;
-
 
55
	ECX = EDI.date.month;
-
 
56
	$int 0x40;
-
 
57
	EDX += 18<<16;
-
 
58
	EBX = 4<<16;
-
 
59
	ECX = EDI.date.year;
-
 
60
	$int 0x40;
-
 
61
	PutPixel(x+14,y+6,color);
-
 
62
	PutPixel(x+32,y+6,color);
-
 
63
	//sprintf(#text,"%d",EDI.date.year);
-
 
Line 64... Line 33...
64
	//WriteText(x, y, 0x80, 0x000000, #text);
33
 
65
}
34
 
66
 
35
 
Line 81... Line 50...
81
    $mov eax,70
50
    $mov eax,70
82
    $mov ebx,#getinfo_file_70.func
51
    $mov ebx,#getinfo_file_70.func
83
    $int 0x40
52
    $int 0x40
84
}
53
}
Line 85... Line 54...
85
 
54
 
86
///////////////////////////
55
  /////////////////////////////////////
87
//   Èçìåíåíèå ïàðàìåòðîâ ôàéëà    //
56
 //   Èçìåíåíèå ïàðàìåòðîâ ôàéëà    //
88
///////////////////////////
57
/////////////////////////////////////
89
:f70 setinfo_file_70;
58
:f70 setinfo_file_70;
90
:dword SetFileInfo(dword file_path, bdvk_struct)
59
:dword SetFileInfo(dword file_path, bdvk_struct)
91
{    
60
{    
92
    setinfo_file_70.func = 6;
61
    setinfo_file_70.func = 6;
Line 171... Line 140...
171
	$mov eax,70
140
	$mov eax,70
172
	$mov ebx,#read_file_70.func
141
	$mov ebx,#read_file_70.func
173
	$int 0x40
142
	$int 0x40
174
}
143
}
Line 175... Line 144...
175
 
144
 
176
////////////////////////////
145
  ///////////////////////////
177
//     Çàïèñàòü ôàéë      //
146
 //     Çàïèñàòü ôàéë     //
178
////////////////////////////
147
///////////////////////////
179
:f70 write_file_70; 
148
:f70 write_file_70; 
180
:int WriteFile(dword write_file_size, write_buffer, write_file_path)
149
:int WriteFile(dword write_file_size, write_buffer, write_file_path)
181
{
150
{
182
	write_file_70.func = 2;
151
	write_file_70.func = 2;
Line 189... Line 158...
189
	$mov eax,70
158
	$mov eax,70
190
	$mov ebx,#write_file_70.func
159
	$mov ebx,#write_file_70.func
191
	$int 0x40
160
	$int 0x40
192
}
161
}
Line 193... Line 162...
193
 
162
 
194
//////////////////////////////////////////
163
  ////////////////////////////////////////
195
//     WriteInFileThatAlredyExists      //
164
 //     WriteInFileThatAlredyExists    //
196
//////////////////////////////////////////
165
////////////////////////////////////////
197
:f70 write_file_offset_70; 
166
:f70 write_file_offset_70; 
198
:int WriteFileWithOffset(dword write_data_size, write_buffer, write_file_path, offset)
167
:int WriteFileWithOffset(dword write_data_size, write_buffer, write_file_path, offset)
199
{
168
{
200
	write_file_offset_70.func = 3;
169
	write_file_offset_70.func = 3;