Re: [hackers] [libzahl] Switch to ISC license. || Mattias Andrée

2016-06-02 Thread Mattias Andrée
On Thu, 2 Jun 2016 22:20:42 +0200 FRIGN <d...@frign.de> wrote: > On Thu, 2 Jun 2016 22:01:47 +0200 > Mattias Andrée <maand...@kth.se> wrote: > > Hey Mattias, > > > Do you think anyone have choked on pastries before and > > sued? Do most countries actual

Re: [hackers] [libzahl] Switch to ISC license. || Mattias Andrée

2016-06-02 Thread Mattias Andrée
On Thu, 2 Jun 2016 15:30:20 -0400 Wolfgang Corcoran-Mathe <w...@sigwinch.xyz> wrote: > From: Wolfgang Corcoran-Mathe <w...@sigwinch.xyz> > To: hackers mail list <hackers@suckless.org> > Cc: > Bcc: > Subject: Re: [hackers] [libzahl] Switch to ISC l

Re: [hackers] [swerc] local suckless.org copyright notice || Anselm R Garbe

2016-06-13 Thread Mattias Andrée
On Mon, 13 Jun 2016 16:35:34 +0200 FRIGN wrote: > On Mon, 13 Jun 2016 14:17:01 +0200 (CEST) > g...@suckless.org wrote: > > > -2006-2013 suckless.org community | > href="http://garbe.us/Contact;>Impressum > > +2006-2015 suckless.org community | >

Re: [hackers] [libzahl] Switch to ISC license. || Mattias Andrée

2016-06-02 Thread Mattias Andrée
On Thu, 2 Jun 2016 16:47:40 +0200 FRIGN <d...@frign.de> wrote: > On Thu, 2 Jun 2016 12:54:39 +0200 > Mattias Andrée <maand...@kth.se> wrote: > > Hey Mattias, > > > I generally think licenses are easier to grok > > if they are long. They omit less inform

Re: [hackers] [libzahl] Switch to ISC license. || Mattias Andrée

2016-06-02 Thread Mattias Andrée
On Thu, 2 Jun 2016 17:10:29 +0200 Mattias Andrée <maand...@kth.se> wrote: > On Thu, 2 Jun 2016 16:47:40 +0200 > FRIGN <d...@frign.de> wrote: > > > On Thu, 2 Jun 2016 12:54:39 +0200 > > Mattias Andrée <maand...@kth.se> wrote: > > > > H

Re: [hackers] [libzahl] Add a number of man pages || Mattias Andrée

2016-02-29 Thread Mattias Andrée
On Mon, 29 Feb 2016 16:31:09 +0100 FRIGN wrote: > On Mon, 29 Feb 2016 15:34:42 +0100 (CET) > g...@suckless.org wrote: > > > Add a number of man pages > > I swear to you, you are the only guy I know who writes > the manuals before the code. > Actually, I have already

[hackers] [sbase][PATCH] diff: minor simplification, and fix exit value bug

2016-03-10 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- diff.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/diff.c b/diff.c index 1bc7ada..8abcbcd 100644 --- a/diff.c +++ b/diff.c @@ -1211,7 +1211,7 @@ load_lines(const char *pathname) rc->at

Re: [hackers] [sbase] xargs(1) already supports NUL characters || FRIGN

2016-03-10 Thread Mattias Andrée
I was just about to fix all of these. Good thing I only had time to fix uniq(1). pgpr0sYlmSgJQ.pgp Description: OpenPGP digital signature

Re: [hackers] [sbase][PATCH] Realloc variants should not fail if the requested size is zero

2016-03-19 Thread Mattias Andrée
Did not realise that it was implementation-specific. Never mind then, I will call free explicitly. On Thu, 17 Mar 2016 09:58:31 + Dimitris Papastamos <s...@2f30.org> wrote: > On Thu, Mar 17, 2016 at 10:11:02AM +0100, Mattias Andrée > wrote: > > Signed-off-by: Mattias André

[hackers] [sbase][PATCH] Update test.1:

2016-03-28 Thread Mattias Andrée
Document -ef, -ot, and -nt. -k was already documented somewhy it seems... Signed-off-by: Mattias Andrée <maand...@kth.se> --- test.1 | 11 +++ 1 file changed, 11 insertions(+) diff --git a/test.1 b/test.1 index 539016a..99e8832 100644 --- a/test.1 +++ b/test.1 @@ -102,6 +

[hackers] [sbase][PATCH] Add base64(1), base32(1), and base16(1)

2016-03-29 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 3 + README | 3 + base16.1 | 40 base16.c | 168 + base32.1 | 40 base32.c

[hackers] [sbase][PATCH] shuf: fix possible infinite loop

2016-03-30 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- shuf.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/shuf.c b/shuf.c index a325bb2..51eeecd 100644 --- a/shuf.c +++ b/shuf.c @@ -44,8 +44,7 @@ random_byte_libc(void) static size_t random_int(size

Re: [hackers] [sbase][PATCH] Improvements to sleep(1):

2016-03-30 Thread Mattias Andrée
On Sat, 26 Mar 2016 18:35:44 + Dimitris Papastamos <s...@2f30.org> wrote: > On Sat, Mar 26, 2016 at 06:31:57PM +0100, Mattias Andrée > wrote: > > - Add support for floating pointer numbers, > > which you will find in other implementations. > > > >

[hackers] [sbase][PATCH] grep: remove = flag from readme

2016-03-30 Thread Mattias Andrée
$ echo äö | ./grep [å] äö This is not want one expects from a program that supports UTF-8. Signed-off-by: Mattias Andrée <maand...@kth.se> --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index d60d8fc..bea2b0f 100644 --- a/README +++ b/

[hackers] [sbase][PATCH] grep -r: avoid loops

2016-03-30 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- grep.c | 68 -- 1 file changed, 62 insertions(+), 6 deletions(-) diff --git a/grep.c b/grep.c index fadd661..0f50cc2 100644 --- a/grep.c +++ b/grep.c @@ -33,6 +33,16 @@ stat

[hackers] [sbase][PATCH v2] test: -erwx test against effetive uid/gid, not real

2016-03-30 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- test.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test.c b/test.c index 3fe12c3..6045e4e 100644 --- a/test.c +++ b/test.c @@ -2,6 +2,7 @@ #include #include +#include #include #include @@

[hackers] [sbase][PATCH] test: -erwx test against effetive uid/gid, not real

2016-03-30 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- test.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test.c b/test.c index 3fe12c3..11974b8 100644 --- a/test.c +++ b/test.c @@ -71,10 +71,10 @@ static int unary_u(char *s) { struct stat buf; if ( stat(s, ))

Re: [hackers] [libzahl] gitignore: blacklist _/, for private files || Mattias Andrée

2016-04-08 Thread Mattias Andrée
On Fri, 8 Apr 2016 15:02:03 +0200 Markus Teich wrote: > g...@suckless.org wrote: > > gitignore: blacklist _/, for private files > > Heyho, > > you should not push such ignores for private files to the > repositories. Just use the .git/info/exclude file which >

[hackers] [sbase][PATCH] Realloc variants should not fail if the requested size is zero

2016-03-19 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- libutil/ealloc.c | 2 +- libutil/reallocarray.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libutil/ealloc.c b/libutil/ealloc.c index 320865d..5a3cce1 100644 --- a/libutil/ealloc.c +++ b/libutil/ealloc.c @@

[hackers] [sbase][PATCH] Add patch(1)

2016-03-23 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile |2 + README |1 + TODO |1 - libutil/asprintf.c | 74 +++ libutil/getlines.c | 18 +- patch.1| 250 +++ patch.c

[hackers] [sbase][PATCH] basename, dirname, printf: recognise -- and fail if options are used.

2016-03-25 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- basename.c | 5 - dirname.c | 6 +- printf.c | 12 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/basename.c b/basename.c index 4a6ac2a..94a2848 100644 --- a/basename.c +++ b/basename.c @@ -17,7

[hackers] [ubase][PATCH] Makefile: add pwdx.1

2016-03-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 92d61ab..5045cbb 100644 --- a/Makefile +++ b/Makefile @@ -106,6 +106,7 @@ MAN1 = \ passwd.1\ pidof.1 \

[hackers] [ubase][PATCH] fsfreeze: make it clear the either -f or -u must be specified, not optional

2016-03-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- fsfreeze.8 | 4 ++-- fsfreeze.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fsfreeze.8 b/fsfreeze.8 index 576814d..4b48982 100644 --- a/fsfreeze.8 +++ b/fsfreeze.8 @@ -1,4 +1,4 @@ -.Dd February 2, 2015 +.Dd Ma

[hackers] [sbase][PATCH] Add tac(1)

2016-03-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 1 + README | 1 + libutil/getlines.c | 3 ++- tac.1 | 20 tac.c | 69 ++ text.h | 3 ++- 6

[hackers] [ubase][PATCH] Add nologin(8)

2016-03-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 2 ++ nologin.8 | 21 + nologin.c | 22 ++ 3 files changed, 45 insertions(+) create mode 100644 nologin.8 create mode 100644 nologin.c diff --git a/Makefile b/Makefile index 4

[hackers] [ubase][PATCH] pwdx: fix off-by-one bug

2016-03-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- pwdx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwdx.c b/pwdx.c index 57adc72..b169d75 100644 --- a/pwdx.c +++ b/pwdx.c @@ -31,7 +31,7 @@ main(int argc, char *argv[]) for (; argc > 0; arg

[hackers] [sbase][PATCH] Add shuf(1)

2016-03-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 1 + README | 1 + shuf.1 | 26 +++ shuf.c | 149 +++ 4 files changed, 177 insertions(+) create mode 100644 shuf.1 create mode 100644 shuf.c diff

[hackers] [sbase][PATCH] rm.1: list shred(1) under see also

2016-03-27 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- rm.1 | 1 + 1 file changed, 1 insertion(+) diff --git a/rm.1 b/rm.1 index 831a6e4..fafa49c 100644 --- a/rm.1 +++ b/rm.1 @@ -32,6 +32,7 @@ doesn't exist or couldn't be removed. Remove directories recursively. .El .Sh SEE ALSO +.Xr s

[hackers] [ubase][PATCH] Add shred(1)

2016-03-27 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 2 + config.def.h | 1 + shred.1 | 66 shred.c | 332 +++ 4 files changed, 401 insertions(+) create mode 100644 shred.1 create mode

[hackers] [sbase][PATCH] shuf.1 and sort.1: reference each other under see also

2016-03-27 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- shuf.1 | 2 ++ sort.1 | 2 ++ 2 files changed, 4 insertions(+) diff --git a/shuf.1 b/shuf.1 index ce0dcd0..05bc830 100644 --- a/shuf.1 +++ b/shuf.1 @@ -24,3 +24,5 @@ Output random lines ad infinitum. Get random bytes from .Ar source

[hackers] [sbase][PATCH] ls: fix segfault when timestamp is negative

2016-03-27 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- ls.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ls.c b/ls.c index 3268a99..8a9210c 100644 --- a/ls.c +++ b/ls.c @@ -194,7 +194,10 @@ output(const struct entry *ent) else fmt = "

Re: [hackers] [ubase][PATCH] Add pwdx(1)

2016-03-26 Thread Mattias Andrée
On Sat, 26 Mar 2016 12:34:52 +0100 Hiltjo Posthuma wrote: > On Sat, Mar 26, 2016 at 12:30:50AM +0100, Mattias Andr??e > wrote: > > Signed-off-by: Mattias Andr??e > > diff --git a/pwdx.c b/pwdx.c > > new file mode 100644 > > index 000..b9836b7 > > ---

[hackers] [ubase][PATCH v2] Add pwdx(1)

2016-03-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 2 ++ TODO | 1 - pwdx.1 | 13 + pwdx.c | 51 +++ 4 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 pwdx.1 create mode 100644 pwdx.c diff

[hackers] [sbase][PATCH v2] ls: fix segfault when timestamp is negative

2016-03-27 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- ls.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ls.c b/ls.c index 3268a99..a7fd97f 100644 --- a/ls.c +++ b/ls.c @@ -118,6 +118,7 @@ output(const struct entry *ent) { struct group *gr; struct

Re: [hackers] [sbase] ls: fix segfault when timestamp is negative

2016-03-27 Thread Mattias Andrée
On Sun, 27 Mar 2016 14:30:35 +0100 Connor Lane Smith <c...@lubutu.com> wrote: > On 27 March 2016 at 14:20, Mattias Andrée > <maand...@kth.se> wrote: > > The timestamp happened to be negative > > which caused strftime (glibc) in ls to segfault. > >

[hackers] [sbase][PATCH v2.2] ls: fix segfault when timestamp is out of range for struct tm

2016-03-27 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- ls.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ls.c b/ls.c index 3268a99..8cc285b 100644 --- a/ls.c +++ b/ls.c @@ -118,6 +118,7 @@ output(const struct entry *ent) { struct group *gr; struct

[hackers] [sbase][PATCH] patch: fix bug

2016-03-23 Thread Mattias Andrée
Well this is embarrassing... I never compiled it without -Og, it turns out the program segfaults immediately without because of an uninitialised variable. --- patch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patch.c b/patch.c index 7017147..ee84a0f 100644 --- a/patch.c

[hackers] [sbase][PATCH 2/2] test: add support for big integers

2016-03-24 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- test.c | 51 --- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/test.c b/test.c index 508e3a6..d5f167a 100644 --- a/test.c +++ b/test.c @@ -1,11 +1,48 @@ /* See LICENS

[hackers] [sbase][PATCH 1/2] test: add -k, -ef, -ot, and -nt

2016-03-24 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- test.c | 41 + 1 file changed, 41 insertions(+) diff --git a/test.c b/test.c index 6acec0c..508e3a6 100644 --- a/test.c +++ b/test.c @@ -7,12 +7,25 @@ #define STOI(s) enstrtonum(2, s, LLO

[hackers] [sbase][PATCH] Add rev(1)

2016-03-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 1 + README | 1 + rev.1| 22 +++ rev.c| 74 4 files changed, 98 insertions(+) create mode 100644 rev.1 create mode 100644 rev.c

Re: [hackers] [sbase][PATCH] Improvements to sleep(1):

2016-03-26 Thread Mattias Andrée
On Sat, 26 Mar 2016 18:35:44 + Dimitris Papastamos <s...@2f30.org> wrote: > On Sat, Mar 26, 2016 at 06:31:57PM +0100, Mattias Andrée > wrote: > > - Add support for floating pointer numbers, > > which you will find in other implementations. > > > >

[hackers] [sbase][PATCH] Add see also section to cat.1 and tac.1

2016-03-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- cat.1 | 3 +++ tac.1 | 2 ++ 2 files changed, 5 insertions(+) diff --git a/cat.1 b/cat.1 index 9b67e8f..52d9ad5 100644 --- a/cat.1 +++ b/cat.1 @@ -22,6 +22,9 @@ reads from stdin. .It Fl u Unbuffered output. .El +.Sh SEE ALSO +.Xr

[hackers] [sbase][PATCH] Improvements to sleep(1):

2016-03-26 Thread Mattias Andrée
-off-by: Mattias Andrée <maand...@kth.se> --- sleep.1 | 27 +- sleep.c | 79 ++--- 2 files changed, 92 insertions(+), 14 deletions(-) diff --git a/sleep.1 b/sleep.1 index 2b78bfb..66c71c0 100644 --- a/sleep.1 +++ b

Re: [hackers] [libzahl] Fix example in comments

2016-03-07 Thread Mattias Andrée
On Mon, 7 Mar 2016 14:08:04 +0200 Vasily Kolobkov wrote: > From 9677f7bf03f91966a5118033a7fdcb641c1dc935 Mon Sep 17 > 00:00:00 2001 From: Vasily Kolobkov <> > Date: Mon, 7 Mar 2016 14:00:06 +0200 > Subject: [PATCH] Attune example to classical axiomatics > > --- >

Re: [hackers] [libzahl] Fix example in comments

2016-03-07 Thread Mattias Andrée
On Mon, 7 Mar 2016 14:48:12 +0200 Vasily Kolobkov <polezaivs...@openmailbox.org> wrote: > On Mon, Mar 07, 2016 at 01:35:13PM +0100, Mattias Andrée > wrote: > > Sorry, it is correct. 4010 is split to 40⋅10² + 10, and > > 3020 is split to 30⋅10² + 20. 40⋅10² ⋅ 30⋅10² =

Re: [hackers] [libzahl] Fix typo || Mattias Andrée

2016-03-06 Thread Mattias Andrée
On Sun, 6 Mar 2016 16:22:33 -0800 Eric Pruitt wrote: > On Sun, Mar 06, 2016 at 09:49:00PM +0100, > g...@suckless.org wrote: > > + * Basically, this is how you were toughed to > > multiply large numbers > > While you're at it, I think you want "taught" instead of >

[hackers] [sbase][PATCH v4] Add diff(1) and bdiff(1)

2016-03-09 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 12 +- README |2 + TODO |1 - bdiff.1| 84 +++ diff.1 | 107 diff.c | 1460 l

Re: [hackers] [sbase][PATCH] grep: remove = flag from readme

2016-04-03 Thread Mattias Andrée
Perhaps it could be noted. But it fails with both musl and glibc. I think we need new regex engine, perhaps adapted from musl, that supports NUL bytes and UTF-8 transparently. maandree On Sun, 3 Apr 2016 22:30:45 +0200 FRIGN <d...@frign.de> wrote: > On Wed, 30 Mar 2016 19:01:16 +0200

Re: [hackers] [sbase][PATCH] grep: add -r

2016-04-03 Thread Mattias Andrée
On Sun, 3 Apr 2016 22:31:30 +0200 FRIGN <d...@frign.de> wrote: > On Wed, 30 Mar 2016 05:23:08 +0200 > Mattias Andrée <maand...@kth.se> wrote: > > > Unlike your usual grep -r, this implementation > > uses breadth-first search. It usually finds > > makes

Re: [hackers] [sbase][PATCH] grep: remove = flag from readme

2016-04-03 Thread Mattias Andrée
On Sun, 3 Apr 2016 14:55:35 -0700 Eric Pruitt <eric.pru...@gmail.com> wrote: > On Sun, Apr 03, 2016 at 11:50:08PM +0200, Mattias Andrée > wrote: > > That works with musl but not glibc. > > If you use 'setlocale(LC_ALL, "")' with GCC, grep behaves > as exp

Re: [hackers] [sbase][PATCH] grep: remove = flag from readme

2016-04-03 Thread Mattias Andrée
That works with musl but not glibc. On Sun, 3 Apr 2016 23:39:38 +0200 FRIGN <d...@frign.de> wrote: > On Sun, 3 Apr 2016 23:35:21 +0200 > Mattias Andrée <maand...@kth.se> wrote: > > Hey Mattias, > > > Perhaps it could be noted. But it fails > > with b

[hackers] [sbase][PATCH] grep: fix UTF-8 support

2016-04-04 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- grep.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/grep.c b/grep.c index 64ffbe2..22b3b6f 100644 --- a/grep.c +++ b/grep.c @@ -1,4 +1,5 @@ /* See LICENSE file for copyright and license details. */ +#include #include #i

[hackers] [PATCH] Move nologin(8) to sbase

2016-04-04 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 2 -- nologin.8 | 21 - nologin.c | 22 -- 3 files changed, 45 deletions(-) delete mode 100644 nologin.8 delete mode 100644 nologin.c diff --git a/Makefile b/Makefile index 59616a4..4

[hackers] [sbase][PATCH] Add nologin(8) (from ubase) and simplify it

2016-04-04 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 124 +++ config.def.h | 1 + nologin.8| 21 ++ nologin.c| 19 + 4 files changed, 158 insertions(+), 7 deletions(-) create mode

Re: [ubase][hackers] [PATCH] Move nologin(8) to sbase

2016-04-04 Thread Mattias Andrée
Sorry, forgot to tag [ubase]. Also I have sent corresponding patch to sbase, but it does not seem to have arrived yet. I will retry later if it does not appear. On Mon, 4 Apr 2016 13:23:36 +0200 Mattias Andrée <maand...@kth.se> wrote: > Signed-off-by: Mattias Andrée <maa

Re: [hackers] [sbase][PATCH] Add nologin(8) (from ubase) and simplify it

2016-04-04 Thread Mattias Andrée
On Mon, 4 Apr 2016 09:24:52 -0300 Lucas Gabriel Vuotto <l.vuott...@gmail.com> wrote: > On 04/04/16 08:22, Mattias Andrée wrote: > > +int > > +main(void) > > +{ > > + FILE *fp; > > + if ((fp = fopen(NOLOGIN_PATH, "r")))

Re: [hackers] [sbase][PATCH] Add nologin(8) (from ubase) and simplify it

2016-04-04 Thread Mattias Andrée
On Mon, 4 Apr 2016 14:30:38 +0200 Mattias Andrée <maand...@kth.se> wrote: > On Mon, 4 Apr 2016 09:24:52 -0300 > Lucas Gabriel Vuotto <l.vuott...@gmail.com> wrote: > > > On 04/04/16 08:22, Mattias Andrée wrote: > > > +int > > > +main(void) >

[hackers] [sbase][PATCH] Move setsid to ubase

2016-03-29 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 1 - setsid.1 | 17 - setsid.c | 40 3 files changed, 58 deletions(-) delete mode 100644 setsid.1 delete mode 100644 setsid.c diff --git a/Makefile b/Makefile index 6

[hackers] [sbase][PATCH] base32, base16: fix bugs

2016-03-29 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- base16.c | 2 +- base32.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/base16.c b/base16.c index 9940a02..1ea4132 100644 --- a/base16.c +++ b/base16.c @@ -9,7 +9,7 @@ #include "util.h"

[hackers] [ubase][PATCH] Add setsid(1) from sbase with -c added

2016-03-29 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 2 ++ setsid.1 | 23 +++ setsid.c | 49 + 3 files changed, 74 insertions(+) create mode 100644 setsid.1 create mode 100644 setsid.c diff --git a/Make

[hackers] [ubase][PATCH 2/3] stty: fix casting bug

2016-03-30 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- stty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/stty.c b/stty.c index 3e90b8f..9f4307b 100644 --- a/stty.c +++ b/stty.c @@ -629,11 +629,11 @@ displaysettings(struct termios *m, int all) printtok

[hackers] [ubase][PATCH 3/3] stty: add symbolic values for line disciplines

2016-03-30 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- stty.c | 63 +++ 1 file changed, 59 insertions(+), 4 deletions(-) diff --git a/stty.c b/stty.c index 9f4307b..e21ab24 100644 --- a/stty.c +++ b/stty.c @@ -95,7 +95,6 @@ stati

[hackers] [ubase][PATCH 1/3] stty: cleaner output when no arguments are used

2016-03-30 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- stty.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/stty.c b/stty.c index c65748a..3e90b8f 100644 --- a/stty.c +++ b/stty.c @@ -1,4 +1,6 @@ /* See LICENSE file for copyright and license d

[hackers] [sbase][PATCH] printenv: exit status is 2 on failure

2016-03-29 Thread Mattias Andrée
This provides a reliable and portable way to test whether an environment variable is defined. (Of course, if you are using glibc you may get false positives if you include a = in the query.) Signed-off-by: Mattias Andrée <maand...@kth.se> --- printenv.1 | 11 ++- printenv.c | 2

[hackers] [ubase][PATCH v2] Add stty(1)

2016-03-28 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 1 + TODO | 1 + stty.c | 762 +++ 3 files changed, 764 insertions(+) create mode 100644 stty.c diff --git a/Makefile b/Makefile index 59616a4..dc85510

[hackers] [ubase][PATCH] Add stty(1)

2016-03-28 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 1 + TODO | 1 + stty.c | 762 +++ 3 files changed, 764 insertions(+) create mode 100644 stty.c diff --git a/Makefile b/Makefile index 59616a4..dc85510

[hackers] [ubase][PATCH] stty: simplify

2016-04-01 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- stty.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/stty.c b/stty.c index e21ab24..9da517c 100644 --- a/stty.c +++ b/stty.c @@ -438,12 +438,12 @@ parseoperand_mode(char *arg, struct termios *mode) }

[hackers] [sbase][PATCH v2] grep: add -r

2016-04-04 Thread Mattias Andrée
Unlike your usual grep -r, this implementation uses breadth-first search. It usually finds makes it find what you are looking for faster. Signed-off-by: Mattias Andrée <maand...@kth.se> --- fs.h | 17 ++-- grep.1| 10 --- grep.c

[hackers] [sbase][PATCH] find: check whether readdir failed, and fix pri_[acm]time

2016-03-29 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- find.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/find.c b/find.c index ad0c731..5f75735 100644 --- a/find.c +++ b/find.c @@ -1,5 +1,6 @@ /* See LICENSE file for copyright and license d

Re: [hackers] [ubase][PATCH] shred: call fsync at the end of each content shred pass

2016-03-29 Thread Mattias Andrée
Or we could just refuse to support terminals that do not support standard escape sequences. Hardcoding the escape sequences is the only way to remain sane. But I will bookmark this and fix it later. On Wed, 30 Mar 2016 06:58:18 +0200 k...@shike2.com wrote: > > + fprintf(logfp,

Re: [hackers] [sbase][PATCH] stty belongs in ubase

2016-03-29 Thread Mattias Andrée
On Wed, 30 Mar 2016 07:03:02 +0200 k...@shike2.com wrote: > > -stty > > Why stty belongs to ubase?. As far as I know termios is > POSIX. > There are several portability issues: - How do you get/set the size of the terminal. - Which non-POSIX flags does your kernel provide. - Do you you

Re: [hackers] [ubase][PATCH] hwclock: [-rsw] => (-r | -s | -w) and fix flag check

2016-04-22 Thread Mattias Andrée
On Fri, 22 Apr 2016 10:07:49 +0100 Dimitris Papastamos <s...@2f30.org> wrote: > On Fri, Apr 22, 2016 at 03:24:47AM +0200, Mattias Andrée > wrote: > > Also in man page: [-r | -s | -w] => (-r | -s | -w) > > > > Signed-off-by: Mattias Andrée <maand...@kth.se

Re: [hackers] [ubase][PATCH] hwclock: [-rsw] => (-r | -s | -w) and fix flag check

2016-04-22 Thread Mattias Andrée
On Fri, 22 Apr 2016 10:15:38 +0100 Dimitris Papastamos wrote: > Ok, so when you have (-a | -b) it means that flag choice > is not optional. > > Can we avoid trying to express valid flag combos in a > single line and instead use multiple usage lines? In > some cases, like in

Re: [hackers] [ubase][PATCH] mount: fix indentation

2016-04-28 Thread Mattias Andrée
On Thu, 28 Apr 2016 14:10:13 +0200 Petr Vaněk <arka...@atlas.cz> wrote: > On Thu, Apr 28, 2016 at 01:06:36PM +0200, Mattias Andrée > wrote: > > On Thu, 28 Apr 2016 13:04:47 +0200 > > Petr Vaněk <arka...@atlas.cz> wrote: > > > > > Without any fu

Re: [hackers] [ubase][PATCH] mount: fix indentation

2016-04-28 Thread Mattias Andrée
On Thu, 28 Apr 2016 13:04:47 +0200 Petr Vaněk wrote: > Without any functional change. > --- > mount.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mount.c b/mount.c > index 2eb175c..ba97412 100644 > --- a/mount.c > +++ b/mount.c > @@ -263,7 +263,7

Re: [hackers] [sbase] Remove locale-cancer from grep(1) || FRIGN

2016-04-29 Thread Mattias Andrée
setlocale(LC_ALL, ""); is necessary for UTF-8 support in the regex-engine. On Fri, 29 Apr 2016 13:16:56 +0200 wrote: > commit afc944d9b87e5fbd2bbe43853eb8deb6f813ab0a > Author: FRIGN > AuthorDate: Thu Apr 21 22:20:40 2016 +0200 > Commit: sin

Re: [hackers] [libzahl][PATCH] Use ZAHL_INLINE instead of static inline

2016-04-30 Thread Mattias Andrée
Applied. Thank you! On Sat, 30 Apr 2016 22:39:20 + Petr Vaněk wrote: > --- > zahl-internals.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/zahl-internals.h b/zahl-internals.h > index 4901b6d..afdf416 100644 > --- a/zahl-internals.h > +++

Re: [hackers] [libzahl][PATCH] Fix Underfull \hbox in the refsheet

2016-04-30 Thread Mattias Andrée
On Sat, 30 Apr 2016 23:44:43 + Petr Vaněk wrote: > The macro \\ should not be used when an empty line > follows. --- > doc/refsheet.tex | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/doc/refsheet.tex b/doc/refsheet.tex > index

Re: [hackers] [libzahl][PATCH] Fix Underfull \hbox in the refsheet

2016-04-30 Thread Mattias Andrée
On Sun, 1 May 2016 00:40:34 + Petr Vaněk <arka...@atlas.cz> wrote: > On Sat, Apr 30, 2016 at 11:46:32PM +0200, Mattias Andrée > wrote: > > On Sat, 30 Apr 2016 23:44:43 + > > Petr Vaněk <arka...@atlas.cz> wrote: > > > > > The macro \\ should

[hackers] [PATCH][ubase] Add ul(1)

2017-02-03 Thread Mattias Andrée
, in the future, not use hardcoded ANSI escape sequences. Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 35 ++- libutf/Makefile | 6 + libutf/fgetrune.c | 36 +++ libutf/fputrune.c | 27 ++ libutf/isalnumrune.c | 9 + libutf/isalpharune.c

Re: [hackers] [PATCH v2][sbase] Add man(1)

2017-02-02 Thread Mattias Andrée
On Thu, 2 Feb 2017 12:53:08 -0800 Michael Forney <mfor...@mforney.org> wrote: > On 2/1/17, Mattias Andrée <maand...@kth.se> wrote: > > I feel that it is kind of a given that man(1) is needed > > (why else are we writing man pages) however, it can be > > argued in

[hackers] [PATCH v3][sbase] Add man(1)

2017-02-01 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 5 + README | 1 + config.def.h | 23 ++ man.1| 156 + man.c| 726 +++ 5 files changed, 911 insertions(+) create mode

[hackers] [PATCH v2][ubase] Add ul(1)

2017-02-03 Thread Mattias Andrée
, in the future, not use hardcoded ANSI escape sequences. Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 35 ++- libutf/Makefile | 6 + libutf/fgetrune.c | 36 +++ libutf/fputrune.c | 27 ++ libutf/isalnumrune.c | 9 + libutf/isalpharune.c

[hackers] [PATCH][sbase] Add man(1)

2017-02-01 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 5 + README | 1 + config.def.h | 17 ++ man.1| 154 ++ man.c| 677 +++ 5 files changed, 854 insertions(+) create mode

Re: [hackers] [PATCH v2][sbase] Add man(1)

2017-02-01 Thread Mattias Andrée
On Wed, 1 Feb 2017 10:35:10 +0100 Laslo Hunhold <d...@frign.de> wrote: > On Wed, 1 Feb 2017 10:28:06 +0100 > Mattias Andrée <maand...@kth.se> wrote: > > Hey Matthias, > > > diff --git a/config.def.h b/config.def.h > > new file mode 100644 > > index

[hackers] [PATCH v2][sbase] Add man(1)

2017-02-01 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 5 + README | 1 + config.def.h | 19 ++ man.1| 154 ++ man.c| 677 +++ 5 files changed, 856 insertions(+) create mode

[hackers] [PATCH v3][sbase] libutil/unescape.c: simplify and add \E

2017-02-04 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- libutil/unescape.c | 98 ++ 1 file changed, 39 insertions(+), 59 deletions(-) diff --git a/libutil/unescape.c b/libutil/unescape.c index d1503e6..bed2c61 100644 --- a/libutil/unescape.c

[hackers] [PATCH v2][sbase] libutil/unescape.c: simplify and add \E

2017-02-04 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- libutil/unescape.c | 98 ++ 1 file changed, 39 insertions(+), 59 deletions(-) diff --git a/libutil/unescape.c b/libutil/unescape.c index d1503e6..c0155ea 100644 --- a/libutil/unescape.c

Re: [hackers] [PATCH v3][sbase] libutil/unescape.c: simplify and add \E

2017-02-06 Thread Mattias Andrée
On Mon, 06 Feb 2017 15:50:04 -0800 evan.ga...@gmail.com (Evan Gates) wrote: > Mattias Andrée <maand...@kth.se> wrote: > > > On Mon, 06 Feb 2017 15:05:32 -0800 > > evan.ga...@gmail.com (Evan Gates) wrote: > > > > > Mattias Andrée <maand...@kth.se> w

Re: [hackers] [PATCH v3][sbase] libutil/unescape.c: simplify and add \E

2017-02-06 Thread Mattias Andrée
On Mon, 06 Feb 2017 15:05:32 -0800 evan.ga...@gmail.com (Evan Gates) wrote: > Mattias Andrée <maand...@kth.se> wrote: > > > + } else if (escapes[*r & 255]) { > > + *w++ = escapes[*r++ & 255]; > > Why do you & 255 her

Re: [hackers] [PATCH][sbase] libutil/unescape.c: add \E and simplify \x

2017-02-06 Thread Mattias Andrée
On Mon, 6 Feb 2017 13:29:54 -0800 Evan Gates <evan.ga...@gmail.com> wrote: > On Sat, Feb 4, 2017 at 1:32 PM, Mattias Andrée > <maand...@kth.se> wrote: > > @@ -39,10 +39,8 @@ unescape(char *s) > > off += m - i - 1; > >

[hackers] [PATCH][sbase] libutil/unescape.c: only print argv0 once on error

2017-02-04 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- libutil/unescape.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libutil/unescape.c b/libutil/unescape.c index 90a62c3..d1503e6 100644 --- a/libutil/unescape.c +++ b/libutil/unescape.c @@ -35,7 +35,7 @@ unescap

[hackers] [PATCH][sbase] libutil/unescape.c: add \E and simplify \x

2017-02-04 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- libutil/unescape.c | 20 +--- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/libutil/unescape.c b/libutil/unescape.c index d1503e6..aae15cf 100644 --- a/libutil/unescape.c +++ b/libutil/unescape.c @@ -1,

[hackers] [sbase][PATCH v4] Add man(1) and manpp(1)

2017-02-05 Thread Mattias Andrée
), or removing conflicting preprocessing (which requires that man(1) is configured to not preprocess install man pages). Signed-off-by: Mattias Andrée <maand...@kth.se> --- Makefile | 6 + README | 2 + config.def.h | 21 ++ man.1| 157 ++ man.c

[hackers] [PATCH][sbase] cp.1: source and dest are not optional

2017-01-29 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- cp.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cp.1 b/cp.1 index 54126e2..f74127d 100644 --- a/cp.1 +++ b/cp.1 @@ -11,8 +11,8 @@ .Fl R .Op Fl H | L | P .Oc -.Op Ar source ... -.Op Ar dest +.Ar source ..

[hackers] [PATCH][sbase] getconf: fail if any other flag than -v is used

2017-01-26 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- getconf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/getconf.c b/getconf.c index e611659..d927f2d 100644 --- a/getconf.c +++ b/getconf.c @@ -33,6 +33,9 @@ main(int argc, char *argv[]) /*

Re: [hackers] [suckless.org][PATCH] libzahl does not seem WIP anymore (1.0 was hit some time ago).

2016-09-19 Thread Mattias Andrée
1.0 marked it as usable, however there is still a lot of work to be done for it be an acceptable replacement for most users. This is why it is still marked WIP; so people don't try it, thinks its too slow and otherwise problematic, and never comes back to see if it is worth using. On Tue, 20 Sep

[hackers] [PATCH][ubase] respawn: reopen the fifo at end of line, and use read-only

2016-09-25 Thread Mattias Andrée
Signed-off-by: Mattias Andrée <maand...@kth.se> --- respawn.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/respawn.c b/respawn.c index 77670f5..7fdd1ec 100644 --- a/respawn.c +++ b/respawn.c @@ -1,5 +1,4 @@ /* See LICENS

[hackers] [ubase] [PATCH] install: ignore -s

2016-12-03 Thread Mattias Andrée
of binaries. Ignoring -s have the added benefit that the user do not need to edit makefiles if they want the symbols that are useful for debugging. If the user wants to strip away symbols, it can be done manually or automatically by the package manager. Signed-off-by: Mattias Andrée <ma

[hackers] Re: [sbase] [PATCH] install: ignore -s

2016-12-03 Thread Mattias Andrée
Whoops, write [ubase] instead of [sbase] by mistake. On Sat, 3 Dec 2016 12:51:14 +0100 Mattias Andrée <maand...@kth.se> wrote: > The -s flag previously called strip(1) on the installed > file. This patch changes install(1)'s behaviour to ignore > -s. > > Many makefile

  1   2   >