[PATCH] tail: remove excessive checks on buffer sizes before printing

2021-06-20 Thread Nikolay Nechaev
: Nikolay Nechaev --- src/tail.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/tail.c b/src/tail.c index ff567560d..44a6e3e68 100644 --- a/src/tail.c +++ b/src/tail.c @@ -579,8 +579,7 @@ file_lines (char const *pretty_filename, int fd, uintmax_t n_lines

[PATCH] tail: remove excessive checks on buffer sizes before printing

2021-06-20 Thread Nikolay Nechaev
: Nikolay Nechaev --- src/tail.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/tail.c b/src/tail.c index ff567560d..44a6e3e68 100644 --- a/src/tail.c +++ b/src/tail.c @@ -579,8 +579,7 @@ file_lines (char const *pretty_filename, int fd, uintmax_t n_lines

Re: [PATCH] tail: remove excessive checks on buffer sizes before printing

2021-06-20 Thread Nikolay Nechaev
On Sunday, 20 June 2021 23:19:12 MSK you wrote: > On 20/06/2021 15:54, Nikolay Nechaev wrote: > > * src/tail.c: remove excessive size checks before calls to > > `xwrite_stdout` > > > > `xwrite_stdout` itself checks if what is to be printed out > > has positive si

Re: pipes that write to a file

2021-06-27 Thread Nikolay Nechaev
amp;2 failed) | sponge f When running this, you will see "ok" in the terminal, if the `#false` line is commented, and "failed" instead, if you uncomment it. There, however, seems to be no such feature in the standard sh shell -- Best wishes, Nikolay Nechaev On Sunday,

[PATCH] maint: factor out the common show_date functionality

2024-05-05 Thread Nikolay Nechaev via GNU coreutils General Discussion
* src/show-date.{h,c}: declaration and definition of show_date * src/du.c: use the common show_date instead of the previous local function. * src/date.c: use the common show_date via a wrapper show_date_helper. * src/local.mk: corresponding adjustments --- src/date.c | 42 +++---

[PATCH 1/2] maint: factor out common macros of stat and printf

2024-05-05 Thread Nikolay Nechaev via GNU coreutils General Discussion
* src/octhexdigits.h: isodigit, hextobin, octtobin macros * src/stat.c, src/printf.c: use octhexdigits.h * src/local.mk: corresponding adjustments --- src/local.mk | 1 + src/octhexdigits.h | 7 +++ src/printf.c | 6 +- src/stat.c | 7 +-- 4 files changed, 10 insert

[PATCH 2/2] maint: rename octhexdigits macros

2024-05-05 Thread Nikolay Nechaev via GNU coreutils General Discussion
isodigit -> isoct; octtobin -> fromoct; hextobin -> fromhex. * src/octhexdigits.h: rename macros * src/stat.c, src/printf.c: use new macros --- src/octhexdigits.h | 9 +++-- src/printf.c | 10 +- src/stat.c | 12 ++-- 3 files changed, 14 insertions(+), 17 deletio