Subversion Repositories Kolibri OS

Rev

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

Rev 3412 Rev 3432
Line 97... Line 97...
97
}
97
}
Line 98... Line 98...
98
 
98
 
99
:int GetFile(dword buf, filesize, read_path)
99
:int GetFile(dword buf, filesize, read_path)
100
{
100
{
101
	BDVK ReadFile_atr;
101
	BDVK ReadFile_atr;
102
	dword rBuf=0;
102
	dword rBuf;
103
	if (! GetFileInfo(read_path, #ReadFile_atr))
103
	if (! GetFileInfo(read_path, #ReadFile_atr))
104
	{
104
	{
105
		rBuf = malloc(ReadFile_atr.sizelo);	
105
		rBuf = malloc(ReadFile_atr.sizelo);	
106
		if (! ReadFile(0, ReadFile_atr.sizelo, rBuf, read_path))
106
		if (! ReadFile(0, ReadFile_atr.sizelo, rBuf, read_path))
Line 112... Line 112...
112
	}
112
	}
113
	free(rBuf);
113
	free(rBuf);
114
	return 0;
114
	return 0;
115
}
115
}
Line -... Line 116...
-
 
116
 
116
 
117
 
117
////////////////////////////
118
////////////////////////////
118
//     Çàïèñàòü ôàéë      //
119
//     Çàïèñàòü ôàéë      //
119
////////////////////////////
120
////////////////////////////
120
f70 write_file_70; 
121
f70 write_file_70; 
Line 201... Line 202...
201
	{
202
	{
202
		cBufer = malloc(CopyFile_atr.sizelo);	
203
		cBufer = malloc(CopyFile_atr.sizelo);	
203
		if (! ReadFile(0, CopyFile_atr.sizelo, cBufer, copy_from))
204
		if (! ReadFile(0, CopyFile_atr.sizelo, cBufer, copy_from))
204
		{
205
		{
205
			rezult = WriteFile(CopyFile_atr.sizelo, cBufer, copy_in);
206
			rezult = WriteFile(CopyFile_atr.sizelo, cBufer, copy_in);
206
			debugi(rezult);
-
 
207
		}
207
		}
208
	}
208
	}
209
	free(cBufer);
209
	free(cBufer);
210
	debugi(rezult);
-
 
211
	return rezult;
210
	return rezult;
212
}
211
}
Line 213... Line 212...
213
 
212
 
214
inline fastcall void SetCurDir( ECX)
213
inline fastcall void SetCurDir( ECX)
Line 227... Line 226...
227
 
226
 
228
void notify(dword notify_param)
227
void notify(dword notify_param)
229
{
228
{
230
	RunProgram("@notify", notify_param);
229
	RunProgram("@notify", notify_param);
-
 
230
}
-
 
231
 
-
 
232
:dword abspath(dword relative_path) //GetAbsolutePathFromRelative()
-
 
233
{
-
 
234
	char absolute_path[4096];
-
 
235
	strcpy(#absolute_path, #program_path);
-
 
236
	absolute_path[strrchr(#absolute_path, '/')] = '\0';
-
 
237
	strcat(#absolute_path, relative_path);
-
 
238
	return #absolute_path;