Help needed with gettytab.c

john john at sol1.UUCP
Sat Nov 2 03:13:12 AEST 1985


Could someone please tell me what I'm doing wrong with gettytab.c
I'm trying to setup a speed table that cycles through 1200 baud then
300 baud and then 2400 baud.
It doesn't seem to be working for 2400 baud. And I'm having a tough
time finding the answer in the limited documentation.

Here is the code, minus the includes, and some commented out stuff.

struct	tab {
	char	tname;		/* this table name */
	char	nname;		/* successor table name */
	unsigned short	iiflag;		/* initial input mode */
	unsigned short	ioflag;		/* initial output mode */
	unsigned short	icflag;		/* initial control mode */
	unsigned short	ilflag;		/* initial local mode */
	unsigned short	fiflag;		/* final input mode */
	unsigned short	foflag;		/* final output mode */
	unsigned short	fcflag;		/* final control mode */
	unsigned short	flflag;		/* final local mode */
	char	line;			/* line discipline */
	char	*message;	/* login message */
} uitab[] = {

/* TABLE 'e' - 'f' -- 1200,300:	*/
'e', 'f',
0, ONLRET|CR1|OPOST,
B1200|CREAD|CS8, ECHOK,
BRKINT|IGNPAR|ISTRIP|IXON|IXANY|ICRNL,
ONLCR|OPOST|TAB3,
B1200|CREAD|CS8, ISIG|ICANON|ECHOK,
0, "\n\rlogin: ",

/* TABLE 'f' - 'g' -- 300,2400: */
'f', 'g',
0, ONLRET|CR1|OPOST,
B300|CREAD|CS8, ECHOK,
BRKINT|IGNPAR|ISTRIP|IXON|IXANY|ICRNL,
ONLCR|OPOST|TAB3,
B300|CREAD|CS8, ISIG|ICANON|ECHOK,
0, "\n\rlogin: ",

/* TABLE 'g' - 'e' -- 2400,1200: */
'g', 'e',
0, ONLRET|CR1|OPOST,
B2400|CREAD|CS8, ECHOK,
BRKINT|IGNPAR|ISTRIP|IXON|IXANY|ICRNL,
ONLCR|OPOST|TAB3,
B2400|CREAD|CS8, ISIG|ICANON|ECHOK,
0, "\n\rlogin: ",
};
int	n_uitab = sizeof uitab/sizeof uitab[0];

---------------------------------------

Any help would be greatly appreciated, as I've been struggling with
this for some time now.


	John Korsmeyer  @  THE SOLUTION

	EMAIL:  {akgua,ihnp4}!sol1!john



More information about the Comp.unix mailing list