5 // Created by Alan Lawrence on 21/9/11.
6 // Copyright 2011 Cambridge University. All rights reserved.
13 void globScan(AbstractParser
*parser
, const char **usrPaths
, const char **sysPaths
) {
14 int flags
= GLOB_MARK
| GLOB_NOSORT
;
18 glob(*usrPaths
++, flags
, NULL
, &info
); //NULL error function
21 numUser
= info
.gl_pathc
;
23 glob(*sysPaths
++, flags
, NULL
, &info
);
29 for (char **fname
= info
.gl_pathv
; *fname
; fname
++, numUser
=(numUser
>0 ? numUser
-1 : 0)) {
30 if ((*fname
)[strlen(*fname
)-1]=='/') continue; //directories were marked by GLOB_MARK
31 parser
->ParseFile(*fname
, numUser
>0);