Usage of wscanw() from curses library
Leo de Wit
leo at ehviea.ine.philips.nl
Tue Jul 17 16:54:05 AEST 1990
In article <278 at asihub.AUTOSYS.COM> dan at asihub.AUTOSYS.COM (Dan O'Neill) writes:
|Under Ultrix 4.0 on a DS5000 I am having trouble with the function
|wscanw() in the curses library.
|
|Here is test program that I wrote to demonstrate the problem.
|
|#include <stdio.h>
|#include <curses.h>
|#include <signal.h>
|
|main()
|{
| char filename[20];
|
| initscr();
| wmove(stdscr, 18, 1);
| wrefresh(stdscr);
|
| wscanw(stdscr, "%s", filename);
| endwin();
|
| printf("filename: %s\n", filename);
|}
|
|This was compiled with the command:
|
| cc -g -o scan scan.c -lcurses -ltermlib
|
|When the program is run, the cursor is positioned correctly and it
|waits for input. After entering some text and pressing return, I
|expected the program to end. It does not. It seems to hang up and I
|have to kill the process from another window. Interrupts are ignored
|as well.
|
|I ran the program in the debugger and it never returns from wscanw().
If you entered a >20 character filename, I wouldn't be that surprised
if something went wrong ...
Leo.
More information about the Comp.unix.wizards
mailing list