From 5ff2bfefb4db527b201fa3059de2aa6e2139d9f9 Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 10 Dec 2023 11:47:45 +0000 Subject: win32: code shrink applet overrides Pass the PATH to be used to look up executables down from the shell to the applet override code. This replaces the use of a static variable and a function to fetch its value. Saves 16-32 bytes. --- include/libbb.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index 0682e34ea..a3611abc3 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1329,11 +1329,11 @@ int find_applet_by_name(const char *name) FAST_FUNC; void run_applet_no_and_exit(int a, const char *name, char **argv) NORETURN FAST_FUNC; # if ENABLE_PLATFORM_MINGW32 && \ (ENABLE_FEATURE_PREFER_APPLETS || ENABLE_FEATURE_SH_STANDALONE) -int is_applet_preferred(const char *name) FAST_FUNC; -const char *get_ash_path(void); +int is_applet_preferred(const char *name, const char *path) FAST_FUNC; +int find_applet_by_name_with_path(const char *name, const char *path) FAST_FUNC; # else -# define is_applet_preferred(n) (1) -# define get_ash_path() (NULL) +# define is_applet_preferred(n, p) (1) +# define find_applet_by_name_with_path(n, p) find_applet_by_name(n) # endif #endif void show_usage_if_dash_dash_help(int applet_no, char **argv) FAST_FUNC; -- cgit v1.2.3-55-g6feb