Subject: Re: defaults for tty open
To: None <, mycroft@NetBSD.ORG, wrstuden@loki.Stanford.EDU>
From: Chris Torek <>
List: tech-kern
Date: 02/02/1996 11:19:04
>Seems like there should be a library routine to parse stty flags,
>probably in libtuil...

BSD/OS has one (indeed, in libutil) ... in the interest of
compatibility :-) here is the interface.

 * Set the given stty(1)-style flags in the given termios structure.
 * We return 0 for success, -1 for failure.
 * If failp is nonzero, *failp is set to the flag that didn't parse
 * or had an illegal value, otherwise 0.
cfsetterm(t, flags, failp)
	struct termios *t;
	const char *flags;
	char **failp;

Here `flags' is the value from the :ms=: string.  (Not sure if SunOS
uses `ms'...)