captoinfo help needed

Guy Harris guy at auspex.UUCP
Sat Dec 3 04:17:02 AEST 1988


>Anyone have any idea what this means?  The weird part is that a terminfo
>entry is output, but I havent been able to figure out why I also get all
>these error msgs .

It appears, from checking the S5R3.1 code, that it means it somehow got
convinced that you wanted to generate a "terminfo" entry for a terminal
called a "co#80".  Presumably, you ran "captoinfo" on a file, rather
than having it pick the terminal name from the environment, right?

It appears to find terminal names by looking for lines containing ':' or
'|' and returning the first name on the line (i.e., everything from the
beginning of the line to the first '|' or ':').  The main loop basically
does

	while ("read a line" succeeds) {
		if ("get a terminal name from the line" succeeds)
			convert the entry;
	}

So it may be that there is a line that has "co#80" at the beginning
(with no white space in front of it), followed by a ':'.  It appears
that the "convert the entry" item does *not* move the read pointer in
the file; instead, the "get a terminal name from the line" succeeds iff
the line does not begin with "#" or a white-space character, so that
"captoinfo" is making the assumption that the first line of a "termcap"
entry has no leading white space and all other lines *do* have leading
white space, and if this assumption is violated, it gets confused.

>Is this a buggy version of captoinfo?

Well, given that we haven't seen the failing "termcap" entry, it's hard
to say.  If the problem is, in fact, that a line other than the first
line of that entry doesn't have leading white space, then it's not buggy
unless you think that termcap entries shouldn't be required to have the
first line have no leading white space and all other lines have leading
white space.

>P.S.  Anyone have a freely usable version of terminfo compatible with
>System V.3 which runs on a BSD-like system (like Ultrix?)

I don't know if Pavel Curtis's "curses" is compatible with the S5R3
version or not; however, his "tic" was used as the basis of the S5R3
"tic", so it may well be.



More information about the Comp.unix.questions mailing list