[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-current-users
Subject:    Re: vi core dump
From:       blymn () baesystems ! com ! au (Brett Lymn)
Date:       2001-12-30 10:20:12
[Download RAW message or body]

According to Aymeric Vincent:
>
>It's okay, the bug has been analyzed and I sent a patch to Brett Lymn,
>who will apply it if he thinks it's OK.
>

Yes, that patch looks fine.  I shall apply it and commit a new version
of libcurses tonight.

>In short, the problem comes from the fact that nvi calls endwin() and
>newterm() at every resize event, and the curses library is confused by
>this "weird" behaviour.
>

This is very weird behaviour - I assume they do this to work around
some curses libraries not having a resizeterm function.  Is there any
config option to use resizeterm?

>This buggy behaviour did not and does not occur with initscr() because
>initscr() is by essence allowed to make certain assumptions
>(i.e. overwrite a lot of global variables) that newterm() might not be
>allowed to.
>

pretty much right.  The initscr call is only supposed to be called
once to initialise curses - this function used to set up a whole swag
of globals to hold the curses internal state.  These days initscr is
just a wrapper call to newterm().  The function newterm() allows an
application to talk to multiple, possibly different, terminals at the
same time.


-- 
===============================================================================
Brett Lymn, Computer Systems Administrator, BAE SYSTEMS
===============================================================================


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic