Re: Question about critical_factorization() in the Two-Way algorithm

2010-06-21 Thread Eric Blake
On 06/21/2010 05:30 PM, Eric Blake wrote: > starting with a comparison of x[0] and x[1]), we can instead start with > only reduced-length suffixes (that is, start with a comparison of x[1] > and x[2]), for one less comparison, and a slightly faster factorization > time. Followup - the number of co

[PATCH] memmem: slight optimization

2010-06-21 Thread Eric Blake
For any needle, the factorization 0/n has a local period of 1, so it is a critical factorization iff the entire needle consists only of a single repeated byte, in which case 1/n-1 would also be critical. Starting with a comparison of x[0] and x[1] in the maximal suffix check will either find the 0/

Re: Question about critical_factorization() in the Two-Way algorithm

2010-06-21 Thread Eric Blake
[adding bug-gnulib] On 06/20/2010 10:00 PM, Carlos wrote: > Howdy -- I'm writing an article for Code Quarterly on pattern > matching, featuring the Two-Way algorithm, which you added > to libc and gnulib a couple of years back. > > There is one result of the critical factorization phase I haven't

Re: A couple of issues building idutils 4.5 on HP-UX 11

2010-06-21 Thread Bruno Haible
Jim Meyering wrote: > Looks good to me and passed this smoke test Thanks. I pushed the three patches, together with an obvious renaming of the substituted variables. Bruno

Re: Support script exceptions

2010-06-21 Thread Ralf Wildenhues
Hi Brett, * Brett Smith wrote on Mon, Jun 21, 2010 at 04:22:28PM CEST: > RMS and I have been looking at some of the GNU programs that are still > on old licenses with exceptions, and figuring out whether and how they > should be updated. We had some unique ideas about some of the support > script

Re: [bug-idutils] A couple of issues building idutils 4.5 on HP-UX 11

2010-06-21 Thread Claudio Fontana
Hi Bruno, how about Jim's suggestion to remove the cast completely? Or is that code used also in C++, where a cast might be necessary? Ciao, Claudio

Re: [bug-idutils] A couple of issues building idutils 4.5 on HP-UX 11

2010-06-21 Thread Richard Lloyd
> Can you show the compiler's complete error message, please? I can't imagine > a C compiler that refuses to cast a 'void *' to 'char **'. OK, an unmodified gnulib-tests/setenv.c from idutils 4.5 reports this when compiled with HP's ANSI C compiler on HP-UX 11.11 (PA-RISC platform) via the "gmake

Support script exceptions

2010-06-21 Thread Brett Smith
Hi everyone, RMS and I have been looking at some of the GNU programs that are still on old licenses with exceptions, and figuring out whether and how they should be updated. We had some unique ideas about some of the support scripts that a lot of GNU packages use, and we wanted to check with you

Re: [bug-idutils] A couple of issues building idutils 4.5 on HP-UX 11

2010-06-21 Thread Bruno Haible
Hi Claudio, > ... suggestion to remove the cast completely? This suggestion would not help fixing the problem, because the problem was that malloc and/or realloc were not declared, according to the compiler error message. > Or is that code used also in C++, where a cast might be necessary? 1. Y