[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nano-devel] another use for free_shortcutage()
From: |
Steven Kneizys |
Subject: |
Re: [Nano-devel] another use for free_shortcutage() |
Date: |
Tue, 19 Feb 2002 09:41:23 -0800 (PST) |
That seems to work :)
I changed the declaration of free_shortcutage from void to int to be
consistent with the free_filestruct, and put a mention of it in proto.h
just below the one for free_filestruct.
It compiled under the native cc compiler on the Alpha here at work
running Digital Unix 4.0d (having trouble making private libraries and
such for my gnu stuff.) With the multibuffer switched instead of
copied it seems to be okay too (but I may put in paranoia stuff in the
cleanup routine "thanks_for_the_memories" in case open_files->file ==
fileage to prevent double frees.)
take care,
Steve...
--- David Lawrence Ramsey <address@hidden> wrote:
> Your free_shortcutage() function is apparently the key to
> fixing the main_list shortcut overflow problem I mentioned a
> few days ago. I believe the following is needed to fix it
> (and no, this is not a real diff, since I'm not in front of
> my Linux box, but since all the changes are in
> shortcut_init() in global.c, the context lines should make
> it easy enough to find where to put the changes):
> ------------------------------------------------------------
> #endif
> #ifdef ENABLE_MULTIBUFFER
> char *nano_openprev_msg = "", *nano_opennext_msg = "";
> #endif
>
> + int reinit_main_list = 0;
> + if (main_list) {
> + free_shortcutage(&main_list);
> + reinit_main_list = 1;
> + }
>
> nano_help_msg = _("Invoke the help menu");
> nano_writeout_msg = _("Write the current file to disk");
>
> #ifdef ENABLE_MULTIBUFFER
> ------------------------------------------------------------
> sc_init_one(&main_list, -9, _("Next File"),
> nano_opennext_msg,
> NANO_OPENNEXT_KEY, 0, 0, VIEW, open_nextfile_void);
> #endif
>
> + if (reinit_main_list)
> + return;
>
> sc_init_one(&whereis_list, NANO_HELP_KEY,
> _("Get Help"), nano_help_msg, 0, 0, 0, VIEW, do_help);
>
> sc_init_one(&whereis_list, NANO_CANCEL_KEY,
> ------------------------------------------------------------
> Let me know if it works.
>
>
> _____________________________________________________________
> Sluggy.Net: The Sluggy Freelance Community!
>
> _______________________________________________
> Nano-devel mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/nano-devel
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - Coverage of the 2002 Olympic Games
http://sports.yahoo.com