diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2021-09-25 19:36:35 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2021-09-25 19:36:35 +0200 |
commit | 627821e42b06adfe6bbc6004d8eeb7c35f65120d (patch) | |
tree | 096152053c8d62363f21e36f59d16b4baa21ec5d /libbb | |
parent | 56f0e886db0543a27f369d7f95eb9da2fb3d069c (diff) | |
download | busybox-w32-627821e42b06adfe6bbc6004d8eeb7c35f65120d.tar.gz busybox-w32-627821e42b06adfe6bbc6004d8eeb7c35f65120d.tar.bz2 busybox-w32-627821e42b06adfe6bbc6004d8eeb7c35f65120d.zip |
libbb/lineedit: tweak #if indenting, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/lineedit.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index e8d721e61..a7a3ee103 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -1762,7 +1762,7 @@ vi_back_motion(void) | |||
1762 | input_backward(1); | 1762 | input_backward(1); |
1763 | } | 1763 | } |
1764 | } | 1764 | } |
1765 | #endif | 1765 | #endif /* ENABLE_FEATURE_EDITING_VI */ |
1766 | 1766 | ||
1767 | /* Modelled after bash 4.0 behavior of Ctrl-<arrow> */ | 1767 | /* Modelled after bash 4.0 behavior of Ctrl-<arrow> */ |
1768 | static void ctrl_left(void) | 1768 | static void ctrl_left(void) |
@@ -1863,7 +1863,7 @@ static void ask_terminal(void) | |||
1863 | } | 1863 | } |
1864 | } | 1864 | } |
1865 | #else | 1865 | #else |
1866 | #define ask_terminal() ((void)0) | 1866 | # define ask_terminal() ((void)0) |
1867 | #endif | 1867 | #endif |
1868 | 1868 | ||
1869 | /* Note about multi-line PS1 (e.g. "\n\w \u@\h\n> ") and prompt redrawing: | 1869 | /* Note about multi-line PS1 (e.g. "\n\w \u@\h\n> ") and prompt redrawing: |
@@ -2057,7 +2057,7 @@ static void parse_and_put_prompt(const char *prmt_ptr) | |||
2057 | if (c == '\n') | 2057 | if (c == '\n') |
2058 | cmdedit_prmt_len = 0; | 2058 | cmdedit_prmt_len = 0; |
2059 | else if (flg_not_length != ']') { | 2059 | else if (flg_not_length != ']') { |
2060 | #if ENABLE_UNICODE_SUPPORT | 2060 | # if ENABLE_UNICODE_SUPPORT |
2061 | if (n == 1) { | 2061 | if (n == 1) { |
2062 | /* Only count single-byte characters and the first of multi-byte characters */ | 2062 | /* Only count single-byte characters and the first of multi-byte characters */ |
2063 | if ((unsigned char)*pbuf < 0x80 /* single byte character */ | 2063 | if ((unsigned char)*pbuf < 0x80 /* single byte character */ |
@@ -2068,9 +2068,9 @@ static void parse_and_put_prompt(const char *prmt_ptr) | |||
2068 | } else { | 2068 | } else { |
2069 | cmdedit_prmt_len += unicode_strwidth(pbuf); | 2069 | cmdedit_prmt_len += unicode_strwidth(pbuf); |
2070 | } | 2070 | } |
2071 | #else | 2071 | # else |
2072 | cmdedit_prmt_len += n; | 2072 | cmdedit_prmt_len += n; |
2073 | #endif | 2073 | # endif |
2074 | } | 2074 | } |
2075 | } | 2075 | } |
2076 | prmt_mem_ptr = strcat(xrealloc(prmt_mem_ptr, prmt_size+1), pbuf); | 2076 | prmt_mem_ptr = strcat(xrealloc(prmt_mem_ptr, prmt_size+1), pbuf); |
@@ -2297,7 +2297,7 @@ static int32_t reverse_i_search(int timeout) | |||
2297 | } | 2297 | } |
2298 | 2298 | ||
2299 | /* Append this char */ | 2299 | /* Append this char */ |
2300 | #if ENABLE_UNICODE_SUPPORT | 2300 | # if ENABLE_UNICODE_SUPPORT |
2301 | if (unicode_status == UNICODE_ON) { | 2301 | if (unicode_status == UNICODE_ON) { |
2302 | mbstate_t mbstate = { 0 }; | 2302 | mbstate_t mbstate = { 0 }; |
2303 | char buf[MB_CUR_MAX + 1]; | 2303 | char buf[MB_CUR_MAX + 1]; |
@@ -2308,7 +2308,7 @@ static int32_t reverse_i_search(int timeout) | |||
2308 | strcpy(match_buf + match_buf_len, buf); | 2308 | strcpy(match_buf + match_buf_len, buf); |
2309 | } | 2309 | } |
2310 | } else | 2310 | } else |
2311 | #endif | 2311 | # endif |
2312 | if (match_buf_len < sizeof(match_buf) - 1) { | 2312 | if (match_buf_len < sizeof(match_buf) - 1) { |
2313 | match_buf[match_buf_len] = ic; | 2313 | match_buf[match_buf_len] = ic; |
2314 | match_buf[match_buf_len + 1] = '\0'; | 2314 | match_buf[match_buf_len + 1] = '\0'; |
@@ -2360,7 +2360,7 @@ static int32_t reverse_i_search(int timeout) | |||
2360 | 2360 | ||
2361 | return ic; | 2361 | return ic; |
2362 | } | 2362 | } |
2363 | #endif | 2363 | #endif /* ENABLE_FEATURE_REVERSE_SEARCH */ |
2364 | 2364 | ||
2365 | #if ENABLE_FEATURE_EDITING_WINCH | 2365 | #if ENABLE_FEATURE_EDITING_WINCH |
2366 | static void sigaction2(int sig, struct sigaction *act) | 2366 | static void sigaction2(int sig, struct sigaction *act) |