Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - conio.h functions not supported under qnx6: (3 Items)
   
conio.h functions not supported under qnx6  
In the process of porting code over from qnx4 to qnx6 there are many function that are no longer supported.  Many I can 
write my own function to replace to old ones, but for function such as getch() and kbhit() the migration tool suggest 
using read() and tcischars().  How do you use these function on stdin?  The seem to be designed for file pointer and not
 a device.
Re: conio.h functions not supported under qnx6  
Can anyone tell me if there are any replacement function within qnx6 that work the same as getch() and kbhit()?
Re: conio.h functions not supported under qnx6  
You will need to set stdin to be unbuffered (use setvbuf) and you will need
to set STDIN_FILENO to be non blocking.

Then you can use read() and tcischars()

Billy McLean wrote:
> In the process of porting code over from qnx4 to qnx6 there are many 
> function that are no longer supported.  Many I can write my own function 
> to replace to old ones, but for function such as getch() and kbhit() the 
> migration tool suggest using read() and tcischars().  How do you use 
> these function on stdin?  The seem to be designed for file pointer and 
> not a device.
> 
> _______________________________________________
> General
> http://community.qnx.com/sf/go/post8162
> 

-- 
cburgess@qnx.com