diff --git a/include/SDL3/SDL_filesystem.h b/include/SDL3/SDL_filesystem.h index 4cdde117e..cfdabec60 100644 --- a/include/SDL3/SDL_filesystem.h +++ b/include/SDL3/SDL_filesystem.h @@ -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 diff --git a/include/SDL3/SDL_storage.h b/include/SDL3/SDL_storage.h index d91759221..427f7f1f9 100644 --- a/include/SDL3/SDL_storage.h +++ b/include/SDL3/SDL_storage.h @@ -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 diff --git a/src/filesystem/SDL_filesystem.c b/src/filesystem/SDL_filesystem.c index 7a3bd7275..2c67999c6 100644 --- a/src/filesystem/SDL_filesystem.c +++ b/src/filesystem/SDL_filesystem.c @@ -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 { diff --git a/test/testfilesystem.c b/test/testfilesystem.c index 521774647..99fb0951f 100644 --- a/test/testfilesystem.c +++ b/test/testfilesystem.c @@ -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 {