emacs-devel
[Top][All Lists]
Advanced

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

Re: Strange test in xdisp.c


From: Kim F. Storm
Subject: Re: Strange test in xdisp.c
Date: Tue, 16 Nov 2004 10:35:49 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

Stefan <address@hidden> writes:

>> XFASTINT and a test for <= 0 seems a bit odd to me.
>
>>   /* If bottom moved off end of frame, change mode line percentage.  */
>>   if (XFASTINT (w->window_end_pos) <= 0
>>       && Z != IT_CHARPOS (it))
>>     w-> update_mode_line = Qt;
>
> Hmm... indeed odd.  I'd guess that the "== 0" part of "<= 0" is the one used
> and the "< 0" part is basically never activated.  I'd hope that if
> window_end_pos had ever been something else than an integer, ENABLE_CHECKING
> would have cought it (I always run with it).

In most places, it is set like this:

   w->window_end_pos = make_number (...)

And with USE_LSB_TAG, we have 

#define XFASTINT(x) XINT(x)

so I guess ENABLE_CHECKING would not catch it in that case...


All of this XFASTINT stuff seems bogus to me these days as we
move towards USE_LSB_TAG on more platforms...

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

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