diff options
| author | Ron Yorston <rmy@pobox.com> | 2023-04-13 08:18:53 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2023-04-13 08:47:36 +0100 |
| commit | 5b309426f3a2f4f9dfda29021e45a775a4995003 (patch) | |
| tree | aaf18499d8f1afc8b7f320b11e0c4202b8f966ea /include | |
| parent | 36450cffc837bf934f875643bf5faca69599d8fe (diff) | |
| download | busybox-w32-tab_completion.tar.gz busybox-w32-tab_completion.tar.bz2 busybox-w32-tab_completion.zip | |
hush: code shrinktab_completion
Handle both arrays of builtin as the same type.
function old new delta
ash_command_name - 154 +154
hush_command_name - 97 +97
complete_cmd_dir_file 876 880 +4
ash_builtin_name 17 - -17
hush_builtin_name 38 - -38
------------------------------------------------------------------------------
(add/remove: 2/2 grow/shrink: 1/0 up/down: 255/-55) Total: 200 bytes
In the case where ash is disabled and hush is enabled but with support
for functions disabled this reduces the bloat from 31 to 6 bytes.
(GitHub issue #301)
Signed-off-by: Ron Yorston <rmy@pobox.com>
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h index 66781da4f..f4fc10325 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -1925,9 +1925,9 @@ unsigned size_from_HISTFILESIZE(const char *hp) FAST_FUNC; | |||
| 1925 | # define MAX_HISTORY 0 | 1925 | # define MAX_HISTORY 0 |
| 1926 | # endif | 1926 | # endif |
| 1927 | typedef struct exe_state { | 1927 | typedef struct exe_state { |
| 1928 | int e_type; /* type of tab completion: builtin, alias, function */ | ||
| 1929 | int e_index; /* index of current table entry or hash bucket */ | 1928 | int e_index; /* index of current table entry or hash bucket */ |
| 1930 | # if ENABLE_SHELL_ASH || (ENABLE_SHELL_HUSH && ENABLE_HUSH_FUNCTIONS) | 1929 | # if ENABLE_SHELL_ASH || (ENABLE_SHELL_HUSH && ENABLE_HUSH_FUNCTIONS) |
| 1930 | int e_type; /* type of tab completion: builtin, alias, function */ | ||
| 1931 | void *e_ptr; /* current position in linked list */ | 1931 | void *e_ptr; /* current position in linked list */ |
| 1932 | # endif | 1932 | # endif |
| 1933 | } exe_state; | 1933 | } exe_state; |
