| Summary: | Re: getch ncurses man page confuses noecho and echo. | ||
|---|---|---|---|
| Product: | Base System | Reporter: | nzanella <nzanella> |
| Component: | kern | Assignee: | GNATS administrator <gnats-admin> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | CC: | FreeBSD-gnats-submit |
| Priority: | Normal | ||
| Version: | 1.0-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
State Changed From-To: open->closed Followup to docs/18709. |
Hello, I tested echo mode with curses on SunOS 5.7 and found that the results were different than those I got with ncurses. I added an endwin() and replaced <ncurses.h> with <curses.h> for correctness. I also changed the newline character to 'x' in the looping construct so that the result of entering a newline in echo() mode is also tested: #include <curses.h> int main(int argc, char **argv) { initscr(); cbreak(); clear(); echo(); move(0,0); printw("Testing with echo."); move(1,0); while( getch() != 'x' ); endwin(); return 0; } The results I obtained on SunOS agree with the treatment of special characters by certain functions such as getch() described at: <http://www.opengroup.org/onlinepubs/7908799/xcurses/intov.html#tag_001_004_003> The same page has a table of function families which specifies that getch() performs special-character processing. Best Regards, Neil Zanella nzanella@cs.mun.ca