home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!dtix!darwin.sura.net!convex!news.utdallas.edu!ggraham
- From: ggraham@utdallas.edu (Gregory S. Graham)
- Newsgroups: comp.unix.programmer
- Subject: Curses help
- Summary: I need to know how to make the cursor invisible.
- Keywords: curses, cursor, curs_set, leaveok
- Message-ID: <1992Sep10.151148.6612@utdallas.edu>
- Date: 10 Sep 92 15:11:48 GMT
- Sender: usenet@utdallas.edu
- Distribution: usa
- Organization: Univ. of Texas at Dallas
- Lines: 39
- Nntp-Posting-Host: csclass.utdallas.edu
-
- I have been unable to get curses to cause the cursor to not appear on the
- screen. I have tried the curs_set and leaveok calls, both of which the man
- page says can turn off the cursor. I get ERR returned from curs_set and
- leaveok does not turn off the cursor.
-
- I am using a Silicon Graphics 340VGX with IRIX 4.0.1. I am using a VT220
- terminal or a PC running NCSA telnet with the TERM environment variable
- set to vt100. I have the same problem using the SGI console window with
- TERM=iris-ansi. I have also tried this on a Sun 4 running Sun OS 4.1.1 with
- the NCSA telnet PC for a terminal and the results were the same.
-
- I would appreciate any help.
-
- Code example follows:
-
- #include <curses.h>
- main()
- {
- char c;
- int i;
-
- /* setup curses */
- initscr();
- cbreak();
- noecho();
-
- /* two attempts to turn off the cursor */
- leaveok(stdscr, TRUE);
- i = curs_set(0);
-
- /* test message */
- mvaddstr(3, 4, "");
- mvprintw(4, 4, "Cursor Test, curs_set returns %d", i);
- refresh();
-
- /* wait for a keypress so that screen can be observed */
- c = getch();
- endwin();
- }
-