Re: [hackers] Penfing patches for sbase and ubase

2024-02-27 Thread Elie Le Vaillant
"Roberto E. Vargas Caballero" wrote: > I know that there are some pending patches for sbase and ubase, > but I am a bit busy these days and I will not be able to look > a bit deeper on them until next week. Be patient until then :) > > Thank you Sure, no problem! I've sent most of the patches

[hackers] [sbase][PATCH] cron: heavy refactor of parsefield() and matchentry()

2024-02-27 Thread Elie Le Vaillant
This patch heavily simplifies the parsing logic of parsefield(), and makes the grammar more standards-compliant. Before, this cron implementation would only recognize repeats ("/n" at the end of a range, or of a wildcar) for wildcars, and list elements could only be numbers. Now, the basic type

[hackers] [sbase][PATCH] shuf: use libutil/random functions instead of custom ones

2024-02-27 Thread Elie Le Vaillant
--- shuf.c | 37 + 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/shuf.c b/shuf.c index 2655d08..3d8ec51 100644 --- a/shuf.c +++ b/shuf.c @@ -7,41 +7,6 @@ #include "text.h" #include "util.h" -/* - * Uniformity is achieved by generating new

[hackers] [sbase][PATCH] libutil: add random.c

2024-02-27 Thread Elie Le Vaillant
Some programs need a good PRNG, such as shuf(1), or cron(1). This adds to libutil a random_uniform function which simply solves the problem of creating integers uniformly in a range. random_seed seeds the generator. arc4random would probably be a better PRNG than random, but it is less portable