From stb@schlepper.zs64.net  Thu Jan 23 10:29:58 2003
Return-Path: <stb@schlepper.zs64.net>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E0B7037B401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 23 Jan 2003 10:29:58 -0800 (PST)
Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C4FFF43F43
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 23 Jan 2003 10:29:57 -0800 (PST)
	(envelope-from stb@schlepper.zs64.net)
Received: (from stb@localhost)
	by schlepper.zs64.net (8.12.6/8.11.1) id h0NITuAS095261;
	Thu, 23 Jan 2003 19:29:56 +0100 (CET)
	(envelope-from stb)
Message-Id: <200301231829.h0NITuAS095261@schlepper.zs64.net>
Date: Thu, 23 Jan 2003 19:29:56 +0100 (CET)
From: Stefan Bethke <stb@lassitu.de>
Reply-To: Stefan Bethke <stb@lassitu.de>
To: FreeBSD-gnats-submit@freebsd.org, freebsd-doc@FreeBSD.ORG
Cc:
Subject: Printing chapter of handbook explains functionality removed 6 years ago
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         47411
>Category:       docs
>Synopsis:       Printing chapter of handbook explains functionality removed 6 years ago
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    mheinen
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan 23 10:30:00 PST 2003
>Closed-Date:    Fri Feb 07 11:24:53 PST 2003
>Last-Modified:  Fri Feb 07 11:24:53 PST 2003
>Originator:     Stefan Bethke
>Release:        n/a
>Organization:
>Environment:
>Description:
    Section 11.3.1.4.5. Configuring Spooler Communication Parameters
    documents the fc#, fs#, xc#, and xs# printcap(5) capabilities, which
    were removed over six years ago:
    http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/lpr/lpr/printcap.5#rev1.2
    http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/lpr/common_source/common.c#rev1.3

>How-To-Repeat:
    n/a
>Fix:

Index: chapter.sgml
===================================================================
RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/printing/chapter.sgml,v
retrieving revision 1.65
diff -u -r1.65 chapter.sgml
--- chapter.sgml	12 Jan 2003 18:31:45 -0000	1.65
+++ chapter.sgml	23 Jan 2003 17:33:07 -0000
@@ -1256,78 +1256,41 @@
 		  <replaceable>bps-rate</replaceable>, where
 		  <replaceable>bps-rate</replaceable> can be 50, 75, 110,
 		  134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600,
-		  19200, or 38400 bits-per-second.</para>
+		  19200, 38400, 57600, or 115200 bits-per-second.</para>
 	      </listitem>
 	    </varlistentry>
 
 	    <varlistentry>
-	      <term><literal>fc#<replaceable>clear-bits</replaceable></literal></term>
+	      <term><literal>ms#<replaceable>stty-mode</replaceable></literal></term>
 
 	      <listitem>
-		<para>Clears the flag bits
-		  <replaceable>clear-bits</replaceable> in the
-		  <replaceable>sgttyb</replaceable> structure after
-		  opening the device.</para>
+                <para>Sets the options for the terminal device after
+                  opening the device. &man.stty.1; explains the available
+                  options.</para>
 	      </listitem>
 	    </varlistentry>
 
-	    <varlistentry>
-	      <term><literal>fs#<replaceable>set-bits</replaceable></literal></term>
-
-	      <listitem>
-		<para>Sets the flag bits
-		  <replaceable>set-bits</replaceable> in the
-		  <replaceable>sgttyb</replaceable> structure.</para>
-	      </listitem>
-	    </varlistentry>
-
-	    <varlistentry>
-	      <term><literal>xc#<replaceable>clear-bits</replaceable></literal></term>
-
-	      <listitem>
-		<para>Clears local mode bits
-		  <replaceable>clear-bits</replaceable> after opening the
-		  device.</para>
-	      </listitem>
-	    </varlistentry>
-
-	    <varlistentry>
-	      <term><literal>xs#<replaceable>set-bits</replaceable></literal></term>
-
-	      <listitem>
-		<para>Sets local mode bits
-		  <replaceable>set-bits</replaceable>.</para>
-	      </listitem>
-	    </varlistentry>
-	  </variablelist>
-
-	  <para>For more information on the bits for the
-	    <literal>fc</literal>, <literal>fs</literal>,
-	    <literal>xc</literal>, and <literal>xs</literal> capabilities,
-	    see the file
-	    <filename>/usr/include/sys/ioctl_compat.h</filename>.</para>
-
-	  <para>When <application>LPD</application> opens the device
-	    specified by the
-	    <literal>lp</literal> capability, it reads the flag bits in
-	    the <literal>sgttyb</literal> structure; it clears any bits in
-	    the <literal>fc</literal> capability, then sets bits in the
-	    <literal>fs</literal> capability, then applies the resultant
-	    setting.  It does the same for the local mode bits as
-	    well.</para>
-
-	  <para>Let us add to our example printer on the sixth serial
-	    port.  We will set the bps rate to 38400.  For the flag bits,
-	    we will set the <literal>TANDEM</literal>,
-	    <literal>ANYP</literal>, <literal>LITOUT</literal>,
-	    <literal>FLUSHO</literal>, and <literal>PASS8</literal> flags.
-	    For the local mode bits, we will set the
-	    <literal>LITOUT</literal> and <literal>PASS8</literal>
-	    flags:</para>
+	  <para>When <application>LPD</application> opens the device specified by
+	    the <literal>lp</literal> capability, it sets the characteristics of
+	    the device to those specified with the <literal>ms#</literal>
+	    capability. Of particular interest will be the
+	    <literal>parenb</literal>, <literal>parodd</literal>,
+	    <literal>cs5</literal>, <literal>cs6</literal>,
+	    <literal>cs7</literal>, <literal>cs8</literal>,
+	    <literal>cstopb</literal>, <literal>crtscts</literal>, and
+	    <literal>ixon</literal> modes, which are explained in the &man.stty.1;
+	    manual page.</para>
+
+	  <para>Let us add to our example printer on the sixth serial port. We
+	    will set the bps rate to 38400. For the mode, we will set no parity
+	    with <literal>-parenb</literal>, 8-bit characters with
+	    <literal>cs8</literal>, no modem control with
+	    <literal>clocal</literal> and hardware flow control with
+	    <literal>crtscts</literal>:</para>
 
 	  <programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
         :sh:sd=/var/spool/lpd/bamboo:\
-        :lp=/dev/ttyd5:fs#0x82000c1:xs#0x820:</programlisting>
+        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:</programlisting>
 	</sect4>
 
 	<sect4 id="printing-textfilter">
@@ -1396,7 +1359,7 @@
 
 bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
         :sh:sd=/var/spool/lpd/bamboo:\
-        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:\
+        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:\
         :if=/usr/local/libexec/if-simple:</programlisting>
 	</sect4>
 
@@ -2167,7 +2130,7 @@
 
 bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
         :sh:sd=/var/spool/lpd/bamboo:\
-        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:\
+        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:\
         :if=/usr/local/libexec/psif:\
         :df=/usr/local/libexec/psdf:</programlisting>
 
@@ -3292,7 +3255,7 @@
 
 bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
         :sh:sd=/var/spool/lpd/bamboo:sc:\
-        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:\
+        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:\
         :if=/usr/local/libexec/psif:\
         :df=/usr/local/libexec/psdf:</programlisting>
             
@@ -3368,7 +3331,7 @@
 
 bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
         :sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:\
-        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:\
+        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:\
         :if=/usr/local/libexec/psif:\
         :df=/usr/local/libexec/psdf:</programlisting>
 
@@ -3443,7 +3406,7 @@
 #
 bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
         :sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
-        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:\
+        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:\
         :if=/usr/local/libexec/psif:\
         :df=/usr/local/libexec/psdf:</programlisting>
 
@@ -3530,7 +3493,7 @@
                   
               <programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
         :sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
-        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:mx#5000:\
+        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:mx#5000:\
         :if=/usr/local/libexec/psif:\
         :df=/usr/local/libexec/psdf:</programlisting>
 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->mheinen 
Responsible-Changed-By: mheinen 
Responsible-Changed-When: Fri Jan 24 14:39:04 PST 2003 
Responsible-Changed-Why:  
I'll take this one. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47411 

From: Martin Heinen <martin@sumuk.de>
To: Stefan Bethke <stb@lassitu.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: docs/47411: Printing chapter of handbook explains functionality removed 6 years ago
Date: Mon, 3 Feb 2003 23:29:38 +0100

 On Thu, Jan 23, 2003 at 07:29:56PM +0100, Stefan Bethke wrote:
 
 > >Synopsis:       Printing chapter of handbook explains functionality removed 6 years ago
 
 > >Description:
 >     Section 11.3.1.4.5. Configuring Spooler Communication Parameters
 >     documents the fc#, fs#, xc#, and xs# printcap(5) capabilities, which
 >     were removed over six years ago:
 >     http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/lpr/lpr/printcap.5#rev1.2
 >     http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/lpr/common_source/common.c#rev1.3
 
 There are more sections dealing with the old
 fs-capability.  I extended the patch to deal
 with those sections too.
 
 This patch removes a section on various
 DELAY options, I'm not sure if there
 are equivalent printcap settings.
 
 Further suggestions?
 
 %%%
 Index: printing/chapter.sgml
 ===================================================================
 RCS file: /u/cvs/doc/en_US.ISO8859-1/books/handbook/printing/chapter.sgml,v
 retrieving revision 1.66
 diff -u -r1.66 chapter.sgml
 --- printing/chapter.sgml	20 Jan 2003 13:19:20 -0000	1.66
 +++ printing/chapter.sgml	3 Feb 2003 22:05:52 -0000
 @@ -962,9 +962,7 @@
  	      linkend="printing-device">Identifying the Printer
  	      Device</link> for more information.  Also, if the printer is
  	      on a serial port, set up the communication parameters with
 -	      the <literal>fs</literal>, <literal>fc</literal>,
 -	      <literal>xs</literal>, and <literal>xc</literal>
 -	      capabilities; which is discussed in the <link
 +	      the <literal>ms#</literal> capability which is discussed in the <link
  	      linkend="printing-commparam">Configuring Spooler
  	      Communications Parameters</link> section.</para>
  	  </step>
 @@ -1256,78 +1254,43 @@
  		  <replaceable>bps-rate</replaceable>, where
  		  <replaceable>bps-rate</replaceable> can be 50, 75, 110,
  		  134, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600,
 -		  19200, or 38400 bits-per-second.</para>
 +		  19200, 38400, 57600, or 115200 bits-per-second.</para>
  	      </listitem>
  	    </varlistentry>
  
  	    <varlistentry>
 -	      <term><literal>fc#<replaceable>clear-bits</replaceable></literal></term>
 +	      <term><literal>ms#<replaceable>stty-mode</replaceable></literal></term>
  
  	      <listitem>
 -		<para>Clears the flag bits
 -		  <replaceable>clear-bits</replaceable> in the
 -		  <replaceable>sgttyb</replaceable> structure after
 -		  opening the device.</para>
 -	      </listitem>
 -	    </varlistentry>
 -
 -	    <varlistentry>
 -	      <term><literal>fs#<replaceable>set-bits</replaceable></literal></term>
 -
 -	      <listitem>
 -		<para>Sets the flag bits
 -		  <replaceable>set-bits</replaceable> in the
 -		  <replaceable>sgttyb</replaceable> structure.</para>
 -	      </listitem>
 -	    </varlistentry>
 -
 -	    <varlistentry>
 -	      <term><literal>xc#<replaceable>clear-bits</replaceable></literal></term>
 -
 -	      <listitem>
 -		<para>Clears local mode bits
 -		  <replaceable>clear-bits</replaceable> after opening the
 -		  device.</para>
 -	      </listitem>
 -	    </varlistentry>
 -
 -	    <varlistentry>
 -	      <term><literal>xs#<replaceable>set-bits</replaceable></literal></term>
 -
 -	      <listitem>
 -		<para>Sets local mode bits
 -		  <replaceable>set-bits</replaceable>.</para>
 +		<para>Sets the options for the terminal device after
 +		  opening the device.  &man.stty.1; explains the
 +		  available options.</para>
  	      </listitem>
  	    </varlistentry>
  	  </variablelist>
  
 -	  <para>For more information on the bits for the
 -	    <literal>fc</literal>, <literal>fs</literal>,
 -	    <literal>xc</literal>, and <literal>xs</literal> capabilities,
 -	    see the file
 -	    <filename>/usr/include/sys/ioctl_compat.h</filename>.</para>
 -
  	  <para>When <application>LPD</application> opens the device
 -	    specified by the
 -	    <literal>lp</literal> capability, it reads the flag bits in
 -	    the <literal>sgttyb</literal> structure; it clears any bits in
 -	    the <literal>fc</literal> capability, then sets bits in the
 -	    <literal>fs</literal> capability, then applies the resultant
 -	    setting.  It does the same for the local mode bits as
 -	    well.</para>
 +	    specified by the <literal>lp</literal> capability, it sets
 +	    the characteristics of the device to those specified with
 +	    the <literal>ms#</literal> capability.  Of particular
 +	    interest will be the <literal>parenb</literal>,
 +	    <literal>parodd</literal>, <literal>cs5</literal>,
 +	    <literal>cs6</literal>, <literal>cs7</literal>,
 +	    <literal>cs8</literal>, <literal>cstopb</literal>,
 +	    <literal>crtscts</literal>, and <literal>ixon</literal>
 +	    modes, which are explained in the &man.stty.1;
 +	    manual page.</para>
  
  	  <para>Let us add to our example printer on the sixth serial
 -	    port.  We will set the bps rate to 38400.  For the flag bits,
 -	    we will set the <literal>TANDEM</literal>,
 -	    <literal>ANYP</literal>, <literal>LITOUT</literal>,
 -	    <literal>FLUSHO</literal>, and <literal>PASS8</literal> flags.
 -	    For the local mode bits, we will set the
 -	    <literal>LITOUT</literal> and <literal>PASS8</literal>
 -	    flags:</para>
 +	    port.  We will set the bps rate to 38400.  For the mode,
 +	    we will set no parity with <literal>-parenb</literal>,
 +	    8-bit characters with <literal>cs8</literal>,
 +	    no modem control with <literal>clocal</literal> and
 +	    hardware flow control with <literal>crtscts</literal>:</para>
  
  	  <programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
          :sh:sd=/var/spool/lpd/bamboo:\
 -        :lp=/dev/ttyd5:fs#0x82000c1:xs#0x820:</programlisting>
 +        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:</programlisting>
  	</sect4>
  
  	<sect4 id="printing-textfilter">
 @@ -1396,7 +1359,7 @@
  
  bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
          :sh:sd=/var/spool/lpd/bamboo:\
 -        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:\
 +        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:\
          :if=/usr/local/libexec/if-simple:</programlisting>
  	</sect4>
  
 @@ -2167,7 +2130,7 @@
  
  bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
          :sh:sd=/var/spool/lpd/bamboo:\
 -        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:\
 +        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:\
          :if=/usr/local/libexec/psif:\
          :df=/usr/local/libexec/psdf:</programlisting>
  
 @@ -3292,7 +3255,7 @@
  
  bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
          :sh:sd=/var/spool/lpd/bamboo:sc:\
 -        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:\
 +        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:\
          :if=/usr/local/libexec/psif:\
          :df=/usr/local/libexec/psdf:</programlisting>
              
 @@ -3368,7 +3331,7 @@
  
  bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
          :sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:\
 -        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:\
 +        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:\
          :if=/usr/local/libexec/psif:\
          :df=/usr/local/libexec/psdf:</programlisting>
  
 @@ -3443,7 +3406,7 @@
  #
  bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
          :sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
 -        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:\
 +        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:\
          :if=/usr/local/libexec/psif:\
          :df=/usr/local/libexec/psdf:</programlisting>
  
 @@ -3530,7 +3493,7 @@
                    
                <programlisting>bamboo|ps|PS|S|panasonic|Panasonic KX-P4455 PostScript v51.4:\
          :sh:sd=/var/spool/lpd/bamboo:sc:rg=artists:mx#5000:\
 -        :lp=/dev/ttyd5:fs#0x82000e1:xs#0x820:rw:mx#5000:\
 +        :lp=/dev/ttyd5:ms#-parenb cs8 clocal crtscts:rw:mx#5000:\
          :if=/usr/local/libexec/psif:\
          :df=/usr/local/libexec/psdf:</programlisting>
  
 @@ -4739,9 +4702,9 @@
  	      <para>Have FreeBSD's serial line driver automatically
  		convert LF to CR+LF.  Of course, this works with printers
  		on serial ports <emphasis>only</emphasis>.  To enable this
 -		feature, set the <literal>CRMOD</literal> bit 
 -		in <literal>fs</literal>
 -		capability in the <filename>/etc/printcap</filename> file
 +		feature, use the <literal>ms#</literal> capability and
 +		set the <literal>onlcr</literal> mode
 +		in the <filename>/etc/printcap</filename> file
  		for the printer.</para>
  	    </listitem>
  
 @@ -4848,27 +4811,17 @@
  	  <itemizedlist>
  	    <listitem>
  	      <para>If the printer supports XON/XOFF flow control, have
 -		FreeBSD use it by specifying the TANDEM bit in the
 -		<literal>fs</literal> capability.</para>
 +		FreeBSD use it by specifying the <literal>ixon</literal> mode
 +		in the <literal>ms#</literal> capability.</para>
  	    </listitem>
  
  	    <listitem>
  	      <para>If the printer supports carrier flow control, specify
 -		the <literal>MDMBUF</literal> bit in the 
 -		<literal>fs</literal> capability.
 +		the <literal>crtscts</literal> mode in the 
 +		<literal>ms#</literal> capability.
  		Make sure the cable connecting the printer to the computer
  		is correctly wired for carrier flow control.</para>
  	    </listitem>
 -
 -	    <listitem>
 -	      <para>If the printer does not support any flow control, use
 -		some combination of the <literal>NLDELAY</literal>,
 -		<literal>TBDELAY</literal>, <literal>CRDELAY</literal>,
 -		<literal>VTDELAY</literal>, and <literal>BSDELAY</literal>
 -		bits in the <literal>fs</literal> capability
 -		to add appropriate delays to the stream of data sent to
 -		the printer.</para>
 -	    </listitem>
  	  </itemizedlist>
  	</listitem>
        </varlistentry>
 @@ -4883,8 +4836,8 @@
  	  <para>This is usually another symptom of incorrect
  	    communications parameters with a serial printer.  Double-check
  	    the bps rate in the <literal>br</literal> capability, and the
 -	    parity bits in the <literal>fs</literal> and
 -	    <literal>fc</literal> capabilities; make sure the printer is
 +	    parity setting in the
 +	    <literal>ms#</literal> capability; make sure the printer is
  	    using the same settings as specified in the
  	    <filename>/etc/printcap</filename> file.</para>
  	</listitem>
 %%%
 
 -- 
 Marxpitn

From: Stefan Bethke <stb@lassitu.de>
To: Martin Heinen <martin@sumuk.de>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: docs/47411: Printing chapter of handbook explains functionality removed 6 years ago
Date: Tue, 4 Feb 2003 10:08:57 +0100

 The extended patch looks fine to me. Thanks!
 
State-Changed-From-To: open->closed 
State-Changed-By: mheinen 
State-Changed-When: Fri Feb 7 11:22:52 PST 2003 
State-Changed-Why:  
Applied the extended patch.  Thanks for your submission. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=47411 
>Unformatted:
