Re: yesno module consumes too much input

2007-08-17 Thread Paul Eggert
Eric Blake-1 <[EMAIL PROTECTED]> writes: > is it reasonable to have yesno install an atexit > handler on first invocation? If the handler is not present, > then stdin was never used (at least not by yesno). Yes, that sounds reasonable to me. Also, I forgot, you also mentioned something about th

Re: new module 'fstrcmp', generic diff algorithm

2007-08-17 Thread Paul Eggert
Here are the diffutils changes I just installed, in order to use the new diffseq module in gnulib. 2007-08-17 Paul Eggert <[EMAIL PROTECTED]> Break out diffseq.h into a separate file, so that gettext can use this code. Idea and code from Bruno Haible. * bootstrap.conf (

Re: new module 'fstrcmp', generic diff algorithm

2007-08-17 Thread Paul Eggert
Bruno Haible <[EMAIL PROTECTED]> writes: > 2007-07-01 Bruno Haible <[EMAIL PROTECTED]> > > * modules/fstrcmp: New file, from GNU gettext. > * lib/diffseq.h: New file, from GNU gettext, extracted from > GNU gettext's fstrcmp.c and GNU diff's analyze.c. > * lib/fstrcmp.h: N

merged coreutils bootstrap changes into gnulib

2007-08-17 Thread Paul Eggert
Diffutils wouldn't build due to changes a few weeks ago that added a subdirectory to gnulib/lib. I fixed the problem by upgrading to coreutils's bootstrap script which had a change back on July 8 to do this. I installed the following patch into gnulib to make this work for everybody else. 2007-0

Re: yesno module consumes too much input

2007-08-17 Thread Eric Blake-1
> > Don't consume too much input when stdin is seekable. > > * lib/yesno.c (yesno): Flush seekable stdin. > > * modules/yesno (Depends-on): Add fflush. > > Won't this patch result in lots of unnecessary system calls for a > program that reads a lot of 'y's and 'n'n from a file? Ouch

Re: yesno module consumes too much input

2007-08-17 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: ... > My kneejerk reaction is that a modified 'closein' is a better way to > go here. That is, the affected programs (and there are not that many > of them) should invoke close_stdin if they have attempted to read > anything from stdin and have not read end-o

Re: yesno module consumes too much input

2007-08-17 Thread Paul Eggert
Eric Blake-1 <[EMAIL PROTECTED]> writes: > 2007-08-17 Eric Blake <[EMAIL PROTECTED]> > > Don't consume too much input when stdin is seekable. > * lib/yesno.c (yesno): Flush seekable stdin. > * modules/yesno (Depends-on): Add fflush. Won't this patch result in lots of unnecessa

Re: yesno module consumes too much input

2007-08-17 Thread Jim Meyering
Eric Blake-1 <[EMAIL PROTECTED]> wrote: > The yesno module has a problem on platforms where exit() > does not implicitly flush seekable input streams (this behavior > of exit() is contrary to POSIX, but glibc behaves this way, > and Ulrich was unwilling to fix the glibc bug [1]). Basically, > beca

Re: yesno module consumes too much input

2007-08-17 Thread Eric Blake-1
> The yesno module has a problem on platforms where exit() > does not implicitly flush seekable input streams The yesno module also has a potential POSIX-compliance problem on all platforms. Inside rpmatch, the code uses _("^[yY]") to get the locale-specific regex to use as the yesexpr. However

yesno module consumes too much input

2007-08-17 Thread Eric Blake-1
The yesno module has a problem on platforms where exit() does not implicitly flush seekable input streams (this behavior of exit() is contrary to POSIX, but glibc behaves this way, and Ulrich was unwilling to fix the glibc bug [1]). Basically, because the yesno module consumes input from stdin, i

Re: idcache

2007-08-17 Thread Jim Meyering
[EMAIL PROTECTED] wrote: > is the header file for idcache.c just missing? Yep. Known ugliness. Just waiting for you to mention it :-) That whole module isn't very pretty. And it makes any application that uses it (like ls) look like it has a leak. Here's what I'll probably commit to address th

idcache

2007-08-17 Thread sky
Hello, is the header file for idcache.c just missing? Leslie