aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2018-04-05 20:31:13 +0100
committerRon Yorston <rmy@pobox.com>2018-04-05 20:31:13 +0100
commitf7c592f6d832602a628008d598a3aa130d89de4d (patch)
tree5b771c3f51bfb51e52f3736f89f7b4b195e13f82 /editors
parent3f18c23c67ea8614f1901265d100d3e49bc7491e (diff)
downloadbusybox-w32-f7c592f6d832602a628008d598a3aa130d89de4d.tar.gz
busybox-w32-f7c592f6d832602a628008d598a3aa130d89de4d.tar.bz2
busybox-w32-f7c592f6d832602a628008d598a3aa130d89de4d.zip
win32: exclude termios code
The code to manipulate terminal settings serves no purpose in WIN32. Use conditional compilation to exclude much of it.
Diffstat (limited to 'editors')
-rw-r--r--editors/vi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/editors/vi.c b/editors/vi.c
index b54dd98dc..26487bee6 100644
--- a/editors/vi.c
+++ b/editors/vi.c
@@ -353,7 +353,9 @@ struct globals {
353#if ENABLE_FEATURE_VI_USE_SIGNALS 353#if ENABLE_FEATURE_VI_USE_SIGNALS
354 sigjmp_buf restart; // catch_sig() 354 sigjmp_buf restart; // catch_sig()
355#endif 355#endif
356#if !ENABLE_PLATFORM_MINGW32
356 struct termios term_orig; // remember what the cooked mode was 357 struct termios term_orig; // remember what the cooked mode was
358#endif
357#if ENABLE_FEATURE_VI_COLON 359#if ENABLE_FEATURE_VI_COLON
358 char *initial_cmds[3]; // currently 2 entries, NULL terminated 360 char *initial_cmds[3]; // currently 2 entries, NULL terminated
359#endif 361#endif
@@ -2738,15 +2740,19 @@ static char *swap_context(char *p) // goto new context for '' command make this
2738//----- Set terminal attributes -------------------------------- 2740//----- Set terminal attributes --------------------------------
2739static void rawmode(void) 2741static void rawmode(void)
2740{ 2742{
2743#if !ENABLE_PLATFORM_MINGW32
2741 // no TERMIOS_CLEAR_ISIG: leave ISIG on - allow signals 2744 // no TERMIOS_CLEAR_ISIG: leave ISIG on - allow signals
2742 set_termios_to_raw(STDIN_FILENO, &term_orig, TERMIOS_RAW_CRNL); 2745 set_termios_to_raw(STDIN_FILENO, &term_orig, TERMIOS_RAW_CRNL);
2743 erase_char = term_orig.c_cc[VERASE]; 2746 erase_char = term_orig.c_cc[VERASE];
2747#endif
2744} 2748}
2745 2749
2746static void cookmode(void) 2750static void cookmode(void)
2747{ 2751{
2748 fflush_all(); 2752 fflush_all();
2753#if !ENABLE_PLATFORM_MINGW32
2749 tcsetattr_stdin_TCSANOW(&term_orig); 2754 tcsetattr_stdin_TCSANOW(&term_orig);
2755#endif
2750} 2756}
2751 2757
2752#if ENABLE_FEATURE_VI_USE_SIGNALS 2758#if ENABLE_FEATURE_VI_USE_SIGNALS