mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Use second terminal name instead of obsoleted and duplicated
first two-letter names (from 1.1.5.1)
This commit is contained in:
parent
a152929b02
commit
28fccc1749
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=2598
@ -180,10 +180,15 @@ main(argc, argv)
|
||||
tcsetattr(STDERR_FILENO, TCSADRAIN, &mode);
|
||||
}
|
||||
|
||||
/* Get the terminal name from the entry. */
|
||||
p = tcapbuf;
|
||||
if (p != NULL && *p != ':') {
|
||||
t = p;
|
||||
/*
|
||||
* The termcap file generally has a two-character name first in each
|
||||
* entry followed by more descriptive names. If we ended up with the
|
||||
* first one, we switch to the second one for setting or reporting
|
||||
* information.
|
||||
*/
|
||||
p = strpbrk(tcapbuf, "|:");
|
||||
if (p != NULL && *p != ':' && !strncmp(ttype, tcapbuf, p - tcapbuf)) {
|
||||
t = ++p;
|
||||
if (p = strpbrk(p, "|:")) {
|
||||
savech = *p;
|
||||
*p = '\0';
|
||||
|
Loading…
Reference in New Issue
Block a user