Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83 (MC840302); site boring.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!harvard!seismo!mcvax!boring!guido
From: guido@boring.UUCP
Newsgroups: net.sources.bugs
Subject: Re: Terminfo distribution doesn't work?
Message-ID: <6276@boring.UUCP>
Date: Fri, 4-Jan-85 14:09:11 EST
Article-I.D.: boring.6276
Posted: Fri Jan  4 14:09:11 1985
Date-Received: Sun, 6-Jan-85 00:52:03 EST
References: <6273@boring.UUCP>
Reply-To: guido@boring.UUCP (Guido van Rossum)
Distribution: net
Organization: "Stamp Out BASIC" Committee, CWI, Amsterdam
Lines: 29
Summary: Apparently-To: rnews@mcvax.LOCAL

In article <6273@boring.UUCP> I asked help with running the test program,
mille, for the terminfo library.  I got two replies, telling me that the
program has a bug, namely it doesn't check the return of initscr(),
and if there is something wrong with the TERM or TERMINFO environment
variables (so the definition can't be found), initscr() fails but
mille continues as if all is well.  It then crashes when it passes
garbage to delwin().

I made the following simple fix to mille: change the initscr() call to:
	if (initscr() == ERR) {
		printf("Sorry.  No terminal description found.");
		printf("  (Check TERM or TERMINFO variables)\n");
		exit(-1);
	}

We have a compatibility problem here.  Good ol' curses' initscr()
would never fail -- if nothing was found out about the terminal,
it would assume a paper tty, and at least output some garbage.
Therefor probably every program in the world that used curses
has to be changed in this respect.

System V wizards -- is this true in the system V terminfo library
too?

	Guido van Rossum, "Stamp Out BASIC" Committee, CWI, Amsterdam
	guido@mcvax.UUCP

"Immorality may be something, but it does not take the place of virtue and
three square meals a day."