Subversion Repositories Kolibri OS

Rev

Rev 2617 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1665 Nasarus 1
 
2
{
3
4
 
5
unsigned	*n;
6
unsigned	num_of_file;
7
unsigned	*t;
8
unsigned	type_of_file;
9
int		i;
10
11
 
12
k70.p04 = 0;
13
k70.p08 = 0;
14
k70.p12 = 2*1024*1024; // 2 MB
15
k70.p16 = malloc(2*1024*1024);
16
k70.p20 = 0;
17
18
 
19
// Если ls запускается без параметров, просматриваем текущий каталог
20
if ( !strlen(dir) )
21
	k70.p21 = cur_dir;
22
else
23
	k70.p21 = dir;
24
25
 
26
	{
27
	free(k70.p16);
28
	return FALSE;
29
	}
30
31
 
32
num_of_file = *n; // число файлов в каталоге
33
34
 
35
	{
36
	printf ("  %s", k70.p16+32+40+(264+40)*i);
37
	t = k70.p16+32+(264+40)*i;
38
	type_of_file = *t;
39
	if ( (0x10 == (type_of_file&0x10)) || (8 == (type_of_file&8)) )
40
		printf ("/");
41
	printf ("\n\r");
42
	}
43
44
 
45
return TRUE;
46
}
47