Bug 90104 - kterm tty line speed problem
Summary: kterm tty line speed problem
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Emanuel Haupt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-08 13:50 UTC by n-kogane
Modified: 2005-12-21 00:07 UTC (History)
0 users

See Also:


Attachments
file.diff (278 bytes, patch)
2005-12-08 13:50 UTC, n-kogane
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description n-kogane 2005-12-08 13:50:02 UTC
	ports/japanese/kterm:
	kterm returns 13 as a speed of tty.
	normal speed is 9600.

How-To-Repeat: 	test program:

#include <stdio.h>
#include <termios.h>

int
main(argc, argv)
	int argc;
	char *argv[];
{
	struct termios tbuf;
	struct winsize ws;
	speed_t speed;
	int screenheight, realscreenheight, screenwidth;

	if (ioctl(1, TIOCGWINSZ, (char *)&ws) < 0)
		ws.ws_col = ws.ws_row = 0;
	if (tcgetattr(1, &tbuf) < 0) {
		speed = B9600;
		printf("tcgetattr < 0\n");
	}
	else {
		speed = cfgetospeed(&tbuf);
	}
	printf("c_ispeed=%d\n", tbuf.c_ispeed);
	printf("c_ospeed=%d\n", tbuf.c_ospeed);
	printf("speed=%d\n", speed);
	if (speed < B1200)
		screenheight = 9;
	else if (speed == B1200)
		screenheight = 14;
	else if (ws.ws_row != 0)
		screenheight = ws.ws_row;
	else
		screenheight = 24;
	printf("screenheight=%d\n", screenheight);
	if ((realscreenheight = ws.ws_row) == 0)
		realscreenheight = 24;
	printf("realscreenheight=%d\n", realscreenheight);
	if ((screenwidth = ws.ws_col) == 0)
		screenwidth = 80;
	printf("screenwidth=%d\n", screenwidth);
}
Comment 1 Emanuel Haupt freebsd_committer 2005-12-08 17:13:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ehaupt

Take.
Comment 2 Emanuel Haupt freebsd_committer 2005-12-08 17:13:58 UTC
State Changed
From-To: open->feedback

Ask for maintainer feedback.
Comment 3 Emanuel Haupt freebsd_committer 2005-12-10 15:17:33 UTC
Can you provide a committable patch?

-- 
GnuPG key id: 0x55E67774         Download: http://pgp.mit.edu:11371
Key fingerprint: 17B3 FD8F BA68 4AB4 10FD  A9D1 AD52 6588 55E6 7774
Comment 4 Emanuel Haupt freebsd_committer 2005-12-21 00:07:01 UTC
State Changed
From-To: feedback->closed

Patch added, thanks!