TIP: Click on subject to list as thread! ANSI
echo: muffin
to: Bob Jones
from: Wes Garland
date: 2003-07-02 07:27:30
subject: Keyboard Polling...

BJ> Probably becase the code hooks another interupt to allow sharing CPU 
 BJ> time with other programs, and is probably called 
 BJ> every time in the loop sometime after the keyboard 
 BJ> is check.....  And this varied depending on which 
 BJ> multi-tasker was in use.....  That's why there are 
 BJ> key words for Desqview, OS/2 and some others.
 
Thank you! I was wondering what the hell that code was for -- now it gives
me some options to persue when I have the chance. :)
 
 BJ> I've seen this one character issue / bug in other 
 BJ> software.  I think it gets back to how the C 
 BJ> compiler libraries handle pointers on character 
 BJ> devices..... 
 
To be clear, under UNIX there are C compiler libraries (the annoying
exception being the C++ compiler libraries for gcc 3 onward) --
technically, these are OS-level libraries which compiled C code calls.
Subtle difference, but important -- it means that you can't depend on the
compiler for 'bug compatible' (etc) behaviour, because the underlying OS is
really what matters. This is actually similar to the way Windows works if
you're calling, say, winsock code from either Borland or VC, the compiler
matters not, the version of winsock.dll does.
 
Anyhow, when I fixed that bug under Maximus, what I found was that the
ncurses library didn't behave the way I thought it would -- I was asking
for a 0-second timeout on my reads with the timeout() call. This is
supposed to be equivalent to a non-blocked read, but seems to cause buggy
behaviour observed. Asking for notimeout() seems to fix it. Stupid, stupid,
stupid. Either seems to work under real curses.
 
 
Wes

--- Maximus/2 3.01
* Origin: COMM Port OS/2 juge.com 204.89.247.1 (281) 980-9671 (1:106/2000)
SEEN-BY: 633/267 270
@PATH: 106/2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.