>>I am running the following C program on a HPterminal.
>>The problem is the line "select a option: " is not displayed on
>>the screen. I will not have the problem if I run this program on
>>a SUN4 Unix machine (Non HP). Any body have a solution to this problem?
>>------------------------------ cut here ----------------
>> char c;
>> c = getch();
>> return c;
>> printf("select a option: ");
>Have you tried using the curses print routine 'printw' ?
Why should he when curses hasn't even been initialized yet? He has
the initscr() after the printf. I suspect his problem is that he
should either do an 'fflush(stdout);' after the printf or do a
'setvbuf' call before it to unbuffer stdout.
Of course, this is all ignoring the fact that every curses doc warns
you against mixing curses and stdio calls. You should pick one or the
other, although in this small example it should work (but may have problems
printing after the initscr()). If all he needs to do is get a character
in raw mode, curses is kind of overkill. The ioctl on the termio struct
is probably enough. I believe this is covered in the comp.unix.questions
Brian Bebeau | Interactive Systems (a Systemhouse company)