Re: What should we do with the -n flag in sh ?

2016-03-12 Thread David Laight
On Fri, Feb 26, 2016 at 08:50:27AM +0700, Robert Elz wrote: > > But dealing with -I wasn't really the question, I'd appreciate opinions > on handling -n though (not so much in interactive shells, David Holland's > suggestion seems fine for that, and entirely reasonable) - but for > non-interactive

Re: performance of shell read loops

2016-03-12 Thread David Laight
On Mon, Mar 07, 2016 at 04:09:06PM +0700, Robert Elz wrote: > > Then I ktrace'd it, and of course, the "read" builtin command is reading > one character at a time. If you think about it just a litte, you will > see that it must work that way (it is only permitted to take one line of > data from

Re: Next steps for /bin/sh

2016-03-12 Thread David Laight
On Fri, Mar 11, 2016 at 07:53:16AM +0700, Robert Elz wrote: > > One of those changes was to stop using the shell's own private isalpha() > macros (they have different names - and "stop using" meant to redefine them > in terms of and isalpha() etc.) > > In 2010, FreeBSD undid that change, with a

Re: Next steps for /bin/sh

2016-03-12 Thread David Laight
On Fri, Mar 11, 2016 at 06:24:05AM +0100, Joerg Sonnenberger wrote: > On Fri, Mar 11, 2016 at 07:53:16AM +0700, Robert Elz wrote: > > One of those changes was to stop using the shell's own private isalpha() > > macros (they have different names - and "stop using" meant to redefine them > > in terms

Re: Next steps for /bin/sh

2016-03-12 Thread Joerg Sonnenberger
On Sat, Mar 12, 2016 at 01:37:13PM +, David Laight wrote: > On Fri, Mar 11, 2016 at 06:24:05AM +0100, Joerg Sonnenberger wrote: > > On Fri, Mar 11, 2016 at 07:53:16AM +0700, Robert Elz wrote: > > > One of those changes was to stop using the shell's own private isalpha() > > > macros (they have

Re: performance of shell read loops

2016-03-12 Thread Joerg Sonnenberger
On Sat, Mar 12, 2016 at 12:08:10PM +, David Laight wrote: > On Mon, Mar 07, 2016 at 04:09:06PM +0700, Robert Elz wrote: > > > > Then I ktrace'd it, and of course, the "read" builtin command is reading > > one character at a time. If you think about it just a litte, you will > > see that it m

Re: performance of shell read loops

2016-03-12 Thread Robert Elz
Date:Sat, 12 Mar 2016 14:50:59 +0100 From:Joerg Sonnenberger Message-ID: <20160312135059.ga27...@britannica.bec.de> | I'm not sure. A lot of shell processing also happens on real files. There are three cases that could work to improve this - when input is seekable,

Re: Next steps for /bin/sh

2016-03-12 Thread Robert Elz
Date:Sat, 12 Mar 2016 14:54:03 +0100 From:Joerg Sonnenberger Message-ID: <20160312135403.gb27...@britannica.bec.de> | That's essentially what isalpha_l can be doing, it just doesn't have | inlining (yet). It is also what the shell private syntax table does, excep

Re: What should we do with the -n flag in sh ?

2016-03-12 Thread Robert Elz
Date:Sat, 12 Mar 2016 11:19:47 + From:David Laight Message-ID: <20160312111947.ga...@snowdrop.l8s.co.uk> | I'm not sure that supporting 'set -n' is a good idea. Using it doesn't make much sense, but it is part of the standard and we're supposed to do something

Results of || and && operators in /bin/sh $(( )) evaluation

2016-03-12 Thread Robert Elz
Currently, NetBSD's /bin/sh (all versions since $(( )) was added, back in 1994 it seems) calculate the result of x && y as 0 if x == 0, otherwise y, and calculate x || y as x if x != 0, and as y otherwise. That is, 3 && 4 evaluates to 4, and 3 || 4 evaluates to 3. In C, these

Re: Google summer code 2016 project ideas

2016-03-12 Thread Charles Cui
Hi Christos, My current focus is to classify the errors when building posix test suite on netbsd. Basically, there is 1. easy to fix error, likes formatting, lack of necessary headers, etc. 2. errors that can convert to netbsd implementation. Some systems (ex linux) actually define the same fun

Re: Google summer code 2016 project ideas

2016-03-12 Thread Christos Zoulas
On Mar 12, 8:28pm, charles.cui1...@gmail.com (Charles Cui) wrote: -- Subject: Re: Google summer code 2016 project ideas | Hi Christos, | |My current focus is to classify the errors when building posix test | suite on netbsd. | Basically, there is | 1. easy to fix error, likes formatting, lac