Re: Pager
On Monday, 31 October 2005 at 12:14, Thomas Roessler wrote:
> On 2005-10-25 14:45:02 +0200, Adeodato Simó wrote:
>
> > http://bugs.debian.org/334416
>
> I guess Brendon rightly identified the underlying change as a gross
> hack in the ChangeLog, using static variables to keep (a) the top
> line and (b) a pointer to a header structure (the latter as an
> indicator), hoping that that address isn't reused by another malloc,
> and also hoping that the temporary file created upon re-rendering of
> the message will look the same as the temporary file you were
> looking at.
>
> (Note that there is any number of reasons why it might look
> differently.)
>
> A cleaner solution would be to have some kind of a persistent pager
> object (with all the pager's local variables as components of a
> structure) that can be passed up to the index, and back down to the
> pager again. This, however, would be a bit more effort to do than
> the current code.
hence the gross hack :)
> Anyway, what I'm getting to is wondering if the bug report that this
> was supposed to fix was bad enough that it merits the effort of the
> correct solution or the ugliness of the current one. I'd really
> prefer to get rid of the current "gross hack."
>
> Any thoughts on that?
I'm ambivalent. I suppose the delete behaviour might be annoying. I'd
be tempted to just reset the static variable on delete, but I
personally don't really do much from inside the pager anyway, so if
the hack gets removed I won't complain. It did seem to make some
people happy though.