String input problems in curses

Chris Rhodes guest at csustan.UUCP
Sun Sep 21 06:49:12 AEST 1986


( eat me. )

The following relates to curses on a Pyramid 90x running 4.2bsd:

while designing a particular application using curses, the UNIX
terminal control package, I have found that *none* of the string
input functions work - not gets, scanf, or wscanw or any of the
other curses input routines.  Most of these give me a "Bus error
(core dumped)" message (one which I have generally gotten sick of)
but scanf() loses input, e.g.:

scanf("%s",buffer);
printf("%s",buffer);

prints nothing.

I ended up having to do a 'while ( (c = getchar()) != `\n`);'
structure which works, but I fear that I may be doing something
wrong which may cause other mysterious bugs.

Does this problem sound familiar with anybody else?  Or is it
just another of those unique, mysterious curses bugs which can
be cured only by removing all traces of the program and spending
a month writing BASIC programs on a RSTS machine?

thanks in advance,

/*  Chris Rhodes / Shooting Shark
 *  Currently cowering behind lll-crg!csustan!guest
 *  real uucp : lll-crg!csuh!shark -or- lll-crg!ptsfa!harlie!shark
 *  My opinions *are* those of csustan!  Yeah, they made me spokesman, ah,
 */ president of the university!  Yeah, *that's* the ticket!



More information about the Comp.lang.c mailing list