Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jul 2002 13:22:22 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Alex Dupre <sysadmin@alexdupre.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: terminfo/termcap and cygwin
Message-ID:  <3D2C977E.F4EC2346@mindspring.com>
References:  <55271305897.20020710154832@alexdupre.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Alex Dupre wrote:
> In normal situation accessing to a FreeBSD 4.x machine from cygwin is not
> very pleasant: editing files is quite a pain, there are many terminal
> "glitches" like the cursor in the wrong position and garbage text.

Sounds like Cygwin's terminal program fails to correctly implement
the ANSI 3.64 standard.  Could you use an ANSI 3.64 standard terminal,
instead?  Windows Telnet is standards compliant, for example.


> I read that FreeBSD uses termcap rather than terminfo, but either the
> included cygwin entry or the terminfo-generated one don't work correctly. So
> the binary terminfo seems to be the only solution (and termcap seems to be
> not so powerful).

Termcap is more powerful.  The author of terminfo, Bill Joy, has
stated this in interviews: you can arbitrarily add attributes to
termcap without having to recompile all your applications.  With
terminfo, since it stores raw structure images, adding a field
changes the structure size, and potentially the order of the elements,
and therefore you must recompile everything that uses it, if you add
a field.  The primary design goals of terminfo were:

o	Abuse the FS as a database to facilitate fast lookups using
	the system FS directory structure, rather than an ordered
	search for a newline followed by a non-whitespace character
	listing alternate values seperated by the pipe ('|') symbol
	up to the first colon (':') symbol.

o	Keep users from screwing up the database, because the average
	user does not understand how to write proper terminal
	descriptions, by reserving the avility to add/edit such
	descriptions to the vendor.


> My question is: should terminfo database be installed (manually or by
> make/installworld) or is there a better fix?

"No" and "Yes", answered in the order asked.

The ultimate fix is to have your terminal program comply with the
standards.

Failing that, you need to write a correct entry.

I'm going to guess that either a cursor movement optimization is
triggering a bug in the emulator state machine, or you aren't
setting the autowrap/automargin attribute correctly in the termcap
entry.  These are the most common termcap errors.

Actually, if you do a search for:

	termcap entry test program

You should be able to quickly identify what's wrong with your
termcap entry, or if it's actually another Cygwin bug.

-- Terry

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D2C977E.F4EC2346>