[PATCH] ed: fix line insertion before current line. Closes 15081

2024-07-18 Thread Ron Yorston
-- (add/remove: 0/0 grow/shrink: 1/0 up/down: 18/0) Total: 18 bytes Signed-off-by: Ron Yorston --- editors/ed.c | 2 ++ testsuite/ed.tests | 21 + 2 files changed, 23 insertions

[PATCH] ash: fix parsing of alias expansion + bash features

2024-05-02 Thread Ron Yorston
28 589+561 __pgetc 607 --607 -- (add/remove: 0/1 grow/shrink: 1/0 up/down: 561/-607) Total: -46 bytes Signed-off-by: Ron Yorston --- shell/ash.c | 12 ++-- 1 file

Re: [PATCH v2] fixdep: add fstat error handling

2024-05-01 Thread Ron Yorston
Sam James wrote: >David Leonard writes: >> I worry that the fprintf() may destroy the errno which perror() uses, >> so you could get a random error message. >> Perhaps remove the fprintf(s) completely? Because the context should be >> clear enough from the filename alone that perror displays. >

[PATCH 2/2] libbb: send usage messages to correct stream

2024-04-09 Thread Ron Yorston
bytes Signed-off-by: Avi Halachmi Signed-off-by: Ron Yorston --- libbb/appletlib.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/libbb/appletlib.c b/libbb/appletlib.c index ad373ae1c..d2e5900b5 100644 --- a/libbb/appletlib.c +++ b/libbb

[PATCH 1/2] libbb: use full_write1_str() to shrink busybox_main()

2024-04-09 Thread Ron Yorston
796 760 -36 -- (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-36) Total: -36 bytes Signed-off-by: Ron Yorston --- libbb/appletlib.c | 24 +++- 1 file changed, 11 insertions(+), 13

[PATCH] timeout: allow fractional seconds in timeout values

2024-04-08 Thread Ron Yorston
-- (add/remove: 0/0 grow/shrink: 1/1 up/down: 48/-18) Total: 30 bytes Signed-off-by: Ron Yorston --- coreutils/timeout.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git

[PATCH] ash: move hashvar() calls into findvar()

2024-04-06 Thread Ron Yorston
141 -9 -- (add/remove: 0/0 grow/shrink: 1/4 up/down: 5/-32) Total: -27 bytes Signed-off-by: Ron Yorston --- shell/ash.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git

[PATCH] md5/shaXsum: accept uppercase hex strings

2024-04-03 Thread Ron Yorston
The coreutils versions of md5sum and the like accept uppercase hex strings from checksum files specified with the '-c' option. Use a case-insensitive comparison so BusyBox does the same. Signed-off-by: Ron Yorston --- coreutils/md5_sha1_sum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH] awk: fix segfault when compiled by clang

2024-01-25 Thread Ron Yorston
Rob Landley wrote: >Out of morbid curiosity, why did this message a week ago wind up delivered to >me >through the mailing list (I confirmed I was not personally cc'd on it), but not >wind up in the mailing list web archive? Dunno. I did notice the mailing list archive was unavailable at the

[PATCH] awk: fix segfault when compiled by clang

2024-01-19 Thread Ron Yorston
de so both gcc and clang generate code that works. Signed-off-by: Ron Yorston --- editors/awk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editors/awk.c b/editors/awk.c index aa485c782..0981c6735 100644 --- a/editors/awk.c +++ b/editors/awk.c @@ -3006,7 +3006,7 @@

Re: [PATCH] - vi: Append a newline to opened files that don't already end in one

2024-01-10 Thread Ron Yorston
There was another, similar patch for this issue last year: http://lists.busybox.net/pipermail/busybox/2023-April/090272.html Ron ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

[PATCH] Remove FAST_FUNC from variadic functions

2024-01-02 Thread Ron Yorston
resulting from a default 32-bit build. Signed-off-by: Ron Yorston --- include/libbb.h | 24 libbb/getopt32.c | 4 ++-- libbb/herror_msg.c| 4 ++-- libbb/perror_msg.c| 4 ++-- libbb/verror_msg.c| 6 +++--- libbb/xfuncs_printf.c | 6 +++--- 6 files

[PATCH] Makefile.flags: suppress clang warnings when cross-compiling

2024-01-02 Thread Ron Yorston
Extend the changes introduced by commit b4ef2e3467 (Makefile.flags: suppress some clang-9 warnings) so they also cover the case where clang is used as a cross-compiler. Signed-off-by: Ron Yorston --- Makefile.flags | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: ash: is %builtin in PATH still expected to work?

2023-10-22 Thread Ron Yorston
There was a discussion on the dash mailing list earlier this year: https://www.spinics.net/lists/dash/msg02429.html Cheers, Ron ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: [PATCH] shell: avoid segfault on ${0::0/0~09J}. Closes 15216

2023-08-28 Thread Ron Yorston
Radoslav Kolev wrote: >On 12/29/22 3:45 PM, Ron Yorston wrote: >> Both ash and hush segfault when asked to evaluate ${0::0/0~09J}. > >is there some problem with this patch or another reason it's not applied >yet? Or it just slipped trough the cracks? If so please consider &g

[PATCH] tsort: avoid use-after-free

2023-08-22 Thread Ron Yorston
delta tsort_main 621 596 -25 -- (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-25) Total: -25 bytes Signed-off-by: Ron Yorston --- coreutils/tsort.c | 20

Re: ash builtin sleep behavior

2023-07-22 Thread Ron Yorston
Igor, There have been a number of problems with the sleep built-in. It was recently disabled by this commit: https://git.busybox.net/busybox/commit/?id=5e0411a7fb510b9aecda0a850c76bdd62c50efa4 >ash: disable sleep as builtin, closes 15619 >Has a few annoying problems: >* sleepcmd() ->

[PATCH] tr: display usage for incorrect arguments

2023-04-16 Thread Ron Yorston
-- (add/remove: 0/0 grow/shrink: 1/0 up/down: 3/0) Total: 3 bytes Signed-off-by: Ron Yorston --- coreutils/tr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coreutils/tr.c b/coreutils/tr.c index 1e402dfdb..7fe7f89d5 100644

[PATCH 1/1] ash,hush: tab completion of functions and aliases

2023-04-13 Thread Ron Yorston
38 - -38 -- (add/remove: 2/2 grow/shrink: 0/0 up/down: 169/-55) Total: 114 bytes Signed-off-by: Ron Yorston Signed-off-by: Avi Halachmi --- shell/ash.c | 30

[PATCH 0/1] ash,hush: tab completion of functions and aliases

2023-04-13 Thread Ron Yorston
There follows a patch to add tab completion of functions and aliases to ash and hush. (hush doesn't support aliases, but that's a different issue.) A couple of things: - The code makes repeated passes over the command and alias tables. We don't think this will be a problem in most cases. We

Re: sleep as an ash builtin

2023-04-10 Thread Ron Yorston
Denys Vlasenko wrote: >Fixed. Please try current git. Thanks, Denys. Works now. But... /* Without this, bare "sleep" in ash shows _ash_ --help */ if (ENABLE_ASH_SLEEP && applet_name[0] != 's') { bb_simple_error_msg("sleep: missing operand"); return EXIT_FAILURE; } 'ash'

sleep as an ash builtin

2023-04-03 Thread Ron Yorston
Another thing about sleep as an ash builtin: $ trap 'echo yo' INT $ echo $EPOCHSECONDS; sleep 10; echo $EPOCHSECONDS 1680553805 ^C^C^C^C^Cyo 1680553815 $ No matter how urgently I press Ctrl-C the sleep runs its full course. Ron ___

[PATCH] ash: improve trap and jobs builtins in child shells

2023-03-30 Thread Ron Yorston
/down: 11/-6) Total: 5 bytes Signed-off-by: Ron Yorston --- shell/ash.c| 13 +++-- shell/ash_test/ash-signals/usage.right | 12 shell/ash_test/ash-signals/usage.tests | 12 3 files changed, 31 insertions(+), 6 deletions

[PATCH] ash: make EPOCH variables work if RANDOM is disabled

2023-03-26 Thread Ron Yorston
VDYNAMIC a non-zero value if either EPOCH variables or RANDOM are enabled. Signed-off-by: Ron Yorston --- shell/ash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell/ash.c b/shell/ash.c index 5f8c8ea19..559566b58 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2087,7 +2087,7

[PATCH] lineedit: fix matching of directories when searching PATH

2023-03-24 Thread Ron Yorston
this feature by returning an incorrect length for the array of paths. Fix the length and reinstate matching of subdirectories. Signed-off-by: Ron Yorston --- libbb/lineedit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libbb/lineedit.c b/libbb/lineedit.c index b942f540a

Re: [PATCH] fixdep: avoid underflow when end of entry doesn't coincide with EOF

2023-02-23 Thread Ron Yorston
Bernhard Reutner-Fischer wrote: >Or, of course, just sit down and do a sweeping update >to the current kconfig and bring forward the necessary busybox specific >bits. Maybe someone volunteers to have a look? Xabier Oneca posted an RFC patch set in 2021:

[PATCH] build system: fix linking on Red Hat systems

2022-12-31 Thread Ron Yorston
for 'linux' as well as 'gnu'. Signed-off-by: Ron Yorston --- Makefile.flags | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.flags b/Makefile.flags index 50137a78e..e484ab6c7 100644 --- a/Makefile.flags +++ b/Makefile.flags @@ -186,6 +186,8 @@ endif ifeq

[PATCH] shell: avoid segfault on ${0::0/0~09J}. Closes 15216

2022-12-29 Thread Ron Yorston
. Signed-off-by: Ron Yorston --- shell/math.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/math.c b/shell/math.c index 76d22c9bd..83ef85c0c 100644 --- a/shell/math.c +++ b/shell/math.c @@ -588,7 +588,8 @@ evaluate_string(arith_state_t *math_state, const char *expr

Re: [PATCH] Fix non-Linux builds

2022-10-16 Thread Ron Yorston
Maling list thread prior to commit e3b1a1fd2: http://lists.busybox.net/pipermail/busybox/2011-February/074954.html Ron ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: [PATCH] Fix non-Linux builds

2022-10-16 Thread Ron Yorston
Samuel Thibault wrote: >Ron Yorston, le dim. 16 oct. 2022 08:36:21 +0100, a ecrit: >> PLATFORM_LINUX was removed a couple of years ago by commit 5c69ad0ec >> (build system: drop PLATFORM_LINUX). >> >> It had very little effect back then, now it has none. > >Ah

Re: [PATCH] Fix non-Linux builds

2022-10-16 Thread Ron Yorston
PLATFORM_LINUX was removed a couple of years ago by commit 5c69ad0ec (build system: drop PLATFORM_LINUX). It had very little effect back then, now it has none. Ron ___ busybox mailing list busybox@busybox.net

Re: [PATCH] ash: make 'sleep' a builtin

2022-10-13 Thread Ron Yorston
shawnlandden wrote: >The builtin is exiting ash in two cases: > >1.If no argument is given (also does not print usage of sleep, but ash---look >at how printf handles his) >2.If xatou() interpretation of the number fails. This is a bit more involved >to fix, which is why I didn't send my patch

[PATCH] xxd: avoid use of uninitialised variable

2022-09-28 Thread Ron Yorston
-- (add/remove: 0/0 grow/shrink: 1/0 up/down: 5/0) Total: 5 bytes Signed-off-by: Ron Yorston --- util-linux/hexdump_xxd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util-linux/hexdump_xxd.c b/util-linux/hexdump_xxd.c index 6629407de

[PATCH] libbb: special treatment for aliases of test

2022-08-25 Thread Ron Yorston
69 74 +5 -- (add/remove: 0/0 grow/shrink: 1/0 up/down: 5/0) Total: 5 bytes Signed-off-by: Ron Yorston Reported-by: Harald van Dijk --- applets/applet_tables.c | 4 libbb/appletlib.c

[PATCH] lineedit: get PWD from ash

2022-06-28 Thread Ron Yorston
. function old new delta parse_and_put_prompt 921 904 -17 Signed-off-by: Ron Yorston --- libbb/lineedit.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libbb/lineedit.c b/libbb/lineedit.c index

[PATCH] libbb: make '--help' handling more consistent

2022-05-01 Thread Ron Yorston
old new delta show_usage_if_dash_dash_help 75 69 -6 -- (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-6) Total: -6 bytes Signed-off-by: Ron Yorston --- libbb/appletlib.

[PATCH] ash: avoid some redirection oddities

2022-04-26 Thread Ron Yorston
-45 expredir 225 177 -48 parsefname 206 157 -49 -- (add/remove: 1/1 grow/shrink: 1/3 up/down: 184/-156) Total: 28 bytes Signed-off-b

Re: [PATCH v9] seedrng: import SeedRNG utility for kernel RNG seed files

2022-04-21 Thread Ron Yorston
Jason A. Donenfeld wrote: >Oh interesting. I wonder what's different about your >config/compiler... I guess that means we can change the menuconfig >entry to say (1.8k) instead. My understanding is that the applet sizes reported in config are to be generated by running the make_single_applets.sh

[PATCH] libbb: restore special handling of nomsg errors

2022-04-21 Thread Ron Yorston
/shrink: 2/0 up/down: 14/0) Total: 14 bytes Signed-off-by: Ron Yorston --- libbb/perror_nomsg.c | 4 ++-- libbb/perror_nomsg_and_die.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libbb/perror_nomsg.c b/libbb/perror_nomsg.c index d7d53de44..a2a11cc8e

[PATCH] vi: fix backspace over tab in commands

2022-04-20 Thread Ron Yorston
178 180 +2 -- (add/remove: 0/0 grow/shrink: 1/0 up/down: 2/0) Total: 2 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 3 ++- 1 file changed, 2 insertions

Re: [RFC PATCH SET] build system: update kconfig to bring new features and fixes

2022-04-15 Thread Ron Yorston
It's probably worth pointing out the patches are nearly a year old. I started from BusyBox commit 972e29881, otherwise there were problems applying them. Not to make it too easy for myself, though, I was working on the BusyBox port to Microsoft Windows which I maintain[1]. Naturally this has

Re: [PATCH] Added miscutil/tree.c

2022-04-12 Thread Ron Yorston
Roger Knecht wrote: >+//usage:#define tree_trivial_usage NOUSAGE_STR >+//usage:#define tree_full_usage "" >+ >+//usage:#define find_trivial_usage >+//usage: "[PATH]" >+//usage:#define find_full_usage "\n\n" >+//usage: "Print files and directories in a tree structure." >+//usage:

[PATCH v2] ash,hush: use HOME for tab completion and prompts

2022-03-24 Thread Ron Yorston
before trying the password database: this is what GNU readline does. Signed-off-by: Ron Yorston --- include/libbb.h | 11 +++ libbb/lineedit.c | 12 +++- shell/ash.c | 7 +++ shell/hush.c | 5 ++--- 4 files changed, 19 insertions(+), 16 deletions(-) diff

[PATCH] ash,hush: use HOME for tab completion and prompts

2022-03-22 Thread Ron Yorston
119 126 +7 hush_main 12041211 +7 -- (add/remove: 0/0 grow/shrink: 3/0 up/down: 41/0) Total: 41 bytes Signed-off-by: Ron

[PATCH 2/2] vi: handle autoindent in 'cc' command

2022-03-18 Thread Ron Yorston
char_insert 891 875 -16 -- (add/remove: 0/0 grow/shrink: 2/1 up/down: 67/-16) Total: 51 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 71

[PATCH 1/2] vi: fix regression in autoindent handling

2022-03-18 Thread Ron Yorston
4247 +4 -- (add/remove: 0/0 grow/shrink: 2/0 up/down: 11/0) Total: 11 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/editors

[PATCH 0/2] vi: autoindent fixes

2022-03-18 Thread Ron Yorston
Still dogfooding BusyBox vi I happened upon a regression in autoindent. While investigating that I also found that the 'cc' command didn't handle autoindent properly. Fixes follow. Ron ___ busybox mailing list busybox@busybox.net

[PATCH] vi: improved handling of backspace in replace mode

2022-03-03 Thread Ron Yorston
-- (add/remove: 1/0 grow/shrink: 4/1 up/down: 269/-243) Total: 26 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 24 ++-- 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/editors/vi.c b/editors/vi.c index d37cd48a3..4257c0fdc 100644

[PATCH] cpio: code shrink

2022-02-10 Thread Ron Yorston
Use a generic llist_t to store the names of hardlinked files. function old new delta cpio_o 11401122 -18 Signed-off-by: Ron Yorston --- archival/cpio.c | 18 -- 1 file changed

Re: [PATCH] printf: allow 0 as a flag and allow multiple flags

2021-12-19 Thread Ron Yorston
David Laight wrote: >Or: > tmp = strspn(f, "-+ #0"); > direc_length += tmp - f; > f = tmp; Yes, that seems to work too, and it saves 28 bytes. Though since strspn() returns the length of the initial segment

[PATCH] printf: allow 0 as a flag and allow multiple flags

2021-12-16 Thread Ron Yorston
31 .rodata99281 99282 +1 -- (add/remove: 0/0 grow/shrink: 2/0 up/down: 32/0) Total: 32 bytes Signed-off-by: Ron Yorston --- coreutils/printf.c | 8 +--- testsuite/printf.tests | 10 +++

Re: [PATCH] wget: implement --post-file

2021-10-01 Thread Ron Yorston
Denys wrote: >> #if ENABLE_FEATURE_CLEAN_UP && ENABLE_FEATURE_WGET_LONG_OPTIONS >> free(G.extra_headers); >> + free(G.post_data); >> + free(G.post_file); > > >This is wrong, isn't it? G.post_file is not malloced. >G.post_data is not always allocated. Yes, it's wrong. Sorry.

[PATCH] wget: implement --post-file

2021-09-28 Thread Ron Yorston
-- (add/remove: 0/0 grow/shrink: 4/0 up/down: 126/0) Total: 126 bytes Signed-off-by: Ron Yorston --- networking/wget.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/networking/wget.c b/networking/wget.c

[PATCH] cal: implement -m

2021-09-21 Thread Ron Yorston
) Total: 69 bytes Signed-off-by: Ron Yorston --- util-linux/cal.c | 38 +- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/util-linux/cal.c b/util-linux/cal.c index 006bc817b..6ba6ebf98 100644 --- a/util-linux/cal.c +++ b/util-linux/cal.c @@ -27,10

[PATCH v2] libbb: code shrink parse_datestr (again)

2021-09-18 Thread Ron Yorston
before a declaration. Make it happy. Signed-off-by: Ron Yorston --- libbb/time.c | 15 +-- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/libbb/time.c b/libbb/time.c index 41a69c754..48c16e5f1 100644 --- a/libbb/time.c +++ b/libbb/time.c @@ -13,6 +13,7 @@ int

[PATCH] libbb: code shrink parse_datestr (again)

2021-09-18 Thread Ron Yorston
parse_datestr730 687 -43 -- (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-43) Total: -43 bytes Signed-off-by: Ron Yorston --- libbb/time.c | 12 +++- 1

[PATCH] libbb: ensure mode_string is NUL terminated

2021-09-17 Thread Ron Yorston
-- (add/remove: 0/0 grow/shrink: 1/0 up/down: 11/0) Total: 11 bytes Signed-off-by: Ron Yorston --- libbb/mode_string.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/libbb/mode_string.c b/libbb/mode_string.c index 2b829016f..39a655d35

[PATCH] date,touch: allow timezone offsets in dates

2021-09-16 Thread Ron Yorston
-- (add/remove: 0/0 grow/shrink: 4/0 up/down: 141/0) Total: 141 bytes Signed-off-by: Ron Yorston --- coreutils/date.c | 7 --- coreutils/touch.c| 6 -- include/libbb.h | 2 +- libbb/Config.src | 11 +++ libbb/time.c

[PATCH] libbb: code shrink parse_datestr

2021-09-14 Thread Ron Yorston
-- (add/remove: 1/0 grow/shrink: 0/2 up/down: 106/-395) Total: -289 bytes Signed-off-by: Ron Yorston --- libbb/time.c | 49 ++--- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/libbb/time.c b

[PATCH] getopt: code shrink

2021-09-12 Thread Ron Yorston
-- (add/remove: 0/0 grow/shrink: 1/2 up/down: 13/-88)Total: -75 bytes Signed-off-by: Ron Yorston --- util-linux/getopt.c | 45 + 1 file changed, 17 insertions(+), 28

[PATCH 2/3] ash: stopped jobs should only prevent exit from interactive shell

2021-09-12 Thread Ron Yorston
When the user tries to exit an interactive shell with stopped jobs present the shell issues a warning and only exits if the user insists by trying to exit again. This shouldn't apply to non-interactive shells. Reported-by: Roberto A. Foglietta Signed-off-by: Ron Yorston --- shell/ash.c | 2

[PATCH 1/3] ash: fix ignoreeof option

2021-09-12 Thread Ron Yorston
587 -18 -- (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-18) Total: -18 bytes Signed-off-by: Ron Yorston --- shell/ash.c | 22 +++--- 1 file changed, 3 insertions(+), 19 deletions(

[PATCH 0/3] ash: ignoreeof and interactive vs. non-interactive shells

2021-09-12 Thread Ron Yorston
I was holding back my fix for ignoreeof (broken since 2008!) to see what upstream dash thought about my changes to EOF handling. However, it's required to address the problem with stopped jobs preventing non-interactive shells from exiting, so here it is. I've also pulled in a patch from Harald

Re: A stopped job make ash ignores exit

2021-09-12 Thread Ron Yorston
Roberto wrote: > IMHO this line > >> + if (iflag || job_warning) >> goto out; > > should be modified in this way > >> + if (!iflag || job_warning) >> goto out; > > Non-interactive shells should not care about stopped jobs but >interactive shells do as

Re: A stopped job make ash ignores exit

2021-09-12 Thread Ron Yorston
Roberto A. Foglietta wrote: > I found a case in which IMHO the ash does not behave as expected by a shell. > When there is a stopped job the exit command is ignored but it should not. > At least bash does not ignore the exit if a stopped job exists. Warning about stopped jobs is OK in an

[PATCH] awk: fix read beyond end of buffer

2021-09-09 Thread Ron Yorston
n result in failures depending on the value of that character. function old new delta awk_printf 736 706 -30 Signed-off-by: Ron Yorston --- editors/awk.c | 24 +--- 1 file cha

[PATCH] ash: regressions in process substitution

2021-08-30 Thread Ron Yorston
28 - -28 pushredir112 --112 -- (add/remove: 1/2 grow/shrink: 2/1 up/down: 137/-147) Total: -10 bytes Signed-off-by: Ron Yorston --- she

Re: /bin/sh hang in some circonstance

2021-08-30 Thread Ron Yorston
Stacy Harper wrote: >Shell will hang on this simple script : Yes, I can reproduce it. >I already bisected git and it looks that the first commit that >got the issue is : > >a1b0d3856d9a0419cb74bf4c87525265871b5868 > >ash: add process substitution in bash-compatibility mode One of mine. It's

[PATCH 1/1] vi: further changes to colon addresses

2021-08-29 Thread Ron Yorston
99348 99253 -95 -- (add/remove: 0/0 grow/shrink: 1/1 up/down: 40/-95)Total: -55 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 132 --- 1 file changed, 83

[PATCH 0/1] vi: further changes to colon addresses

2021-08-29 Thread Ron Yorston
In the original vi source from the second BSD there's a comment: * If you are tricky you can use this routine and the = command * to do simple addition and subtraction of cardinals less * than the number of lines in the file. Thus: vi README - README 1/204 0% :1+2+3= 6 :1 2 3=

[PATCH] tar,smemcap: silence compiler warning

2021-08-22 Thread Ron Yorston
gcc 11.2.1 complains that the tar header checksum might overflow the checksum field. It won't and using an unsigned int for the calculation seems to convince the compiler too. Signed-off-by: Ron Yorston --- archival/chksum_and_xwrite_tar_header.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] vi: code shrink print_literal()

2021-08-21 Thread Ron Yorston
delta not_implemented 199 108 -91 -- (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-91) Total: -91 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 19

[PATCH] vi: searches in colon commands should wrap

2021-08-21 Thread Ron Yorston
/shrink: 1/0 up/down: 44/0) Total: 44 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/editors/vi.c b/editors/vi.c index 3e1bd0820..126780175 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2526,8 +2526,13

[PATCH] rev: correct output for long input lines

2021-08-21 Thread Ron Yorston
delta rev_main 377 368 -9 -- (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-9) Total: -9 bytes Signed-off-by: Ron Yorston --- testsuite/rev.tests | 46

[PATCH] vi: don't right shift empty lines

2021-08-20 Thread Ron Yorston
ove: 0/0 grow/shrink: 1/0 up/down: 34/0) Total: 34 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editors/vi.c b/editors/vi.c index 3e1bd0820..6f8a87b70 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -408

[PATCH 2/2] vi: support ~/.exrc

2021-08-19 Thread Ron Yorston
-- (add/remove: 0/0 grow/shrink: 3/1 up/down: 207/-10) Total: 197 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 40 1 file changed, 32 insertions(+), 8 deletions(-) diff

[PATCH 1/2] vi: changes to handling of -c and EXINIT

2021-08-19 Thread Ron Yorston
816 764 -52 -- (add/remove: 1/0 grow/shrink: 1/2 up/down: 78/-89)Total: -11 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 123 +++ 1 file

[PATCH 0/2] vi: initialisation commands

2021-08-19 Thread Ron Yorston
Here are some modifications to how BusyBox vi handles initialisation commands: -c, EXINIT and .exrc. Ron ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

Re: six patches from tinycore linux

2021-08-12 Thread Ron Yorston
Roberto A. Foglietta wrote: >Who is in charge of evaluating patch application? The 'About BusyBox' page on the website says: BusyBox is maintained by Denys Vlasenko [vda.li...@googlemail.com] Cheers, Ron ___ busybox mailing list busybox@busybox.net

Re: six patches from tinycore linux

2021-08-12 Thread Ron Yorston
Roberto A. Foglietta wrote: >Hi Ron, > > what's about the other five? Well, I can see that they haven't been applied. But other than that I have no particular insight. Ron ___ busybox mailing list busybox@busybox.net

Re: six patches from tinycore linux

2021-08-10 Thread Ron Yorston
Hi Roberto, >busybox-1.31.1-vi.backward_search.patch This one has been applied as commit 51358757c7 (vi: fix backward search with GNU regex). Cheers, Ron ___ busybox mailing list busybox@busybox.net http://lists.busybox.net/mailman/listinfo/busybox

[PATCH] cp: fix build failure with long options disabled

2021-08-10 Thread Ron Yorston
When long options were disabled cp failed to compile with: coreutils/cp.c:130:9: error: empty enum is invalid 130 | }; | ^ Rearrange the conditional compilation to suit. Signed-off-by: Ron Yorston --- coreutils/cp.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions

Re: [PATCH 1/1] rev: handle cases where lines are too long for buffer

2021-08-09 Thread Ron Yorston
Or how about this? Ron --- util-linux/rev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/util-linux/rev.c b/util-linux/rev.c index d439b4da8..63b005c67 100644 --- a/util-linux/rev.c +++ b/util-linux/rev.c @@ -109,6 +109,7 @@ int rev_main(int argc UNUSED_PARAM, char **argv)

[PATCH v2] shuf: speed-up when limited output is requested

2021-08-07 Thread Ron Yorston
outlines; - shuffle_lines() can be called unconditionally. Update timing to allow for the 13 million seconds elapsed since v1. Signed-off-by: Ron Yorston --- coreutils/shuf.c | 27 ++- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/coreu

[PATCH] libbb: better coreutils compatibility for realpath

2021-07-31 Thread Ron Yorston
to the path so error messages from the caller show the original filename. function old new delta xmalloc_realpath_coreutils 214 313 +99 Signed-off-by: Ron Yorston --- include/libbb.h | 2 +- libbb

Re: [PATCH] ash: improve speed of variable pattern substitution

2021-07-23 Thread Ron Yorston
I see that Denys has applied a smaller and tidier alternative to my attempt at a patch. I note: - The speed up is still only applied if a non-default build option is selected so there's no change in the size of a default build. - The slower search is used if any special characters are present

[PATCH] ash: improve speed of variable pattern substitution

2021-07-21 Thread Ron Yorston
1099 987-112 -- (add/remove: 1/0 grow/shrink: 1/1 up/down: 295/-112) Total: 183 bytes Signed-off-by: Ron Yorston --- shell/ash.c | 54

Re: ash ${str/find/repl} performance

2021-07-21 Thread Ron Yorston
I wrote: >It would be possible to use a more efficient approach when the pattern >is known to have no special characters. But that would require more >code. To quantify this I made a patch which handles the special case of patterns that don't require globbing. The feature is controlled by the

Re: ash ${str/find/repl} performance

2021-07-20 Thread Ron Yorston
Alin Mr wrote: >It seems that bash-like pattern substitution is surprisingly slow. The relevant code is scanright() and the code around its first call in subevalvar(). It assumes the search string might contain special characters. So for x="root:x:0:0:root:/root:/bin/bash" and ${x//:/|} it

Re: Why busybox ash do not support $[ ] for math?

2021-07-18 Thread Ron Yorston
Roberto A. Foglietta wrote: > why busybox ash do not support $[ ] for math? > Possibly because original ash does not support it but bash only? > Have you ever thought about adding this feature or $(( )) is enough? The $[...] form of arithmetic expansion has been deprecated since bash 2.0. It

Re: [PATCH] vi: fix regex search compilation error

2021-07-14 Thread Ron Yorston
Bernhard Reutner-Fischer wrote: >ah oh in the old code we double increment (only) if the first was a >backslash _not_ followed by a nul. >hmz. So is there a more elegant way to express that which i don't see >right now? I suspect the inelegance is inherent. Here's the current code: 1

Re: [PATCH] vi: fix regex search compilation error

2021-07-13 Thread Ron Yorston
Bernhard Reutner-Fischer wrote: >If i'm not mistaken, the s++ is fully redundant here although it seems >that my gcc-11 does not optimize it like if we manually spell it out >like in the attached? I don't think it's possible to avoid two increments. When a backslash is detected we want to move

[PATCH] vi: fix regex search compilation error

2021-07-13 Thread Ron Yorston
Building with FEATURE_VI_REGEX_SEARCH enabled fails. Signed-off-by: Ron Yorston --- editors/vi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editors/vi.c b/editors/vi.c index 5c601c759..a4b958734 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -2684,7 +2684,7 @@ static

Re: [PATCH] vi: fix undo when ':s' replacement string is empty

2021-07-13 Thread Ron Yorston
Denys Vlasenko wrote: >I missed this one, and then this part was rewritten in >"allow regular expressions in ':s' commands". >Sorry about the mess. No worries. Looks OK at first glance, though only time and continued dogfooding of BusyBox vi will tell. I think we may have ended up with a

[PATCH] vi: allow delimiter in ':s' to be escaped

2021-07-10 Thread Ron Yorston
-- (add/remove: 1/0 grow/shrink: 0/1 up/down: 38/-5) Total: 33 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/editors/vi.c b

Re: awk error as of git / today

2021-07-09 Thread Ron Yorston
Steffen Nurpmeso wrote: > $ AWK="/home/steffen/usr-kent-linux-x86_64/bin/busybox awk" \ >dash mdocmx.sh mdocmx.1|wc -l > 27 Commit 08ca313d7 (awk: simplify tests for operation class) replaced tests for operation classes with simple equality tests. It seems this doesn't work for

[PATCH] vi: allow 'gg' to specify a range

2021-07-07 Thread Ron Yorston
: 2/0 up/down: 9/0) Total: 9 bytes Signed-off-by: Ron Yorston --- editors/vi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editors/vi.c b/editors/vi.c index f779507fc..f830368c2 100644 --- a/editors/vi.c +++ b/editors/vi.c @@ -3539,7 +3539,7 @@ static int

[PATCH] vi: improve handling of anchored searches

2021-07-06 Thread Ron Yorston
disabled. When it's enabled: function old new delta char_search 247 285 +38 Signed-off-by: Ron Yorston --- editors/vi.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/editors/vi.c b/editors/vi.c index 3e91fefbc..f779507fc 10064

[PATCH v2 2/2] vi: allow regular expressions in ':s' commands

2021-07-02 Thread Ron Yorston
) Total: 364 bytes v2: Rebase. Code shrink. Ensure empty replacement string is null terminated. Signed-off-by: Andrey Dobrovolsky Signed-off-by: Ron Yorston --- editors/vi.c | 126 +-- 1 file changed, 112 insertions(+), 14 deletions

[PATCH v2 1/2] vi: use basic regular expressions for search

2021-07-02 Thread Ron Yorston
is enabled: function old new delta -- (add/remove: 0/0 grow/shrink: 0/0 up/down: 0/0) Total: 0 bytes Signed-off-by: Andrey Dobrovolsky Signed-off-by: Ron

  1   2   3   4   5   6   >