Re: old vi bug still alive ...

2008-11-19 Thread Denys Vlasenko
On Tue, Nov 18, 2008 at 7:48 PM, walter harms [EMAIL PROTECTED] wrote: hi list, i was trying the lasted vi and found the old bug i found in this summer still alive. how to reproduce *compile vi with ENABLE_FEATURE_VI_SETOPTS *start vi *choose insert mode *type tabanycharCR use clippaste

shell script implementation of man

2008-11-19 Thread Matthew Hiles
So I saw this in the TODO file: man It would be nice to have a man command. Not one that handles troff or anything, just one that can handle preformatted ascii man pages, possibly compressed. This could probably be a script in the extras directory that calls cat/zcat/bzcat | less

Re: shell script implementation of man

2008-11-19 Thread Loïc Grenié
2008/11/19, Matthew Hiles [EMAIL PROTECTED]: So I saw this in the TODO file: man It would be nice to have a man command. Not one that handles troff or anything, just one that can handle preformatted ascii man pages, possibly compressed. This could probably be a script in the

Re: shell script implementation of man

2008-11-19 Thread Vladimir Dronnikov
I think there is a bunch of such useful scripts. They are smaller than their C implementation and are extremely useful. The question still exists where to place them in the building tree? Regards, -- Vladimir ___ busybox mailing list busybox@busybox.net

Re: shell script implementation of man

2008-11-19 Thread Bernhard Reutner-Fischer
On Wed, Nov 19, 2008 at 09:15:51AM -0500, Matthew Hiles wrote: So I saw this in the TODO file: man It would be nice to have a man command. Not one that handles troff or anything, just one that can handle preformatted ascii man pages, possibly compressed. This could probably be a script in

Re: shell script implementation of man

2008-11-19 Thread Matthew Hiles
I'll address all the replies at once. I assume that you did not see miscutils/man.c, i fear. It appears man.c is for nroff files. This is a smaller, simpler implementation meant to answer the request in the TODO. :D Did you test this with msh ? The first version I posted, I did not. msh

Re: shell script implementation of man

2008-11-19 Thread Matthew Hiles
On Wed, Nov 19, 2008 at 12:01 PM, Yann E. MORIN [EMAIL PROTECTED] wrote: Hello Matthew! Hello all! On Wednesday 19 November 2008 16:58:15 Matthew Hiles wrote: msh does not appear to support $() style command substitution, it does support backticks. I've changed the script and it appears to

RE: shell script implementation of man

2008-11-19 Thread Cathey, Jim
I believe it is customary to use an environment variable PAGER to allow overriding of less (or more, or whatever the system default is). In ksh-speak: case $pagefile in *.bz2) bzcat $pagefile | ${PAGER:-less} ;; *.gz) zcat $pagefile | ${PAGER:-less} ;; *) ${PAGER:-less}

Re: shell script implementation of man

2008-11-19 Thread Yann E. MORIN
Hello Matthew! Hello all! On Wednesday 19 November 2008 16:58:15 Matthew Hiles wrote: msh does not appear to support $() style command substitution, it does support backticks. I've changed the script and it appears to work with msh without any issues. Do not forget that back-ticks are not

Re: shell script implementation of man

2008-11-19 Thread Paul Smith
On Wed, 2008-11-19 at 18:01 +0100, Yann E. MORIN wrote: Do not forget that back-ticks are not POSIX, while $() is. Uh... what?!?! That's absolutely not true. Backticks are unquestionably defined in the POSIX sh definition. They are not marked as old or deprecated or anything similar. It's

Re: shell script implementation of man

2008-11-19 Thread Matthew Hiles
On Wed, Nov 19, 2008 at 12:13 PM, Cathey, Jim [EMAIL PROTECTED] wrote: I believe it is customary to use an environment variable PAGER to allow overriding of less (or more, or whatever the system default is). In ksh-speak: case $pagefile in *.bz2) bzcat $pagefile | ${PAGER:-less} ;;

RE: shell script implementation of man

2008-11-19 Thread Cathey, Jim
if someone were lacking less and more they can just set PAGER to cat a viola, lots of scrolling. With viola you get lots of screeching! :-) You can even have a PAGER-less run find its own hierarchy of less/more/cat for them, et voila, perfect script! One more optimization it needs, it should

Re: shell script implementation of man

2008-11-19 Thread Yann E. MORIN
Paul, All, On Wednesday 19 November 2008 18:28:33 Paul Smith wrote: On Wed, 2008-11-19 at 18:01 +0100, Yann E. MORIN wrote: Do not forget that back-ticks are not POSIX, while $() is. Uh... what?!?! That's absolutely not true. Backticks are unquestionably defined in the POSIX sh definition.

RE: shell script implementation of man

2008-11-19 Thread Cathey, Jim
What makes you say it's /far more portable than $()/ ? Is that because $() was introduced after `` (if so is the case)? It is the case. Every shell I've ever heard of does ``, the $() thing showed up with the Korn shell and got propagated into various other shells. I believe `` is more widely

Re: shell script implementation of man

2008-11-19 Thread Paul Smith
On Wed, 2008-11-19 at 19:12 +0100, Yann E. MORIN wrote: What makes you say it's /far more portable than $()/ ? Just because there are still shells out there that don't implement $() (msh in busybox is one example, but also IIRC the Solaris /bin/sh falls into this category).

Re: shell script implementation of man

2008-11-19 Thread Matthew Hiles
On Wed, Nov 19, 2008 at 1:11 PM, Cathey, Jim [EMAIL PROTECTED] wrote: One more optimization it needs, it should check to see that stdout is a tty and only run the pager if it is, else cat. (man foo foofile) -- Jim hm.. well the easiest way to code this in is to add a line after the line that

mysterious segfault with busybox 1.13.0 ash

2008-11-19 Thread Natanael Copa
Hi, I have not been able to reproduce it in a small test script but it happens exactly here: http://dev.alpinelinux.org/cgit/cgit.cgi/alpine-baselayout/tree/init.d/runtimes#n178 row 178. I suspect it is related to the ! operator. If I insert: ! false echo foo the script will segfault and no

Re: mysterious segfault with busybox 1.13.0 ash

2008-11-19 Thread Natanael Copa
On Wed, 2008-11-19 at 20:57 +0100, Natanael Copa wrote: Hi, I have not been able to reproduce it in a small test script but it happens exactly here: http://dev.alpinelinux.org/cgit/cgit.cgi/alpine-baselayout/tree/init.d/runtimes#n178 ... Actually, I was able to create a smaller test script

Re: mysterious segfault with busybox 1.13.0 ash

2008-11-19 Thread Natanael Copa
On Wed, 2008-11-19 at 21:11 +0100, Natanael Copa wrote: interestingly enough, this happens only on a grsecurity kernel, but not on a default gentoo kernel (in chroot). tested in kvm only so far. my bad. it does segfault on my desktop too with a normal gentoo kernel. shorter testcase: ash

Re: mysterious segfault with busybox 1.13.0 ash

2008-11-19 Thread Natanael Copa
On Wed, 2008-11-19 at 21:17 +0100, Natanael Copa wrote: On Wed, 2008-11-19 at 21:11 +0100, Natanael Copa wrote: interestingly enough, this happens only on a grsecurity kernel, but not on a default gentoo kernel (in chroot). tested in kvm only so far. my bad. it does segfault on my

Re: inotifyd problems

2008-11-19 Thread Piotr Grudzinski
I tried it with BB 1.12.1. If the only event is IN_IGNORED (0x8000) the if(m) is false and 'goto done' is never executed. On my system the agent program is always called with one event at a time. Piotr So we should implicitly add IN_IGNORED to the watching mask regardless the user

Re: inotifyd problems

2008-11-19 Thread Vladimir Dronnikov
I tried it with BB 1.12.1. Always apply patches against current SVN unless the precise version is specified, Piotr. I should have told that, sorry. 1.12.1 has no knowledge of IN_IGNORED. Please, try again current SVN? -- Vladimir ___ busybox

dpkg version comparison bug

2008-11-19 Thread Eugene T. Bordenkircher
Hello all, Below, you'll find a patch against the current SVN head to fix a couple of bugs in the version comparison code for dpkg. As a brief explanation: (1) the old code did not handle epochs that were greater than a single digit, and (2) it did not compare alpha() portions of the version

Re: inotifyd problems

2008-11-19 Thread Piotr Grudzinski
So I applied patches to inotifyd.c from SVN and can see the same problem. If the only event is IN_IGNORED the 'goto done' will never be executed. I tried it with BB 1.12.1. Always apply patches against current SVN unless the precise version is specified, Piotr. I should have told that,

Re: klogd broken in 1.13.0?

2008-11-19 Thread Hamish Moffatt
On Wed, Nov 19, 2008 at 08:45:53AM +0100, Denys Vlasenko wrote: On Wednesday 19 November 2008 05:17, Hamish Moffatt wrote: I just switched from busybox 1.11.2 to 1.13.0 for a project and now kernel message logging seems a bit busted. It starts ok but then goes wrong. Application logging

Re: klogd broken in 1.13.0?

2008-11-19 Thread Denys Vlasenko
On Thursday 20 November 2008 00:41, Hamish Moffatt wrote: On Wed, Nov 19, 2008 at 08:45:53AM +0100, Denys Vlasenko wrote: Does it help if you just add this one line? /* 2 -- Read from the log. */ n = klogctl(2, log_buffer + used, KLOGD_LOGBUF_SIZE-1 -

Re: dpkg version comparison bug

2008-11-19 Thread Denys Vlasenko
On Wednesday 19 November 2008 22:54, Eugene T. Bordenkircher wrote: Hello all, Below, you'll find a patch against the current SVN head to fix a couple of bugs in the version comparison code for dpkg. As a brief explanation: (1) the old code did not handle epochs that were greater than a

Re: klogd broken in 1.13.0?

2008-11-19 Thread Hamish Moffatt
On Thu, Nov 20, 2008 at 12:48:50AM +0100, Denys Vlasenko wrote: On Thursday 20 November 2008 00:41, Hamish Moffatt wrote: On Wed, Nov 19, 2008 at 08:45:53AM +0100, Denys Vlasenko wrote: Does it help if you just add this one line? /* 2 -- Read from the log. */

[Fwd: Re: dpkg version comparison bug]

2008-11-19 Thread Eugene T. Bordenkircher
Helps to hit Reply all rather than Reply --- Hopefully this works better. Eugene Denys Vlasenko wrote: On Wednesday 19 November 2008 22:54, Eugene T. Bordenkircher wrote: Hello all, Below, you'll find a patch against the current SVN head to fix a couple of bugs in the version comparison

Re: inotifyd problems

2008-11-19 Thread Denys Vlasenko
On Tuesday 18 November 2008 18:33, Vladimir Dronnikov wrote: So we should implicitly add IN_IGNORED to the watching mask regardless the user specified it on not. Then, after we have wait()ed for the agent, we should check whether IN_IGNORED is in received event mask, and exit if it is.

Re: [PATCH] wget: add timeout parameter

2008-11-19 Thread Denys Vlasenko
On Tuesday 18 November 2008 13:56, Matthias Kaehlcke wrote: Thanks for the updated patch, i'll test and apply it soon (unless somebody beats me to it). If you experience size-increase with using quiet instead of looking at opt (i didn't try), then please follow-up. here is a new version

Re: diff -Naur

2008-11-19 Thread Denys Vlasenko
On Tuesday 18 November 2008 13:24, Vladimir Dronnikov wrote: Hello, Denys! Using the subj from current SVN I get the patches which do not substitute /dev/null for missing or being deleted files. Is it intended? Are you saying that older versions were doing this, and now it broke? I just

Re: cleanup:networking/interface.c

2008-11-19 Thread Denys Vlasenko
On Tuesday 18 November 2008 16:08, walter harms wrote: this is a cleanup patch that does not change code only rearrange it. the whole idea is to have better readable code. all size changes are due to the compiler. NTL it would be nice if someone who used IPV6 could confirm that is still

Re: inotifyd problems

2008-11-19 Thread Vladimir Dronnikov
inotifyd agent file differs from inotifyd agent file1 file2 This is easy to fix. Elegantly solved! Also I noticed bugs: - unsigned mask = IN_ALL_EVENTS done just once, must be done before each file In fact it was intended. Specified mask was meant to propagate through subsequent

Re: diff -Naur

2008-11-19 Thread Vladimir Dronnikov
Using the subj from current SVN I get the patches which do not substitute /dev/null for missing or being deleted files. Is it intended? Are you saying that older versions were doing this, and now it broke? Nope. I simply did not pay attention. BB generated diffs do not apply cleanly by