From 5a5d254ecb352ebd9743696794a98725c8bf3a36 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Sat, 11 Sep 2010 17:51:58 +1000 Subject: win32: reimplement read_key() to read Windows console --- libbb/Kbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbb') diff --git a/libbb/Kbuild b/libbb/Kbuild index eb3cd5039..a8a1da1f9 100644 --- a/libbb/Kbuild +++ b/libbb/Kbuild @@ -74,7 +74,6 @@ lib-y += procps.o lib-y += progress.o lib-y += ptr_to_globals.o lib-y += read.o -lib-y += read_key.o lib-y += recursive_action.o lib-y += remove_file.o lib-y += run_shell.o @@ -115,6 +114,7 @@ lib-$(CONFIG_PLATFORM_POSIX) += kernel_version.o lib-$(CONFIG_PLATFORM_POSIX) += login.o lib-$(CONFIG_PLATFORM_POSIX) += makedev.o lib-$(CONFIG_PLATFORM_POSIX) += match_fstype.o +lib-$(CONFIG_PLATFORM_POSIX) += read_key.o lib-$(CONFIG_PLATFORM_POSIX) += safe_gethostname.o lib-$(CONFIG_PLATFORM_POSIX) += signals.o lib-$(CONFIG_PLATFORM_POSIX) += udp_io.o -- cgit v1.2.3-55-g6feb From b09e30e681fc5babddc070590878b81c26ad42a5 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Sat, 11 Sep 2010 23:56:07 +1000 Subject: win32: lineedit: do not attempt to tc[sg]etattr in Windows console --- libbb/lineedit.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index dc90846f9..7aca71176 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -1781,6 +1781,7 @@ int FAST_FUNC read_line_input(const char *prompt, char *command, int maxsize, li INIT_S(); +#if !ENABLE_PLATFORM_MINGW32 if (tcgetattr(STDIN_FILENO, &initial_settings) < 0 || !(initial_settings.c_lflag & ECHO) ) { @@ -1794,6 +1795,7 @@ int FAST_FUNC read_line_input(const char *prompt, char *command, int maxsize, li DEINIT_S(); return len; } +#endif init_unicode(); -- cgit v1.2.3-55-g6feb From 87ee1f8fe678555474a3ab5b9734744e7da75dd4 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Sat, 11 Sep 2010 23:39:49 +1000 Subject: win32: lineedit: split $PATH the Windows way --- libbb/lineedit.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libbb') diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 7aca71176..9a04c38bf 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c @@ -564,7 +564,11 @@ static int path_parse(char ***p, int flags) tmp = (char*)pth; npth = 1; /* path component count */ while (1) { +#if ENABLE_PLATFORM_MINGW32 + tmp = next_path_sep(tmp); +#else tmp = strchr(tmp, ':'); +#endif if (!tmp) break; if (*++tmp == '\0') @@ -576,7 +580,11 @@ static int path_parse(char ***p, int flags) res[0] = tmp = xstrdup(pth); npth = 1; while (1) { +#if ENABLE_PLATFORM_MINGW32 + tmp = next_path_sep(tmp); +#else tmp = strchr(tmp, ':'); +#endif if (!tmp) break; *tmp++ = '\0'; /* ':' -> '\0' */ -- cgit v1.2.3-55-g6feb