Thanks for all the info on this subject. First prize to Danny Johnson
who presented the table I was after. Most respondants pointed out that
the O_xxxx variables listed in <sys/ttold.h> with values in the
range 0x00000001 to 0x00008000 correspond to the bits used in the fs
mask, and the O_xxxx variables in the range 0x00010000 to 0x80000000
correspond to the bits used in the xs mask. After that it's just a matter
of convering from hex to octal to get the required fs/xs masks. Danny's
table does that. Watch out for the comment against "TANDEM" -its a bit
misleading (not Danny's fault -its that way in <sys/ttold.h>). TANDEM 's
comment should read "Enable start/stop input control"
danny@ews7.dseg.ti.com (Danny Johnson)
glenn@uniq.com.au (Glenn Satchell - Uniq Professional Services)
mike@trdlnk.com (Michael Sullivan)
Mike Raffety <mike_raffety@com.swissbank.us.il>
blymn@awadi.com.AU (Brett Lymn)
Brian Clark <brian@hera.psy.man.ac.uk>
gdonl@gv.ssi1.com (Don Lewis)
Here's Danny's offering...
PROBLEM EXTENDED DESCRIPTION:
what do 'xc/xs' and 'fc/fs' do in /etc/printcap
RESOLUTION:
xc and fc clear bits;
xs and fs set bits;
see below:
bit masks cleared/set by fc/fs command (printcap)
octal!! printer term
mask usual usual
name bits value value
-------- ------- ------- -------
O_TANDEM 0000001 0000000 0000000 /* send stopc on out q full */
O_CBREAK 0000002 0000000 0000000 /* half-raw half-cooked mode */
O_LCASE 0000004 0000000 0000000 /* simulate lower case */
O_ECHO 0000010 0000000 0000010 /* echo input */
O_CRMOD 0000020 0000020 0000020 /* map \n to \r\n on output */
O_RAW 0000040 0000000 0000000 /* no i/o processing */
O_ANYP 0000300 0000300 0000300 /* get any parity/send none */
O_ODDP 0000100 /* get/send odd parity */
O_EVENP 0000200 /* get/send even parity */
O_NLDELAY 0001400 0000000 0000000 /* \n delay */
O_NL0 0000000 /* no delay */
O_NL1 0000400 /* tty 37 */
O_NL2 0001000 /* vt05 */
O_NL3 0001400
O_XTABS 0006000 0006000 0000000 /* expand tabs on output */
O_TBDELAY 0006000 /* horizontal tab delay */
O_TAB0 0000000 /* no delay */
O_TAB1 0002000 /* tty 37 */
O_TAB2 0004000
O_CRDELAY 0030000 0000000 0000000 /* \r delay */
O_CR0 0000000 /* no delay */
O_CR1 0010000 /* tn 300 */
O_CR2 0020000 /* tty 37 */
O_CR3 0030000 /* concept 100 */
O_VTDELAY 0040000 0000000 0000000 /* vertical tab delay */
O_FF0 0000000 /* no delay */
O_FF1 0040000 /* tty 37 */
O_BSDELAY 0100000 0000000 0000000 /* \b delay */
O_BS0 0000000 /* no delay */
O_BS1 0100000
-----------------------------------------
total common value 0006320 0000330
bit masks cleared/set by xc/xs command (printcap)
octal!! printer term
mask usual usual
name bits value value
-------- ------- ------- -------
O_CRTBS 0000001 0000000 0000001 /* do backspacing for crt */
O_PRTERA 0000002 0000000 0000000 /* \ ... / erase */
O_CRTERA 0000004 0000000 0000004 /* " \b " to wipe out char */
O_TILDE 0000010 0000000 0000000 /* hazeltine tilde kludge */
O_MDMBUF 0000020 0000000 0000000 /* start/stop output on carrier intr */
O_LITOUT 0000040 0000000 0000000 /* literal output */
O_TOSTOP 0000100 0000000 0000000 /* SIGSTOP on background output */
O_FLUSHO 0000200 0000000 0000000 /* flush output to terminal */
O_NOHANG 0000400 0000000 0000000 /* no SIGHUP on carrier drop */
O_L001000 0001000 0000000 0000000
O_CRTKIL 0002000 0000000 0002000 /* kill line with " \b " */
O_PASS8 0004000 0000000 0000000 /* pass all 8 bits */
O_CTLECH 0010000 0000000 0010000 /* echo control chars as ^X */
O_PENDIN 0020000 0000000 0000000 /* tp->t_rawq needs reread */
O_DECCTQ 0040000 0000000 0040000 /* only ^Q starts after ^S */
O_NOFLSH 0100000 0000000 0000000 /* no output flush on signal */
-----------------------------------------
total common value 0000000 0052005
SYMPTOMS SEARCHED: /etc/printcap
****************************************************************************
Original Query:
> From sun-managers-relay@ra.mcs.anl.gov Tue Jun 7 20:20:02 1994
> From: sys013@aberdeen.ac.uk
> To: sun-managers@eecs.nwu.edu
> Subject: Printcap: Details of fs and xs masks
>
> Hello Sun-managers,
>
> I'm looking for an explanation of the bits in the xs and fs masks which control
> terminal I/O in the /etc/printcap file. I find the info in
> the man page a bit puzzling. eg it says ...
>
> For example, to set exactly the
> flags 06300 in the fs field, which specifies that the EVENP,
> ODDP, and XTABS modes are to be set, and all other flags are
> to be cleared, do:
> :fc#0177777:fs#06300:
>
> That sets 3 options using 4 bits?? Following the man page comment " See
> ttcompat(4M) for a description of these flags" doesnt reveal the reqd.
> info in terms of what the bits are.
>
> Once I find out what they are, I'll use "ms" as a more easily understood
> way of specifying terminal parameters. My present printcap entries are
> largely derived from info from the net where the fc/fs style seems more
> popular. Is there a reason for this? Am I about to descend suddenly in a
> manner liable to be injurious to my person???
>
Thanks to all who replied.
-------------------------------------------------------------------------
Gordon Robertson, Head of Systems, Aberdeen University Computing Centre
Tel +44(0)224 273340
E-Mail : g.robertson@abdn.ac.uk
--------------------------------------------------------------------------
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:09:03 CDT