[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Modifiable NMERGE in sort
From: |
Jim Meyering |
Subject: |
Re: Modifiable NMERGE in sort |
Date: |
Mon, 31 Mar 2008 16:44:26 +0200 |
"Bo Borgerson" <address@hidden> wrote:
> On Mon, Mar 31, 2008 at 2:29 AM, Paul Eggert <address@hidden> wrote:
> > Alas, that patch assumes C99, and we can't assume that quite yet.
> > Also, it mishandles nmerge values that are "too large" (you'll get
> > core dumps or worse on many hosts). That being said, it might be
> > worth adding an option like that (it's a bit specialized, but it's a
> > big performance win in some cases).
> >
>
> Ah, yes I see. Thanks for the feedback. Please allow me to take
> another stab at this.
>
> For the first issue: I've replaced the variable-length arrays in
> mergefps with pointers xnmalloc'd storage.
>
> For the second: I've introduced a small dedicated function for
> validating and applying changes to nmerge. In addition to checking
> bounds I also added a check for sort_size to ensure that it's still at
> least MIN_SORT_SIZE after an nmerge adjustment.
Re those guidelines, I've just added this paragraph ;-)
Add documentation
=================
If you add a feature or change some user-visible aspect of a program,
document it. If you add an option, document it both in --help output
(i.e., in the usage function that generates the --help output) and in
doc/coreutils.texi. The man pages are generated from --help output, so
you shouldn't need to change anything under man/. User-visible changes
are usually documented in NEWS, too.