Re: [hackers] [PATCH][sbase] paste: Allow null delim

2020-03-05 Thread Evan Gates
On Thu, Mar 5, 2020, 02:16 Quentin Rameau wrote: > > On Thu, 5 Mar 2020 01:42:37 -0800 > Michael Forney wrote: > > > >> and `-d""` is invalid, since paste(1) must follow the > > >> utility syntax guidelines (guideline 7). > > > > > > Not sure what you mean there, -d"" is the concatenation of -d

Re: [hackers] [sbase][PATCH] Support -- in all utilities except echo(1)

2019-06-30 Thread Evan Gates
On Fri, Jun 28, 2019 at 3:08 AM Michael Forney wrote: > > Then, maybe something like the following would work for those cases. > > ARGBEGIN { > default: > goto done; > } ARGEND > done: Seeing as we have more confusion and bugs to deal with in argument

Re: [hackers] [sbase] [PATCH] libutil: Rename functions in reserved namespace to prevent potential conflict

2019-05-21 Thread Evan Gates
On Tue, May 21, 2019 at 10:17 AM Quentin Rameau wrote: > x* is not a reserved namespace, nor is strsep. strsep is reserved. C11 standard section 7.30 Future library directions: The following names are grouped under individual headers for convenience. All external names described below are

Re: [hackers][sbase][PATCH v2] testing: add first shell-based tests

2018-10-07 Thread Evan Gates
On Sun, Oct 7, 2018 at 6:38 AM Silvan Jegen wrote: > * use "ls" instead of "find" in subshell Don't do that. Use globs. https://mywiki.wooledge.org/ParsingLs > +for testfile in $(ls *.test); do for testfile in *.test; do

Re: [hackers] [slstatus] Explicitly list component-objects in the Makefile || Laslo Hunhold

2018-05-29 Thread Evan Gates
On Sun, May 27, 2018 at 1:55 PM wrote: > commit 0efd64ffaa04715eff9c834c437562952c4531cd > Author: Laslo Hunhold > AuthorDate: Sun May 27 22:40:00 2018 +0200 > Commit: Aaron Marcher > CommitDate: Sun May 27 22:55:15 2018 +0200 > Explicitly list component-objects in the Makefile

Re: [hackers] [sbase] [PATCH] which: absolute path not handled

2017-10-12 Thread Evan Gates
Alex Pilon <a...@alexpilon.ca> wrote: > > > On 2017-10-10-17, Evan Gates <evan.ga...@gmail.com> wrote: > > >> I dislike that which(1) is even part of sbase as it's not POSIX. The > > > > sh builtin 'command' can and should be used in its place as it i

Re: [hackers] [sbase] [PATCH] which: absolute path not handled

2017-10-12 Thread Evan Gates
Michael Forney <mfor...@mforney.org> wrote: > On 2017-10-10-17, Evan Gates <evan.ga...@gmail.com> wrote: > > I dislike that which(1) is even part of sbase as it's not POSIX. The > > sh builtin 'command' can and should be used in its place as it is > > sta

Re: [hackers] [sbase] [PATCH] which: absolute path not handled

2017-10-10 Thread Evan Gates
I dislike that which(1) is even part of sbase as it's not POSIX. The sh builtin 'command' can and should be used in its place as it is standardized. That being said you are correct, that output is terrible and a patch would be appreciated. On Tue, Oct 10, 2017 at 3:56 PM Pieter Kockx

[hackers] Re: [sbase][ubase] maintainers

2017-09-08 Thread Evan Gates
On Fri, Sep 8, 2017 at 9:03 AM, Evan Gates <evan.ga...@gmail.com> wrote: > Hello suckless, > > I decided to become maintainer of sbase and ubase months ago and > quickly fell out of touch. I apologize for my absence and lack of > communication on the matter. I'm back an

[hackers] [sbase][ubase] maintainers

2017-09-08 Thread Evan Gates
Hello suckless, I decided to become maintainer of sbase and ubase months ago and quickly fell out of touch. I apologize for my absence and lack of communication on the matter. I'm back and I'm starting to dig through the months of patches on the mailing list. If anybody already has a list of

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

2017-02-06 Thread Evan Gates
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> wrote: > > > > > + } else if (escapes[*r & 255]) { > > > +

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

2017-02-06 Thread Evan Gates
Mattias Andrée wrote: > + } else if (escapes[*r & 255]) { > + *w++ = escapes[*r++ & 255]; Why do you & 255 here? I think a cast to unsigned char would accomplish what you are trying to do and be more correct (as char can default to either signed

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

2017-02-06 Thread Evan Gates
On Mon, Feb 6, 2017 at 1:38 PM, Evan Gates <evan.ga...@gmail.com> wrote: > On Mon, Feb 6, 2017 at 1:35 PM, Mattias Andrée <maand...@kth.se> wrote: >> >> I don't really have a prefers. > > OK, applied with that small change. Thanks. Sorry, I just realized I was r

Re: Re: [hackers] [sbase][PATCH] Fixed a couple of uninitialised variable warnings from Clang

2017-02-06 Thread Evan Gates
the other I'll gladly accept the changes. - 8< - 8< - From 5eae9c0bd10c6da57fcd8527e7bbc6c23cda4b08 Mon Sep 17 00:00:00 2001 From: Evan Gates <evan.ga...@gmail.com> Date: Mon, 6 Feb 2017 13:50:23 -0800 Subject: [PATCH] Initialize to avoid false positive clang warning clang d

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

2017-02-06 Thread Evan Gates
On Mon, Feb 6, 2017 at 1:35 PM, Mattias Andrée wrote: > > I don't really have a prefers. OK, applied with that small change. Thanks.

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

2017-02-06 Thread Evan Gates
On Sat, Feb 4, 2017 at 1:32 PM, Mattias Andrée wrote: > @@ -39,10 +39,8 @@ unescape(char *s) > off += m - i - 1; > for (--m, q = 0, factor = 1; m > i + 1; m--) { > - if (s[m] >= '0' && s[m] <= '9') > -

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

2017-02-06 Thread Evan Gates
Mattias Andrée wrote: > Signed-off-by: Mattias Andrée > --- > 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

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

2017-01-31 Thread Evan Gates
Mattias Andrée wrote: > Signed-off-by: Mattias Andrée > --- > 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

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

2017-01-31 Thread Evan Gates
Mattias Andrée wrote: > Signed-off-by: Mattias Andrée > --- > 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,

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

2017-01-03 Thread Evan Gates
On Mon, Jan 2, 2017 at 12:20 PM, Laslo Hunhold wrote: > yes, let's keep it as simple as possible. Do the others feel okay with > adding nologin(1)? I think it falls under the umbrella of "unix tools that are inherently portable."

Re: [hackers] [sbase][Patch] date: add date/time setting capability

2016-12-28 Thread Evan Gates
On Dec 28, 2016 19:09, "John Vogel" wrote: On Wed, 28 Dec 2016 17:42:39 -0800 Michael Forney wrote: > Apart from these nits, this looks good to me. > Your help is greatly appreciated, thank you. Revised patch below. For future reference, could I

Re: [hackers] [sbase] ls: print filenames on the fly rather than in a buffer

2016-12-28 Thread Evan Gates
Thanks. Changed to const as discussed on IRC and applied.

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

2016-12-27 Thread Evan Gates
On Tue, Dec 27, 2016 at 7:05 AM, Laslo Hunhold wrote: > On Tue, 27 Dec 2016 15:48:56 +0100 > Mattias Andrée wrote: > > Hey Mattias, > >> Okay, I personally do not agree with this and see echo(1) >> as an abomination, it treats any unrecognised flags as >> strings,

Re: [hackers] [sbase] [PATCH 11/11] tail: Process bytes with -c option, and add -m option for runes

2016-12-27 Thread Evan Gates
On Tue, Dec 27, 2016 at 5:55 AM, Laslo Hunhold wrote: > well-spotted! Still, it's _very_ counterintuitive to call the flag > "-c". Instead of adding a non-portable m-flag, it would even sound > better to me to add a b-flag for byte-offsets. > > It all depends on how many scripts

Re: [hackers] [sbase] [patch] ed: Treat addresses of 0 as 1 for insert

2016-12-27 Thread Evan Gates
On Tue, Dec 27, 2016 at 4:31 AM, Laslo Hunhold wrote: > On Thu, 3 Nov 2016 15:19:35 + > Thomas Mannay wrote: > > Hey Thomas, > >> From 6665eaa1d2c25a95b44a4f4fb3d24a3bd5c1180f Mon Sep 17 00:00:00 2001 >> From: Thomas Mannay

Re: [hackers] [sbase][PATCH] ls: add -1 option to manpage

2016-12-27 Thread Evan Gates
On Tue, Dec 27, 2016 at 4:20 AM, Laslo Hunhold wrote: > I am not 100% sure how to approach this, but -1 effectively does not do > anything for our ls(1), except also implicitly activating the q-flag as > mandated by Posix. > > What do the others think? > > Cheers > > Laslo > > -- >

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

2016-12-27 Thread Evan Gates
On Tue, Dec 27, 2016 at 3:09 AM, Laslo Hunhold wrote: > On Wed, 30 Mar 2016 19:01:16 +0200 > Mattias Andrée wrote: > > Hey Mattias, > >> $ echo äö | ./grep [å] >> äö >> >> This is not want one expects from >> a program that supports UTF-8. > > as a general

Re: [hackers] [slock][PATCH] Replace arg.h with if statements, simplify

2016-10-28 Thread Evan Gates
On Fri, Oct 28, 2016 at 11:27 AM, Klemens Nanni wrote: > > ++argv is put on a seperate line since doing it within the execvp() call > would produce a compiler warning. Yes, because that's invoking undefined behavior. There is no guarantee as to the order of execution of function

Re: [hackers] [dwm] [PATCH] get rid of unnecessary ternary operator

2016-10-28 Thread Evan Gates
On Fri, Oct 28, 2016 at 2:17 AM, Hiltjo Posthuma wrote: > > FWIW: I disagree. The ternary form is slightly longer but more readable. I too disagree. I think the !! is more readable and idiomatic (either way, at least we aren't casting to bool...). But I am curious, does

[hackers] [sbase][PATCH] printf: handle \0 in %b arguments

2016-10-24 Thread Evan Gates
The %b case was using fputs after unescape to print the argument, which meant that it could not handle nul bytes. Instead, store the length returned from unescape and use fwrite to properly handle them. --- printf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git

Re: [hackers] [sbase] [PATCH] tr: Fix multiple ranges with different lengths

2016-10-22 Thread Evan Gates
On Oct 22, 2016 02:41, "Michael Forney" wrote: > This also fixes range expressions in the form [a-z], which get encoded as four > ranges '[', 'a'..'z', ']', causing all a-z characters to get mapped to ']'. This > form is occasionally used in shell scripts, including the

[hackers] [sbase][PATCH] Makefile: sort file lists

2016-10-20 Thread Evan Gates
--- Makefile | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 25bab70..9d3afcc 100644 --- a/Makefile +++ b/Makefile @@ -23,10 +23,6 @@ HDR =\ LIBUTF = libutf.a LIBUTFSRC =\ - libutf/rune.c\ - libutf/runetype.c\ -

[hackers] [sbase]patch: fix PHONY

2016-10-20 Thread Evan Gates
targets must be prerequisites to PHONY, not commands From e160605d1c27e433e9b5c72c3cf849522a802d17 Mon Sep 17 00:00:00 2001 From: Evan Gates <evan.ga...@gmail.com> Date: Wed, 19 Oct 2016 11:04:48 -0700 Subject: [PATCH] targets must be prerequisites to .PHONY not commands --- Makefile | 3

[hackers] [sinit] patch: fix makefile

2016-10-11 Thread Evan Gates
remove unnecessary input redirection for sed in clean, remove all sinit tarballs not just for current VERSION From c39397640e3da32841f2b8d5b861b9545096f5fe Mon Sep 17 00:00:00 2001 From: Evan Gates <evan.ga...@gmail.com> Date: Tue, 11 Oct 2016 10:32:37 -0700 Subject: [PATCH] makefile changes s

[hackers] Re: [sbase][patch] respect -q handling with -l and -R

2016-10-05 Thread Evan Gates
On Wed, Oct 5, 2016 at 2:48 PM, Evan Gates <evan.ga...@gmail.com> wrote: > sbase-ls_-lq.diff: respect -q flag when using -l flag > sbase-ls_-qR.diff: respect -q flag when printing directory headings with -R > flag Updated versions. Add "ls: " to commit messages and

Re: [hackers] [sbase][patch]find: copy path before using basename

2016-10-05 Thread Evan Gates
0:00 2001 From: Evan Gates <evan.ga...@gmail.com> Date: Wed, 5 Oct 2016 15:37:34 -0700 Subject: [PATCH] find: estrdup before basename "The basename() function may modify the string pointed to by path..." Thanks POSIX --- find.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(

[hackers] [sbase][patch] respect -q handling with -l and -R

2016-10-05 Thread Evan Gates
sbase-ls_-lq.diff: respect -q flag when using -l flag sbase-ls_-qR.diff: respect -q flag when printing directory headings with -R flag From da7bfffbe6d9f02421899b42b410301ad5718c54 Mon Sep 17 00:00:00 2001 From: Evan Gates <evan.ga...@gmail.com> Date: Wed, 5 Oct 2016 10:57:38 -0700 Subject:

Re: [hackers] [sbase][patches] sort makefile and add getconf guard file

2016-10-03 Thread Evan Gates
On Mon, Oct 3, 2016 at 11:19 AM, FRIGN <d...@frign.de> wrote: > On Thu, 29 Sep 2016 08:54:30 -0700 > Evan Gates <evan.ga...@gmail.com> wrote: >> sbase-getconf_guard.diff adds a guard file to the getconf rules so >> that getconf.sh doesn't get run multiple tim

[hackers] [sbase][patches] sort makefile and add getconf guard file

2016-09-29 Thread Evan Gates
: Evan Gates <evan.ga...@gmail.com> Date: Thu, 29 Sep 2016 08:43:19 -0700 Subject: [PATCH] add guard file for getconf.sh rule to avoid multiple parallel execution for example try 'make -j4 getconf.c' and you will see getconf.sh run 4 times, this patch fixes that to only run once --- Makefi

[hackers] Re: [stali][patch] Change dependency specifications in makefiles

2016-09-14 Thread Evan Gates
On Wed, Sep 7, 2016 at 4:29 PM, Evan Gates <evan.ga...@gmail.com> wrote: > I've made a lot of changes to the makefiles to specify dependencies > correctly and allow parallel builds with make -j. Please be on the > lookout for bugs and please bring up any objections/criticism.

[hackers] Re: [9base][patch] fix path to tmac directory in tmac files

2016-09-14 Thread Evan Gates
On Wed, Sep 14, 2016 at 9:02 AM, Evan Gates <evan.ga...@gmail.com> wrote: > fix path to tmac directory in tmac files (#9/tmac/ -> #9/lib/troff/tmac/) I also just found many references to /usr/lib/tmac/... or /lib/tmac/... without the #9, a few to /home/anselm/plan9port/..., two

[hackers] [9base][patch] fix path to tmac directory in tmac files

2016-09-14 Thread Evan Gates
fix path to tmac directory in tmac files (#9/tmac/ -> #9/lib/troff/tmac/) From 50638159d4d40b2be0f684cedf402c2cff8ccce4 Mon Sep 17 00:00:00 2001 From: Evan Gates <evan.ga...@gmail.com> Date: Wed, 14 Sep 2016 08:58:57 -0700 Subject: [PATCH] fix path to tmac directory in tmac files (#9/tma

[hackers] [9base][patch] check for _LARGEFILE64_SOURCE instead of __USE_LARGEFILE64

2016-09-09 Thread Evan Gates
. musl does however define _LARGEFILE64_SOURCE, the macro that glibc checks in order to define __USE_LARGEFILE64. From 1711bb2c1648d355d1d6998f02c6df1a344663a8 Mon Sep 17 00:00:00 2001 From: Evan Gates <evan.ga...@gmail.com> Date: Fri, 9 Sep 2016 12:36:57 -0700 Subject: [PATCH]

[hackers] Re: [stali][patch] Change dependency specifications in makefiles

2016-09-07 Thread Evan Gates
I forgot to add, one important side change is that after updating a library, all packages that depend on it will now automatically rebuild due to moving library dependencies out of LDFLAGS and into LIBS and specifying that the BIN depends on LIBS. On Sep 7, 2016 4:29 PM, "Evan Gates"

[hackers] [stali][patch] Change dependency specifications in makefiles

2016-09-07 Thread Evan Gates
, touches a file called _ytab so we have a modification time to compare against. I used the convention of guard files begining with an underscore. From 969482a848c1bd44284e80d1426a72c046f8d0f0 Mon Sep 17 00:00:00 2001 From: Evan Gates <evan.ga...@gmail.com> Date: Wed, 7 Sep 2016 16:03:28 -0700 S

Re: [hackers] [farbfeld] Shellcheck 2ff fixes || FRIGN

2016-09-07 Thread Evan Gates
On Wed, Sep 7, 2016 at 3:26 PM, FRIGN wrote: > Yes it is a reflex. The semicolons don't hurt anybody and I actually am > not that much of a shell-god to really exactly know where I can get rid > of them. Anywhere you have a single semicolon at the end of the line you can get rid

Re: [hackers] [farbfeld] Shellcheck 2ff fixes || FRIGN

2016-09-07 Thread Evan Gates
Hey FRIGN, I'm glad you quoted! I do have a couple questions and discussion points I'd value your feedback on. Why all the extraneous semicolons? I see this a lot in awk, too. I think it tends to be a reflex for C programmers. Why not quote "$ret"? You don't have control over the environment in

Re: [hackers] [quark] Use sizeof() instead of magic constants || FRIGN

2016-09-06 Thread Evan Gates
On Mon, Sep 5, 2016 at 12:41 AM, FRIGN wrote: > but this only happens if you typedef your structs, which I think is bad > practice. > If you do a > #typedef struct hw homework > this is your own fault. Using > sizeof(struct hw) > shows clearly it's a type, whereas >

Re: [hackers] [quark] Use sizeof() instead of magic constants || FRIGN

2016-09-06 Thread Evan Gates
On Sun, Sep 4, 2016 at 11:35 PM, Anselm R Garbe wrote: > See http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1256.pdf 6.5.3 > for unary operator specification of the C language. 6.5.3 shows (the relevant parts) unary-expression: postfix-expression sizeof

[hackers] [9base][patch] add bclib

2016-08-17 Thread Evan Gates
2001 From: Evan Gates <evan.ga...@gmail.com> Date: Wed, 17 Aug 2016 11:40:29 -0700 Subject: [PATCH] fix DESTDIRK typo in yacc/Makefile --- yacc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/yacc/Makefile b/yacc/Makefile index ce9a420..bd9136c 100644 ---

Re: [hackers] [sbase] [PATCH 3/3] ed: Fix substitutions with non-determinate patterns

2016-07-26 Thread Evan Gates
On Mon, Jul 25, 2016 at 8:47 PM, Wolfgang Corcoran-Mathe wrote: > Right, and the same behavior is shown by all the seds I’ve seen (GNU, > BSD, Busybox & Plan 9). Interestingly, both GNU and BSD ed give an > error instead (for global substitution against a null-matching regex).

Re: [hackers] [sbase] [PATCH 3/3] ed: Fix substitutions with non-determinate patterns

2016-07-25 Thread Evan Gates
On Sun, Jul 24, 2016 at 8:17 PM, Wolfgang Corcoran-Mathe wrote: > Sorry, this last patch is simpleminded. > > Given the following text and substitution, what should happen? > > 'glorious' > > s/G*/P/g > > sbase sed(1) gives us 'PgPlPoPrPiPoPuPsP' (matching every null > string),

[hackers] [sbase][ed][patch] subtract 'a' from indices for marks

2016-07-15 Thread Evan Gates
2cc36818283e9068576c1042690c016a81b709a3 Mon Sep 17 00:00:00 2001 From: Evan Gates <evan.ga...@gmail.com> Date: Fri, 15 Jul 2016 09:52:39 -0700 Subject: [PATCH] fix marks indexing --- ed.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ed.c b/ed.c index ce19cf7..184ed30 100644 ---

Re: [hackers] [scc] Remove CPPFLAGS from Makefiles || Roberto E. Vargas Caballero

2015-11-25 Thread Evan Gates
On Wed, Nov 25, 2015 at 1:03 AM, wrote: > Remove CPPFLAGS from Makefiles > > CPPFLAGS is not POSIX, so it is better to define > everything in CFLAGS and become more portable. Glanced at the makefiles after the mention of POSIX here. Note the .POSIX target is

[hackers] [sbase]patch: man pages for sed and find

2015-08-04 Thread Evan Gates
They aren't pretty, they aren't complete, but they should be enough for the 0.1 release. -emg find.1 Description: Binary data sed.1 Description: Binary data

Re: [hackers] [scc][PATCH] Add total compability to the Makefiles

2015-07-16 Thread Evan Gates
On Thu, Jul 16, 2015 at 11:32 AM, Evan Gates evan.ga...@gmail.com wrote: A few notes on using sh. Oh and one more I missed. You have make $@ which should be make $@ in order to maintain proper arguments. (In general there should never be an unquoted expansion/substitution. There are a few

Re: [hackers] [scc][PATCH] Add total compability to the Makefiles

2015-07-16 Thread Evan Gates
A few notes on using sh. The x$var notation is unnecessary and a holdover from very old prePOSIX shells that had difficulty handling certain arguments or argument orders with test/[. In this instance, as you are trying to explicitly match against an empty/unset variable within a case statement I

Re: [hackers] [sbase][patch] find: empty line means no for -ok

2015-06-18 Thread Evan Gates
On Thu, Jun 18, 2015 at 3:57 PM, Wolfgang Corcoran-Mathe first.lord.of.t...@gmail.com wrote: emg, Quoth Evan Gates on Thu, Jun 18 2015 14:47 -0700: diff --git a/find.c b/find.c index 186263b..0de1951 100644 --- a/find.c +++ b/find.c @@ -415,10 +415,9 @@ pri_ok(struct arg *arg

[hackers] [9base][patch] cal: Bprint format specifier

2015-06-18 Thread Evan Gates
W Th F S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Patch attached. -emg From ae17848c795860d34d358fb50f5c2188e59ec2e4 Mon Sep 17 00:00:00 2001 From: Evan Gates evan.ga...@gmail.com Date: Thu, 18 Jun 2015 10:57:29 -0700 Subject: [PATCH] change

Re: [hackers] [sbase] [PATCH] find: Fix unterminated array

2015-06-15 Thread Evan Gates
On Sat, Jun 13, 2015 at 10:42 PM, Wolfgang Corcoran-Mathe first.lord.of.t...@gmail.com wrote: This caused a segfault with semicolon-terminated -exec primaries. good catch, needs to be done in get_ok_arg() as well, not currently somewhere I can do that, mind adding another patch? -emg

Re: [hackers] [sbase] [PATCH] find: Fix unterminated array

2015-06-15 Thread Evan Gates
On Mon, Jun 15, 2015 at 9:28 AM, Evan Gates evan.ga...@gmail.com wrote: On Sat, Jun 13, 2015 at 10:42 PM, Wolfgang Corcoran-Mathe first.lord.of.t...@gmail.com wrote: This caused a segfault with semicolon-terminated -exec primaries. good catch, needs to be done in get_ok_arg() as well

Re: [hackers] [sbase] [PATCH 1/3] find: Fix unterminated array in -ok primary

2015-06-15 Thread Evan Gates
(the cause of the segfault). Needed in get_ok_arg() so that it is NULL when we get here. See attached. -emg From d842da4c8f9fffd304858a0ae62f1c2933c97cef Mon Sep 17 00:00:00 2001 From: Evan Gates evan.ga...@gmail.com Date: Mon, 15 Jun 2015 13:49:38 -0700 Subject: [PATCH] NULL terminate braces array

Re: [hackers] [sbase] [PATCH 2/3] find: Fix flushing input buffer with -ok

2015-06-15 Thread Evan Gates
On Mon, Jun 15, 2015 at 12:27 PM, Wolfgang Corcoran-Mathe first.lord.of.t...@gmail.com wrote: emg's FIXME about nulls still applies. /* throw away rest of line */ - while (fgets(buf, sizeof(buf), stdin) *buf buf[strlen(buf) - 1] == '\n') + while ((c = fgetc(stdin)) !=

Re: [hackers] [sbase] [PATCH] find

2015-06-15 Thread Evan Gates
On Mon, Jun 15, 2015 at 12:27 PM, Wolfgang Corcoran-Mathe first.lord.of.t...@gmail.com wrote: emg, I noticed a few other things in get_ok_arg(), primarily that the fgets() flushing loop was causing find to hang mysteriously. Patch 2/3 should fix this, hopefully. Should have said

Re: [hackers] [sbase] expr: Don't interpret any arguments || sin

2015-04-21 Thread Evan Gates
Patch attached to accept and ignore leading -- -emg From 52754da6090e98f82a5dfbf56c49693a3282e14f Mon Sep 17 00:00:00 2001 From: Evan Gates evan.ga...@gmail.com Date: Tue, 21 Apr 2015 10:32:32 -0700 Subject: [PATCH] accept and ignore leading -- for expr --- expr.c | 2 ++ 1 file changed, 2

Re: [hackers] [sbase] expr: Don't interpret any arguments || sin

2015-04-21 Thread Evan Gates
If you want to allow a negative number to come first and not be treated as an option that is fine, but you still need to accept -- as an end to options. From the last paragraph of the APPLICATION USAGE section of expr(1p)[0]: Therefore, the conforming application must employ the -- construct of

Re: [hackers] [sbase] Audit expr(1) || FRIGN

2015-03-23 Thread Evan Gates
If you want to pass structs by pointer instead of value as a style change, that's ok. But then you're still using assignment instead of memcpy(), well at least in one place, elsewhere you assign each member individually. Why? What's wrong with passing/returning/assigning structures? It's useful

Re: [hackers] [sbase] Audit printenv(1) || FRIGN

2015-02-28 Thread Evan Gates
2) safeguard argv-loop as already seen in echo(1) with argc-decrement. The arg loops can simply be for (; *argv; argv++) as the standard guarantees argv[argc] is NULL. -emg

Re: [hackers] [sbase] config.mk: make cc the default $CC || Hiltjo Posthuma

2014-11-11 Thread Evan Gates
On Mon, Nov 10, 2014 at 10:39 PM, k...@shike2.com wrote: If you want to do that, then the only thing you have to do is don't assign any value to CC, because cc is the default value. If you do in this way then the user can set his prefered compiler exporting CC. The same apply to LD, there is