Re: paste: treat '\0' delim as empty string

2020-06-26 Thread Richard Ipsum
On Mon, May 11, 2020 at 07:35:43AM +0200, Richard Ipsum wrote: > Hi, > > This patch makes paste treat '\0' in the delim list as an empty string > instead of a null character as per POSIX[1]. > > before: > > % echo -e 'hello\nworld' | ./paste -s -d &

paste: treat '\0' delim as empty string

2020-05-11 Thread Richard Ipsum
Hi, This patch makes paste treat '\0' in the delim list as an empty string instead of a null character as per POSIX[1]. before: % echo -e 'hello\nworld' | ./paste -s -d '\0' - | od -b 000 150 145 154 154 157 000 167 157 162 154 144 012 014 after: % echo -e 'hello\nworl

Re: sort: don't do top level comparison when invoked with -c

2020-03-28 Thread Richard Ipsum
On Mon, Mar 23, 2020 at 09:41:16AM -0600, Todd C. Miller wrote: > GNU sort on Linux behaves the same as the OpenBSD sort when run in > the C locale. > > $ LANG=C sort -c -d -f input.txt > sort: input.txt:2: disorder: - > > $ LANG=C sort -c -d -i input.txt > sort: input.txt:2: disorder: -

sort: don't do top level comparison when invoked with -c

2020-03-23 Thread Richard Ipsum
Hi, I found a bug in OpenBSD's sort utility, related to a previous bug I found.[1] The fix I provided for that bug excluded the top level comparison when -k was in use. Recently I discovered that there are other cases where OpenBSD's sort does not produce the correct results. I've appended these t

sort: do not perform top level comparison if -k supplied with -c

2019-12-28 Thread Richard Ipsum
Hi, I think there may be a bug in OpenBSD's sort utility. The bug is that when -c is used in combination with a key field, a "top level" sort is performed when the key field does not have disorder. This differs from what might be expected and certainly from what occurs with other versions of sort.

libc: getgrnam: save errno before calling `access`

2019-07-02 Thread Richard Ipsum
Hi, I was working on an implementation of chown and got an error when running it on OpenBSD. It looks like a change[1] might have introduced unintended side-effects to getgrnam. Without the patch supplied below some chown implementations may fail with ENOENT when they should succeed. I've tested