bug-ncurses
[Top][All Lists]
Advanced

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

Re: Fwd: Port of curses to Linux


From: Thomas Dickey
Subject: Re: Fwd: Port of curses to Linux
Date: Tue, 17 Dec 2002 18:04:07 -0500
User-agent: Mutt/1.3.27i

On Tue, Dec 17, 2002 at 09:12:27AM -0800, Zeyd Ben-Halim wrote:
> 
> Note: forwarded message attached.

hmm - it was mis-directed....

The current version of ncurses is 5.3 (20021012)
There's an faq at
        http://dickey.his.com/ncurses/ncurses.faq.html
 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
> Date: Tue, 17 Dec 2002 11:43:56 -0500
> From: Jane Anderson <address@hidden>
> Subject: Port of curses to Linux
> To: "'address@hidden'" <address@hidden>,
>    "'address@hidden'" <address@hidden>,
>    "'address@hidden'"
>        <address@hidden>
> X-Mailer: Internet Mail Service (5.5.2653.19)
> 
> Dear Mr. Ben-Halim,  Mr. Raymond, Mr. Padala,
> I am not sure where to send this letter, and so my apologies if it is
> mis-directed.
> 
>      I have had some problems with the curses mouse events and think that
> there may be a problem with my ncurses.h 
> (the header says Id$: curses.h in v 1.97, 2000/12/10.)
> 
>   When  the event.bstate  is tested against BUTTON1_PRESSED, etc,  the tests
> always fail.  I discovered in  the ncurses.h file that the macros are all
> declared to be longs  (e.g. 00000040000L).  I wonder if they are supposed to
> be hex (e.g. 0x000000400000). The documentation for the mousemask indicates
> that these are to be used as bit masks.  I  am reluctant to change the
> ncurses.h file, since I don't know the extent of the implications of doing
> this.  

There's no reason to change the values, since event.bstate is an unsigned
long, and the mask constants also are.  (It's been that way for quite a
while):

typedef unsigned long mmask_t;

typedef struct
{
    short id;           /* ID to distinguish multiple devices */
    int x, y, z;        /* event coordinates (character-cell) */
    mmask_t bstate;     /* button state bits */
}
MEVENT;


-- 
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net



reply via email to

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