[Toybox] sed {N;N;} cmd test failure

2014-12-02 Thread Ashwini Sharma
Hi Rob,

While testing thru busybox sed tests, it failed at this test case.

# first three lines are deleted; 4th line is matched and printed by "2,3"
and by "4" ranges
testing "sed with N skipping lines past ranges on next cmds" \
  "sed -n '1{N;N;d};1p;2,3p;3p;4p'" \


  "4\n4\n" "" "1\n2\n3\n4\n"

My observation is with single N, this is working fine, but with multiple N
it doesn't give the same results.

Is the toybox behavior right or busybox/GNU's?

Thanks,
Ashwini
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] expr "horizontal lines" in extended description?

2014-12-02 Thread Isaac Dunham
On Tue, Dec 02, 2014 at 07:24:28PM +0100, Felix Janda wrote:
> Rob Landley wrote:
> > Clarification received from The Austin Group.
> > 
> > (Unfortunately the PDF he mentions costs $2500, and is thus completely
> > irrelevant in 2014.)
> 
> It also seems to be rendered correctly on the POSIX man page.
> 
> https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/man-pages-posix-2013-a.tar.xz
> 
> Felix

>From what I've read, there's (a) the Austin Group source for the documents,
which is written in troff; they render it (apparently using some AT&T
troff derivative) to (b) PDF and (c) HTML. They provided the troff source
to Micheal Kerrisk, who has added appropriate notices and distributed that
as man-pages-posix-2013.

Thanks,
Isaac
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] [PATCH] fix "vmstat 2"

2014-12-02 Thread Rob Landley
On 11/25/14 21:14, enh wrote:
> actually, loop_max =1 gives the right behavior by accident (because of
> the break in the loop), so setting loop_max = 0 is a better idea.

Sorry for the delay in replying. I'm hip-deep in deflate
compression-side logic (implementing the rest of gzip, somebody poked me
and said they need it now), and the vmstat command is a can of worms for me.

My most recent cleanup pass on vmstat was:

http://lists.landley.net/pipermail/toybox-landley.net/2013-December/001513.html

And that description ends with the fact that I have no CLUE how several
of those fields are calculated. What we're doing doesn't match what
other implementations are doing, and there's no standard or
documentation on what it _should_ be. (Trying to find that sort of thing
out is a giant timesink. Gotta do it eventually, but there are higher
priority todo items at present, at least until somebody pokes me and
says "I need X now". :)

Yes, there are some "pending" commands that aren't in the "pending"
directory, the list of them is in toys/pending/README. Initially I just
had a list of commands needing cleanup, but it kept getting longer as
contributions came in faster than I could clean them up, and I added
toys/pending when the list got too long to manage. I've got it down to
11 commands and one lib file, and I keep meaning to just properly review
and clean up that old list rather than try to explain it to people, but
the remaining issues in those commands tend to be nontrivial (or I'd
have fixed them by now). Sometimes, simple is a destination you go
through a lot of complexity to reach...

Anyway, your bug is easy to test and thus easy to fix, but I'd actually
fix it in a different way because:

1) I'm uncomfortable assuming INT_MAX will never be reached. (Yeah,
almost certainly true in this case but INT_MAX != infinity and I don't
want to get into the habit.)

2) Minor bug with "./vmstat 2 3" where it has the 2 second pause right
before exiting. It'snot going to produce more output, so it should just
have the pause twice.

Did the fix I just checked in work for you?

Rob

(Sorry, I ramble a bit when sleep deprived. #include Henry David
Thoreau's apology for writing a 5 page letter because he didn't have
time to write a 1 page one...)
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net


Re: [Toybox] expr "horizontal lines" in extended description?

2014-12-02 Thread Felix Janda
Rob Landley wrote:
> Clarification received from The Austin Group.
> 
> (Unfortunately the PDF he mentions costs $2500, and is thus completely
> irrelevant in 2014.)

It also seems to be rendered correctly on the POSIX man page.

https://www.kernel.org/pub/linux/docs/man-pages/man-pages-posix/man-pages-posix-2013-a.tar.xz

Felix
___
Toybox mailing list
Toybox@lists.landley.net
http://lists.landley.net/listinfo.cgi/toybox-landley.net