Rev 6251 | 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; |
||
6251 | leency | 8 | if (dir_exists(way)) |
5804 | punk_joker | 9 | { |
10 | cur_file = malloc(4096); |
||
7278 | leency | 11 | // In the process of recursive descent, memory must be allocated |
12 | // dynamically, because the static variable cause a fault!!! |
||
13 | // But unfortunately pass away to sacrifice speed. |
||
5804 | punk_joker | 14 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
5962 | leency | 15 | filename = dirbuf+72; |
5804 | punk_joker | 16 | for (i=0; i |
17 | { |
||
5962 | leency | 18 | filename += 304; |
5804 | punk_joker | 19 | sprintf(cur_file,"%s/%s",way,filename); |
20 | |||
21 | if (TestBit(ESDWORD[filename-40], 4) ) |
||
22 | { |
||
23 | file_count_copy++; |
||
24 | DirFileCount(cur_file); |
||
25 | } |
||
26 | else |
||
27 | { |
||
28 | file_count_copy++; |
||
29 | } |
||
30 | } |
||
31 | free(cur_file); |
||
32 | } |
||
33 | } |
||
34 |