Rev 5465 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5465 | Rev 5548 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | char temp_filename[4096], |
- | |
2 | work_folder[4096], |
- | |
3 | current_filename[256]; |
- | |
4 | int files_mas[2000]; |
1 | int files_mas[2000]; |
5 | dword buf; |
2 | dword buf; |
Line 6... | Line 3... | ||
6 | 3 | ||
7 | 4 | ||
8 | void OpenDirectory(dword folder_path) |
5 | void OpenDirectory(dword folder_path) |
- | 6 | { |
|
9 | { |
7 | int cur; |
Line 10... | Line 8... | ||
10 | int cur; |
8 | char temp_filename[4096]; |
11 | dword j, filesnum, end_pointer; |
9 | dword j, filesnum, end_pointer; |
12 | 10 | ||
13 | list.count = 0; |
11 | list.count = 0; |
14 | //free(buf); |
12 | if (buf) free(buf); |
15 | if (GetDir(#buf, #filesnum, folder_path, DIRS_ONLYREAL)==0) |
13 | if (GetDir(#buf, #filesnum, folder_path, DIRS_ONLYREAL)==0) |
16 | if (filesnum==0) |
14 | if (filesnum==0) |
Line 26... | Line 24... | ||
26 | cur = list.count; |
24 | cur = list.count; |
27 | files_mas[cur]=j; |
25 | files_mas[cur]=j; |
28 | list.count++; |
26 | list.count++; |
29 | } |
27 | } |
30 | SortByName(0, list.count-1); |
28 | SortByName(0, list.count-1); |
31 | SetOpenedFileFirst(); |
- | |
32 | } |
29 | } |
Line 33... | Line 30... | ||
33 | 30 | ||
34 | void SortByName(int a, b) |
31 | void SortByName(int a, b) |
35 | { |
32 | { |
Line 39... | Line 36... | ||
39 | if (strcmp(files_mas[j]*304 + buf+72, files_mas[b]*304 + buf+72)<=0) { files_mas[i] >< files_mas[j]; i++;} |
36 | if (strcmp(files_mas[j]*304 + buf+72, files_mas[b]*304 + buf+72)<=0) { files_mas[i] >< files_mas[j]; i++;} |
40 | SortByName(a, i-2); |
37 | SortByName(a, i-2); |
41 | SortByName(i, b); |
38 | SortByName(i, b); |
42 | } |
39 | } |
Line 43... | Line 40... | ||
43 | 40 | ||
44 | void SetOpenedFileFirst() |
41 | void SetOpenedFileFirst(dword in_name) |
45 | { |
42 | { |
46 | int i; |
43 | int i; |
47 | dword opened_filename = #param + strrchr(#param, '/'); |
44 | dword opened_filename = in_name + strrchr(in_name, '/'); |
48 | for (i=0; i |
45 | for (i=0; i |
49 | { |
46 | { |
50 | if (strcmpi(opened_filename,files_mas[i]*304 + buf+72)==0) { files_mas[0]> |
47 | if (strcmpi(opened_filename,files_mas[i]*304 + buf+72)==0) { files_mas[0]> |
51 | } |
48 | } |