[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] search history

From: David Benbennick
Subject: Re: [Nano-devel] search history
Date: Mon, 21 Oct 2002 18:54:21 -0400
User-agent: Mutt/

On Mon, Oct 21, 2002 at 02:28:48PM +1000, Ken Tyler wrote:
> I sent David Benbennick the patch this morning, maybe he would be kind
> enough to commit it if it's OK.

Er, I can't.  But I've been looking at it, and I have a few comments.

1) If you're using gcc, I suggest turning on some extra warnings,

-Wall -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations -Winline -Wnested-externs

Your patch adds a few warnings.  Attached is a little patch relative to 
yours that fixes them.

2) Perhaps you could make search_history and replace_history be 
pointers, i.e.

historyheadtype *search_history;
historyheadtype *replace_history;

All the other linked list structures in Nano work this way.

3) The first 8 lines of search.c:history_init() are pretty ugly.  Is it
really necessary to assign a (historyheadtype **) value to a
(historyheadtype *) variable?

4) Take out the first hunk of the winio.c change.

5) Could you add a bit to global.c:thanks_for_all_the_fish() to deallocate 
the history lists?

In general it looks great.  I'll start using it as soon as it works in
Pico mode.  By the way, I think it's fine if you post the 6K gzipped
version on nano-devel.

Attachment: nano-hist.patch4
Description: Text document

Attachment: pgpw3GBwOy62a.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]