Prefer name 'program' over 'binary'
binary-search is confusing!
This commit is contained in:
parent
e00142bfa7
commit
c246e0c3b6
|
@ -556,18 +556,18 @@ static void bli_where_am_i(char *fullname, const size_t maxlen, const char *name
|
|||
BLI_join_dirfile(fullname, maxlen, wdir, name);
|
||||
|
||||
#ifdef _WIN32
|
||||
BLI_path_binary_extensions_add_win32(fullname, maxlen);
|
||||
BLI_path_program_extensions_add_win32(fullname, maxlen);
|
||||
#endif
|
||||
}
|
||||
else if (BLI_last_slash(name)) {
|
||||
// full path
|
||||
BLI_strncpy(fullname, name, maxlen);
|
||||
#ifdef _WIN32
|
||||
BLI_path_binary_extensions_add_win32(fullname, maxlen);
|
||||
BLI_path_program_extensions_add_win32(fullname, maxlen);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
BLI_path_binary_search(fullname, maxlen, name);
|
||||
BLI_path_program_search(fullname, maxlen, name);
|
||||
}
|
||||
#if defined(DEBUG)
|
||||
if (!STREQ(name, fullname)) {
|
||||
|
|
|
@ -79,9 +79,9 @@ const char *BLI_first_slash(const char *string) ATTR_NONNULL() ATTR_WARN_UNUSED_
|
|||
void BLI_path_native_slash(char *path) ATTR_NONNULL();
|
||||
|
||||
#ifdef _WIN32
|
||||
bool BLI_path_binary_extensions_add_win32(char *name, const size_t maxlen);
|
||||
bool BLI_path_program_extensions_add_win32(char *name, const size_t maxlen);
|
||||
#endif
|
||||
bool BLI_path_binary_search(char *fullname, const size_t maxlen, const char *name);
|
||||
bool BLI_path_program_search(char *fullname, const size_t maxlen, const char *name);
|
||||
|
||||
void BLI_getlastdir(const char *dir, char *last, const size_t maxlen);
|
||||
bool BLI_testextensie(const char *str, const char *ext) ATTR_NONNULL() ATTR_WARN_UNUSED_RESULT;
|
||||
|
|
|
@ -1026,7 +1026,7 @@ bool BLI_path_cwd(char *path)
|
|||
* environment variable (Windows-only) onto *name in turn until such a file is found.
|
||||
* Returns success/failure.
|
||||
*/
|
||||
bool BLI_path_binary_extensions_add_win32(char *name, const size_t maxlen)
|
||||
bool BLI_path_program_extensions_add_win32(char *name, const size_t maxlen)
|
||||
{
|
||||
bool retval = false;
|
||||
int type;
|
||||
|
@ -1071,7 +1071,7 @@ bool BLI_path_binary_extensions_add_win32(char *name, const size_t maxlen)
|
|||
/**
|
||||
* Search for a binary (executable)
|
||||
*/
|
||||
bool BLI_path_binary_search(
|
||||
bool BLI_path_program_search(
|
||||
char *fullname, const size_t maxlen,
|
||||
const char *name)
|
||||
{
|
||||
|
@ -1103,7 +1103,7 @@ bool BLI_path_binary_search(
|
|||
BLI_path_append(filename, maxlen, name);
|
||||
if (
|
||||
#ifdef _WIN32
|
||||
BLI_path_binary_extensions_add_win32(filename, maxlen)
|
||||
BLI_path_program_extensions_add_win32(filename, maxlen)
|
||||
#else
|
||||
BLI_exists(filename)
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue