🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.c
Article #9354

String input problems in curses

#9354
From: Chris Rhodes
Date: Sat, 20 Sep 1986 20:49
32 lines
1788 bytes
( 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!
Technical Details
Message-ID: <183@csustan.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!lll-lcc!csustan!guest

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!lll-lcc!csustan!guest
From: guest@csustan.UUCP (Chris Rhodes)
Newsgroups: net.lang.c
Subject: String input problems in curses
Message-ID: <183@csustan.UUCP>
Date: Sat, 20-Sep-86 16:49:12 EDT
Article-I.D.: csustan.183
Posted: Sat Sep 20 16:49:12 1986
Date-Received: Sat, 20-Sep-86 21:09:26 EDT
Reply-To: guest@csustan.UUCP (Chris Rhodes)
Distribution: na
Organization: Tiburon Systems
Lines: 32
Summary: I *hate* curses.  I really do.