Subversion Repositories Kolibri OS

Rev

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

Rev 7768 Rev 7773
Line 214... Line 214...
214
		return buffer;
214
		return buffer;
215
	}
215
	}
216
	return NULL;
216
	return NULL;
217
}
217
}
Line -... Line 218...
-
 
218
 
-
 
219
:void get_path_name(dword BUF,PATH)
-
 
220
{
-
 
221
	dword beg = PATH;
-
 
222
	dword pos = PATH;
-
 
223
	dword sav = PATH;
-
 
224
	dword i;
-
 
225
	while(DSBYTE[pos])
-
 
226
	{
-
 
227
		if(DSBYTE[pos]=='/')sav = pos;
-
 
228
		pos++;
-
 
229
	}
-
 
230
	i = sav-beg;
-
 
231
	while(i)
-
 
232
	{
-
 
233
		DSBYTE[BUF] = DSBYTE[beg];
-
 
234
		beg++;
-
 
235
		BUF++;
-
 
236
		i--;
-
 
237
	}
-
 
238
	DSBYTE[BUF] = 0;
-
 
239
}
218
 
240
 
219
:struct __PATH
241
:struct __PATH
220
{
242
{
221
	dword file(...);
243
	dword file(...);
222
	dword path(...);
244
	dword path(...);
Line 223... Line 245...
223
};
245
};
224
 
246
 
225
:char __PATH_NEW[4096];
247
:char __PATH_NEW[4096];
-
 
248
:dword __PATH::path(dword PATH)
226
:dword __PATH::path(dword PATH)
249
{
-
 
250
	char self_dir[4096];
-
 
251
	dword pos;
-
 
252
	
227
{
253
	get_path_name(#self_dir,I_Path);
228
	dword pos;
254
 
229
	if(!PATH) return self.dir;
255
	if(!PATH) return #self_dir;
230
	pos = PATH;
256
	pos = PATH;
231
	if(DSBYTE[pos]=='/') || (!strncmp(PATH,"./",2))
257
	if(DSBYTE[pos]=='/') || (!strncmp(PATH,"./",2))
232
	{
258
	{
233
		return PATH;
259
		return PATH;
234
	}
260
	}
235
	strcpy(#__PATH_NEW, self.dir);
261
	strcpy(#__PATH_NEW, #self_dir);
236
	chrcat(#__PATH_NEW, '/');
262
	chrcat(#__PATH_NEW, '/');
237
	strcpy(#__PATH_NEW, PATH);
263
	strcpy(#__PATH_NEW, PATH);