Chore: IndentPPDirectives: BeforeHash [ci skip]

This commit is contained in:
李通洲
2026-04-15 16:16:46 +08:00
parent b63bd5b8c9
commit abc6c0593c
133 changed files with 1329 additions and 1329 deletions
+15 -15
View File
@@ -9,17 +9,17 @@ const char* ffFindExecutableInPath(const char* name, FFstrbuf* result) {
return "$PATH not set";
}
# ifdef _WIN32
#ifdef _WIN32
const bool appendExe = !ffStrEndsWithIgnCase(name, ".exe");
# endif
#endif
for (char* token = path; *token; path = token + 1) {
token = strchr(path,
# ifdef _WIN32
#ifdef _WIN32
';'
# else
#else
':'
# endif
#endif
);
if (!token) {
token = path + strlen(path);
@@ -27,25 +27,25 @@ const char* ffFindExecutableInPath(const char* name, FFstrbuf* result) {
ffStrbufSetNS(result, (uint32_t) (token - path), path);
ffStrbufEnsureEndsWithC(result,
# ifdef _WIN32
#ifdef _WIN32
'\\'
# else
#else
'/'
# endif
#endif
);
ffStrbufAppendS(result, name);
# ifdef _WIN32
#ifdef _WIN32
if (appendExe) {
ffStrbufAppendS(result, ".exe");
}
if (!ffPathExists(result->chars, FF_PATHTYPE_FILE)) {
continue;
}
# else
#else
if (access(result->chars, X_OK) != 0) {
continue;
}
# endif
#endif
return NULL;
}
@@ -53,10 +53,10 @@ const char* ffFindExecutableInPath(const char* name, FFstrbuf* result) {
return "Executable not found";
}
#else
# include <windows.h>
# include <winioctl.h>
# include <errno.h>
# include <stdalign.h>
#include <windows.h>
#include <winioctl.h>
#include <errno.h>
#include <stdalign.h>
const char* ffFindExecutableInPath(const char* name, FFstrbuf* result) {
char buffer[MAX_PATH + 1];