Subversion Repositories Kolibri OS

Rev

Rev 5804 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5804 punk_joker 1
BDVK file_info_count;
2
int file_count_copy;
3
 
4
void DirFileCount(dword way)
5
{
6
	dword dirbuf, fcount, i, filename;
7
	dword cur_file;
8
	if (isdir(way))
9
	{
10
		cur_file = malloc(4096);
11
		// In the process of recursive descent, memory must be allocated dynamically, because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed.
12
		GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL);
5962 leency 13
		filename = dirbuf+72;
5804 punk_joker 14
		for (i=0; i
15
		{
5962 leency 16
			filename += 304;
5804 punk_joker 17
			sprintf(cur_file,"%s/%s",way,filename);
18
 
19
			if (TestBit(ESDWORD[filename-40], 4) )
20
			{
21
				file_count_copy++;
22
				DirFileCount(cur_file);
23
			}
24
			else
25
			{
26
				file_count_copy++;
27
			}
28
		}
29
		free(cur_file);
30
	}
31
}
32