Renamed GLOBDIR to GLOB
parent
ac372e99fe
commit
0abdc1a343
|
@ -325,7 +325,7 @@ extern DECLSPEC int SDLCALL SDL_RenamePath(const char *oldpath, const char *newp
|
|||
extern DECLSPEC int SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *info);
|
||||
|
||||
|
||||
#define SDL_GLOBDIR_CASEINSENSITIVE (1 << 0)
|
||||
#define SDL_GLOB_CASEINSENSITIVE (1 << 0)
|
||||
|
||||
/**
|
||||
* Enumerate a directory tree, filtered by pattern, and return a list.
|
||||
|
@ -337,7 +337,7 @@ extern DECLSPEC int SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *info
|
|||
* separator of '/'. Wildcard characters '*' and '?' never match a path
|
||||
* separator.
|
||||
*
|
||||
* `flags` may be set to SDL_GLOBDIR_CASEINSENSITIVE to make the pattern
|
||||
* `flags` may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern
|
||||
* matching case-insensitive.
|
||||
*
|
||||
* The returned array is always NULL-terminated, for your iterating
|
||||
|
@ -349,7 +349,7 @@ extern DECLSPEC int SDLCALL SDL_GetPathInfo(const char *path, SDL_PathInfo *info
|
|||
* \param path the path of the directory to enumerate
|
||||
* \param pattern the pattern that files in the directory must match. Can be
|
||||
* NULL.
|
||||
* \param flags `SDL_GLOBDIR_*` bitflags that affect this search.
|
||||
* \param flags `SDL_GLOB_*` bitflags that affect this search.
|
||||
* \param count on return, will be set to the number of items in the returned
|
||||
* array. Can be NULL.
|
||||
* \returns an array of strings on success or NULL on failure; call
|
||||
|
|
|
@ -355,7 +355,7 @@ extern DECLSPEC Uint64 SDLCALL SDL_GetStorageSpaceRemaining(SDL_Storage *storage
|
|||
* separator of '/'. Wildcard characters '*' and '?' never match a path
|
||||
* separator.
|
||||
*
|
||||
* `flags` may be set to SDL_GLOBDIR_CASEINSENSITIVE to make the pattern
|
||||
* `flags` may be set to SDL_GLOB_CASEINSENSITIVE to make the pattern
|
||||
* matching case-insensitive.
|
||||
*
|
||||
* The returned array is always NULL-terminated, for your iterating
|
||||
|
@ -368,7 +368,7 @@ extern DECLSPEC Uint64 SDLCALL SDL_GetStorageSpaceRemaining(SDL_Storage *storage
|
|||
* \param path the path of the directory to enumerate
|
||||
* \param pattern the pattern that files in the directory must match. Can be
|
||||
* NULL.
|
||||
* \param flags `SDL_GLOBDIR_*` bitflags that affect this search.
|
||||
* \param flags `SDL_GLOB_*` bitflags that affect this search.
|
||||
* \param count on return, will be set to the number of items in the returned
|
||||
* array. Can be NULL.
|
||||
* \returns an array of strings on success or NULL on failure; call
|
||||
|
|
|
@ -204,7 +204,7 @@ static int SDLCALL GlobDirectoryCallback(void *userdata, const char *dirname, co
|
|||
}
|
||||
|
||||
char *folded = NULL;
|
||||
if (data->flags & SDL_GLOBDIR_CASEINSENSITIVE) {
|
||||
if (data->flags & SDL_GLOB_CASEINSENSITIVE) {
|
||||
folded = CaseFoldUtf8String(fullpath);
|
||||
if (!folded) {
|
||||
return -1;
|
||||
|
@ -271,7 +271,7 @@ char **SDL_InternalGlobDirectory(const char *path, const char *pattern, Uint32 f
|
|||
}
|
||||
|
||||
char *folded = NULL;
|
||||
if (pattern && (flags & SDL_GLOBDIR_CASEINSENSITIVE)) {
|
||||
if (pattern && (flags & SDL_GLOB_CASEINSENSITIVE)) {
|
||||
folded = CaseFoldUtf8String(pattern);
|
||||
if (!folded) {
|
||||
SDL_free(pathcpy);
|
||||
|
@ -292,7 +292,7 @@ char **SDL_InternalGlobDirectory(const char *path, const char *pattern, Uint32 f
|
|||
data.matcher = EverythingMatch; // no pattern? Everything matches.
|
||||
|
||||
// !!! FIXME
|
||||
//} else if (flags & SDL_GLOBDIR_GITIGNORE) {
|
||||
//} else if (flags & SDL_GLOB_GITIGNORE) {
|
||||
// data.matcher = GitIgnoreMatch;
|
||||
|
||||
} else {
|
||||
|
|
|
@ -116,7 +116,7 @@ int main(int argc, char *argv[])
|
|||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Base path enumeration failed!");
|
||||
}
|
||||
|
||||
globlist = SDL_GlobDirectory(base_path, "*/test*/Test*", SDL_GLOBDIR_CASEINSENSITIVE, NULL);
|
||||
globlist = SDL_GlobDirectory(base_path, "*/test*/Test*", SDL_GLOB_CASEINSENSITIVE, NULL);
|
||||
if (!globlist) {
|
||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Base path globbing failed!");
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue