| 335 | } |
| 336 | |
| 337 | void listsubdirs(const char *dir, vector<char *> &subdirs, int (__cdecl *sf)(const char **, const char **)) |
| 338 | { |
| 339 | listsubdir(dir, subdirs); |
| 340 | string s; |
| 341 | if(homedir[0]) |
| 342 | { |
| 343 | formatstring(s)("%s%s", homedir, dir); |
| 344 | listsubdir(s, subdirs); |
| 345 | } |
| 346 | loopv(packagedirs) |
| 347 | { |
| 348 | formatstring(s)("%s%s", packagedirs[i], dir); |
| 349 | listsubdir(s, subdirs); |
| 350 | } |
| 351 | #ifndef STANDALONE |
| 352 | listzipdirs(dir, subdirs); |
| 353 | #endif |
| 354 | subdirs.sort(sf); |
| 355 | for(int i = subdirs.length() - 1; i > 0; i--) |
| 356 | { // remove doubles |
| 357 | if(!strcmp(subdirs[i], subdirs[i - 1])) delstring(subdirs.remove(i)); |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | bool listdir(const char *dir, const char *ext, vector<char *> &files) |
| 362 | { |
no test coverage detected