Subject: Re: configuring terminal ports
To: Robin Birch <robin@falstaf.demon.co.uk>
From: John C. Hayward <John.C.Hayward@wheaton.edu>
List: port-vax
Date: 01/26/1997 13:19:04
On Sun, 26 Jan 1997, Robin Birch wrote:

> Dear All,
> This is a stupid one but I hit it every time I try to do this on
> different systems.
> 
> I am setting up printcap to print through a serial port and I can't find
> the "buttons to press" to vary the number of data bits and the stop bits
> in the RS232 stuff.  termcap doesn't refer to anything nor can I find
> suitable flags in the ioconf stuff.
> 
> Any ideas?.
man on printcap reveals:
     fc      num     0                 if lp is a tty, clear flag bits
                                       (sgtty.h)
     fs      num     0                 like `fc' but set bits
     xc      num     0                 if lp is a tty, clear local mode bits
                                       (tty(4))
     xs      num     0                 like `xc' but set bits
man on termios reveals
     Values of the c_cflag field describe the basic terminal hardware control,
     and are composed of the following masks.  Not all values specified are
     supported by all hardware.

           CSIZE       /* character size mask */
           CS5         /* 5 bits (pseudo) */
           CS6         /* 6 bits */
           CS7         /* 7 bits */
           CS8         /* 8 bits */
           CSTOPB      /* send 2 stop bits */
           CREAD       /* enable receiver */
           PARENB      /* parity enable */
           PARODD      /* odd parity, else even */

more of /usr/include/termios.h reveals:
#define     CS5             0x00000000      /* 5 bits (pseudo) */
#define     CS6             0x00000100      /* 6 bits */
#define     CS7             0x00000200      /* 7 bits */
#define     CS8             0x00000300      /* 8 bits */
#define CSTOPB          0x00000400      /* send 2 stop bits */
#define CREAD           0x00000800      /* enable receiver */
#define PARENB          0x00001000      /* parity enable */
#define PARODD          0x00002000      /* odd parity, else even */
or altenatively:
man printcap reveals:
     ms      str     NULL              list of terminal modes to set or clear
man stty reveals:
     Control mode flags affect hardware characteristics associated with the
     terminal.  This corresponds to the c_cflag in the termios structure.

     parenb (-parenb)
                 Enable (disable) parity generation and detection.

     parodd (-parodd)
                 Select odd (even) parity.

     cs5 cs6 cs7 cs8
                 Select character size, if possible.
Hope this helps.
johnh...


> 
> Robin
> Robin Birch     robin@falstaf.demon.co.uk
> 
> M1ASU           Old computers and radios always welcome
>