dan@asihub.AUTOSYS.COM (Dan O'Neill) (07/12/90)
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().
Hope someone can provide some help. Thanks.
--
Dan O'Neill dan@autosys.com {uunet|ncr-sd}!asihub!dan
Automated Systems, Inc. San Diego R&D
leo@ehviea.ine.philips.nl (Leo de Wit) (07/17/90)
In article <278@asihub.AUTOSYS.COM> dan@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.