Greetings.
On Thu, 19 Apr 2012 21:03:45 +0200 "Galos, David"
wrote:
> > Your proposed changes are applied.
> Glad I could help!
>
> > I still have to insist on checking
> > the right side of »end« to be checked for length.
> > % seq 5 -1 1.
> > should show four digits to thr righ
> Your proposed changes are applied.
Glad I could help!
> I still have to insist on checking
> the right side of »end« to be checked for length.
> % seq 5 -1 1.
> should show four digits to thr right.
I agree that this is sensible behavior. GNU seq doesn't do that,
but since when h
Greetings.
On Wed, 18 Apr 2012 13:41:39 +0200 "Galos, David"
wrote:
>
> I've fixed it to use no regex; only goto, loops and string.h stuff;
> attached is the patch.
Your proposed changes are applied. I still have to insist on checking
the right side of »end« to be checked for length.
On 04/17/2012 01:15 AM, Connor Lane Smith wrote:
> I'm confused about why we need to use a regular expression here. We
> can do this with a few loops and some ifs. Using regexes in seq(1)
> really, really concerns me.
A note on this from Rob Pike's blog:
http://commandcenter.blogspot.com/2011/08/r
> > Using regexes in seq(1) really, really concerns me.
> Not in C.
I've fixed it to use no regex; only goto, loops and string.h stuff;
attached is the patch.
seq-changes.diff
Description: Binary data
On Mon, Apr 16, 2012 at 05:30:05PM -0500, Galos, David wrote:
> > I'm confused about why we need to use a regular expression here. We
> > can do this with a few loops and some ifs. Using regexes in seq(1)
> > really, really concerns me.
>
> It was really me being lazy-- my evil plan was to pretend
> I'm confused about why we need to use a regular expression here. We
> can do this with a few loops and some ifs. Using regexes in seq(1)
> really, really concerns me.
It was really me being lazy-- my evil plan was to pretend that everyone
was cool with them unless someone spoke up. Curses!
Hey,
On 16 April 2012 22:34, Galos, David wrote:
> After some testing I realized that my regex was inaccurate--I forgot to
> encase it in '^$'. If everyone here's cool with REG_EXTENDED, I changed it to
> "^([^%]|%%)*%[ +-]?[0-9]*.?[0-9]*[fFgGeE]([^%]|%%)*$"
> Which seemed clearer, and survived m
> Thanks for your contribution! Please test my munging of both codes!
It's basically all there, a few issues, though:
Checking for any sign is pointless in digitsright. Checking for the minus
sign is wrong in digitsleft, because the format string we create won't
ever print '+'; but since '-' might
Greetings.
On Mon, 16 Apr 2012 21:49:48 +0200 "Galos, David"
wrote:
> > Have you tried the fmtvalid() function? It seems like there is a typo
> > where it is used. Such a function would still be useful in the now ex‐
> > isting seq.c.
>
> I hadn't tested it when I sent that. I've attached
> Have you tried the fmtvalid() function? It seems like there is a typo
> where it is used. Such a function would still be useful in the now ex‐
> isting seq.c.
I hadn't tested it when I sent that. I've attached a version with a tested
fmtvalid function, proper support for scientific notation
Greetings.
On Mon, 16 Apr 2012 14:40:01 +0200 "Galos, David"
wrote:
> > Attached is a first shot at seq(1) for sbase. I do not like having to
> > juggle data around to play games with sprintf, so if someone has a
> > cleaner approach to this program, please speak up.
>
> Unfortunately, there i
> Attached is a first shot at seq(1) for sbase. I do not like having to
> juggle data around to play games with sprintf, so if someone has a
> cleaner approach to this program, please speak up.
Unfortunately, there isn't much that can be done. User input is always
sub-par, and unless we want to a
Attached is a first shot at seq(1) for sbase. I do not like having to
juggle data around to play games with sprintf, so if someone has a
cleaner approach to this program, please speak up.
Specifically: everything inside the if(wflag){} block is truly awful.
#include
#include
#include
#include
14 matches
Mail list logo