.\" Copyright (c) 1983, 1991 Regents of the University of California. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)printcap.5 6.6 (Berkeley) 5/10/91 .\" .\" Japanese Version Copyright (c) 2000 Hirohisa AMAN, .\" all right reserved. .\" .\"O .Dd May 10, 1991 .\"O .Dt PRINTCAP 5 .\"O .Os BSD 4.2 .\"O .Dd May 10, 1991 .Dt PRINTCAP 5 .Os BSD 4.2 .\"O .\"O .Sh NAME .\"O .Nm printcap .\"O .Nd printer capability data base .\"O .Sh 名前 .Nm printcap .Nd プリンタ ケイパビリティ データベース .\"O .\"O .Sh SYNOPSIS .\"O .Nm printcap .\"O .Sh 書式 .Nm printcap .\"O .\"O .Sh DESCRIPTION .\"O The .\"O .Nm Printcap .\"O function .\"O is a simplified version of the .\"O .Xr termcap 5 .\"O data base .\"O used to describe line printers. The spooling system accesses the .\"O .Nm printcap .\"O file every time it is used, allowing dynamic .\"O addition and deletion of printers. Each entry in the data base .\"O is used to describe one printer. This data base may not be .\"O substituted for, as is possible for .\"O .Xr termcap , .\"O because it may allow accounting to be bypassed. .\"O .Pp .\"O .Sh 説明 .Nm printcap は .Xr termcap 5 データベースを簡単にしたものであり、ラインプリンタを記述するのに使われる。 スプーリングシステムは、使用されるたびに .Nm printcap ファイルにアクセスし、プリンタの動的な追加と削除を可能にしている。 データベースにおける各エントリは、1 つのプリンタを記述するのに使われる。 このデータベースは書き込み可能にしておいてはならない( .Xr termcap データベースは普通書き込み可能になっている)。 なぜなら、それによってアカウンティング(accounting)をすり抜けることが 可能になってしまうからである。 .Pp .\"O .\"O The default printer is normally .\"O .Em lp , .\"O though the environment variable .\"O .Ev PRINTER .\"O may be used to override this. Each spooling utility supports an option, .\"O .Fl P Ar printer , .\"O to allow explicit naming of a destination printer. .\"O .Pp .\"O 通常、デフォルトプリンタは .Em lp である。ただし、環境変数 .Ev PRINTER が設定されていれば、そちらが優先される。 各スプーリングユーティリティは、目的のプリンタを明示的に指定できるよう、 オプション .Fl P Ar printer をサポートしている。 .Pp .\"O .\"O Refer to the .\"O .%T "4.3 BSD Line Printer Spooler Manual" .\"O for a complete discussion on how setup the database for a given printer. .\"O ある特定のプリンタに対するこのデータベースの設定の詳細は .%T "4.3 BSD Line Printer Spooler Manual" を参照せよ。 .\"O .\"O .Sh CAPABILITIES .\"O Refer to .\"O .Xr termcap 5 .\"O for a description of the file layout. .\"O .Sh ケイパビリティ ファイルレイアウトの説明については .Xr termcap 5 を参照せよ。 .\"O .\"O .Bl -column Namexxx Typexx "/var/spool/lpdxxxxx" .\"O .Sy Name Type Description .\"O .It "af str" Ta Dv NULL Ta No "name of accounting file" .\"O .It "br num none if lp is a tty, set the baud rate" .\"O .Pf ( Xr ioctl 2 .\"O call) .\"O .It "cf str" Ta Dv NULL Ta No "cifplot data filter" .\"O .It "df str" Ta Dv NULL Ta No "tex data filter" .\"O .Pf ( Tn DVI .\"O format) .\"O .It "fc num 0 if lp is a tty, clear flag bits" .\"O .Pq Pa sgtty.h .\"O .It "ff str" Ta So Li \ef Sc Ta No "string to send for a form feed" .\"O .It "fo bool false print a form feed when device is opened" .\"O .It "fs num 0 like `fc' but set bits" .\"O .It "gf str" Ta Dv NULL Ta No "graph data filter" .\"O .Pf ( Xr plot 3 .\"O format .\"O .It "hl bool false print the burst header page last" .\"O .It "ic bool false driver supports (non standard) ioctl to indent printout" .\"O .It "if str" Ta Dv NULL Ta No "name of text filter which does accounting" .\"O .It "lf str" Ta Pa /dev/console Ta No "error logging file name" .\"O .It "lo str" Ta Pa lock Ta No "name of lock file" .\"O .It "lp str" Ta Pa /dev/lp Ta No "device name to open for output" .\"O .It "mx num 1000 maximum file size (in" .\"O .Dv BUFSIZ .\"O blocks), zero = unlimited .\"O .It "nd str" Ta Dv NULL Ta No "next directory for list of queues (unimplemented)" .\"O .It "nf str" Ta Dv NULL Ta No "ditroff data filter (device independent troff)" .\"O .It "of str" Ta Dv NULL Ta No "name of output filtering program" .\"O .It "pc num 200 price per foot or page in hundredths of cents" .\"O .It "pl num 66 page length (in lines)" .\"O .It "pw num 132 page width (in characters)" .\"O .It "px num 0 page width in pixels (horizontal)" .\"O .It "py num 0 page length in pixels (vertical)" .\"O .It "rf str" Ta Dv NULL Ta No "filter for printing" .\"O .Tn FORTRAN .\"O style text files .\"O .It "rg str" Ta Dv NULL Ta No "restricted group. Only members of group allowed access" .\"O .It "rm str" Ta Dv NULL Ta No "machine name for remote printer" .\"O .It "rp str ``lp'' remote printer name argument" .\"O .It "rs bool false restrict remote users to those with local accounts" .\"O .It "rw bool false open the printer device for reading and writing" .\"O .It "sb bool false short banner (one line only)" .\"O .It "sc bool false suppress multiple copies" .\"O .It "sd str" Ta Pa /var/spool/lpd Ta No "spool directory" .\"O .It "sf bool false suppress form feeds" .\"O .It "sh bool false suppress printing of burst page header" .\"O .It "st str" Ta Pa status Ta No "status file name" .\"O .It "tf str" Ta Dv NULL Ta No "troff data filter (cat phototypesetter)" .\"O .It "tr str" Ta Dv NULL Ta No "trailer string to print when queue empties" .\"O .It "vf str" Ta Dv NULL Ta No "raster image filter" .\"O .El .\"O .Pp .\"O .Bl -column Namexxx Typexx "/var/spool/lpdxxxxx" .Sy Name Type Description .It "af str" Ta Dv NULL Ta No "アカウントファイル名" .It "br num none lp が tty の場合, そのボーレートを設定する" .Pf ( Xr ioctl 2 コール) .It "cf str" Ta Dv NULL Ta No "cifplot データ用フィルタ" .It "df str" Ta Dv NULL Ta No "tex データ" .Pf ( Tn DVI フォーマット) 用フィルタ .It "fc num 0 lp が tty の場合, フラグビットをクリアーする" .Pq Pa sgtty.h .It "ff str" Ta So Li \ef Sc Ta No "改ページ(form feed) のために送信する文字列" .It "fo bool false デバイスオープン時に改ページ(form feed)を印刷する" .It "fs num 0 `fc' と同様だが、こちらはビットをセットする" .It "gf str" Ta Dv NULL Ta No "グラフデータ用フィルタ" .Pf ( Xr plot 3 フォーマット ) .It "hl bool false 最後にバーストヘッダーページを印刷する" .It "ic bool false ドライバはインデント付き印刷のために (非標準の) ioctl をサポートする" .It "if str" Ta Dv NULL Ta No "アカウントのためのテキストフィルタ名" .It "lf str" Ta Pa /dev/console Ta No "エラーログファイル名" .It "lo str" Ta Pa lock Ta No "ロックファイル名" .It "lp str" Ta Pa /dev/lp Ta No "出力に対してオープンするデバイス名" .It "mx num 1000 最大ファイルサイズ (" .Dv BUFSIZ ブロックの数で指定), 0 = 制限なし .It "nd str" Ta Dv NULL Ta No "キューリストのための次のディレクトリ (未実装)" .It "nf str" Ta Dv NULL Ta No "ditroff データ(デバイス非依存 troff)用フィルタ " .It "of str" Ta Dv NULL Ta No "出力フィルタプログラム名" .It "pc num 200 1 フィートもしくは 1 ページあたりの価格(1/100 セント単位)" .It "pl num 66 ページ長 (行数)" .It "pw num 132 ページ幅 (文字数)" .It "px num 0 ピクセル単位でのページ幅 (水平方向)" .It "py num 0 ピクセル単位でのページ長 (垂直方向)" .It "rf str" Ta Dv NULL Ta No "" .Tn FORTRAN スタイルのテキストファイルを印刷するためのフィルタ .It "rg str" Ta Dv NULL Ta No "制限グループ。このグループのメンバーのみアクセスが許される" .It "rm str" Ta Dv NULL Ta No "リモートプリンタのためのマシン名" .It "rp str ``lp'' リモートプリンタ名引数" .It "rs bool false ローカルにアカウントをもったリモートユーザに限定する" .It "rw bool false 読み書きのためにプリンタデバイスをオープンする" .It "sb bool false ショートバナー(short banner) (1 行のみ)" .It "sc bool false 複数コピーを抑制する" .It "sd str" Ta Pa /var/spool/lpd Ta No "スプールディレクトリ" .It "sf bool false 改ページ(form feed)を抑制する" .It "sh bool false バーストページヘッダーの印刷を抑制する" .It "st str" Ta Pa status Ta No "ステータスファイル名" .It "tf str" Ta Dv NULL Ta No "troff データ(cat 写植)用フィルタ " .It "tr str" Ta Dv NULL Ta No "キューが空の場合に印刷するための後書き文字列(trailer string)" .It "vf str" Ta Dv NULL Ta No "ラスタイメージ(raster image)用フィルタ" .El .Pp .\"O .\"O If the local line printer driver supports indentation, the daemon .\"O must understand how to invoke it. .\"O ローカルのラインプリンタドライバが字下げをサポートしているならば、 デーモンはその方法を理解できなければならない。 .\"O .\"O .Sh FILTERS .\"O The .\"O .Xr lpd 8 .\"O daemon creates a pipeline of .\"O .Em filters .\"O to process files for various printer types. .\"O The filters selected depend on the flags passed to .\"O .Xr lpr 1 . .\"O .Sh フィルタ .Xr lpd 8 デーモンは、さまざまなプリンタのタイプに応じてファイルを処理するために、 .Em filters (フィルタ) のパイプラインを構築している。 選択されるフィルタは、 .Xr lpr 1 へ渡されるフラグに依存している。 .\"O .\"O The pipeline set up is: .\"O .Bd -literal -offset indent .\"O p pr | if regular text + pr(1) .\"O none if regular text .\"O c cf cifplot .\"O d df DVI (tex) .\"O g gf plot(3) .\"O n nf ditroff .\"O f rf Fortran .\"O t tf troff .\"O v vf raster image .\"O .Ed .\"O .Pp .\"O パイプラインの構築は、次のようになる : .Bd -literal -offset indent p pr | if 通常テキスト + pr(1) none if 通常テキスト c cf cifplot d df DVI (tex) g gf plot(3) n nf ditroff f rf Fortran t tf troff v vf ラスタイメージ(raster image) .Ed .Pp .\"O .\"O The .\"O .Sy if .\"O filter is invoked with arguments: .\"O .Bd -filled -offset indent .\"O .Cm if .\"O .Op Fl c .\"O .Fl w Ns Ar width .\"O .Fl l Ns Ar length .\"O .Fl i Ns Ar indent .\"O .Fl n Ar login .\"O .Fl h Ar host acct-file .\"O .Ed .\"O .Pp .\"O .Sy if フィルタは、次の引数とともに呼び出される: .Bd -filled -offset indent .Cm if .Op Fl c .Fl w Ns Ar width .Fl l Ns Ar length .Fl i Ns Ar indent .Fl n Ar login .Fl h Ar host acct-file .Ed .Pp .\"O .\"O The .\"O .Fl c .\"O flag is passed only if the .\"O .Fl l .\"O flag (pass control characters literally) .\"O is specified to .\"O .Xr lpr . .\"O The .\"O .Ar Width .\"O function .\"O and .\"O .Ar length .\"O specify the page width and length .\"O (from .\"O .Cm pw .\"O and .\"O .Cm pl .\"O respectively) in characters. .\"O The .\"O .Fl n .\"O and .\"O .Fl h .\"O parameters specify the login name and host name of the owner .\"O of the job respectively. .\"O The .\"O .Ar Acct-file .\"O function .\"O is passed from the .\"O .Cm af .\"O .Nm printcap .\"O entry. .\"O .Pp .\"O .Fl c フラグは、 .Xr lpr に .Fl l フラグ(制御文字を文字としてそのまま通す)が指定してある時に限って渡される。 .Ar width と .Ar length は、ページの幅と長さ(それぞれ .Cm pw と .Cm pl から得られる)を文字数で指定する。 .Fl n と .Fl h はそれぞれ、ジョブ所有者のログイン名とホスト名を指定する。 .Ar acct-file は、 .Nm printcap の .Cm af エントリから渡される。 .Pp .\"O .\"O If no .\"O .Cm if .\"O is specified, .\"O .Cm of .\"O is used instead, .\"O with the distinction that .\"O .Cm of .\"O is opened only once, .\"O while .\"O .Cm if .\"O is opened for every individual job. .\"O Thus, .\"O .Cm if .\"O is better suited to performing accounting. .\"O The .\"O .Cm of .\"O is only given the .\"O .Ar width .\"O and .\"O .Ar length .\"O flags. .\"O .Pp .\"O .Cm if が指定されていない場合は、 代わりに .Cm of が使用される。これらの間には、 .Cm if がそれぞれのジョブに対して毎回オープンされるのに対し、 .Cm of は 1 回しかオープンされないという違いがある。 したがって、アカウンティング(accounting)を行なうには .Cm if の方が適している。 .Cm of には、 .Ar width と .Ar length の 2 つのフラグが与えられるだけである。 .Pp .\"O .\"O All other filters are called as: .\"O .Bd -filled -offset indent .\"O .Nm filter .\"O .Fl x Ns Ar width .\"O .Fl y Ns Ar length .\"O .Fl n Ar login .\"O .Fl h Ar host acct-file .\"O .Ed .\"O .Pp .\"O where .\"O .Ar width .\"O and .\"O .Ar length .\"O are represented in pixels, .\"O specified by the .\"O .Cm px .\"O and .\"O .Cm py .\"O entries respectively. .\"O .Pp .\"O 他のすべてのフィルタは、次のようにして呼び出される: .Bd -filled -offset indent .Nm filter .Fl x Ns Ar width .Fl y Ns Ar length .Fl n Ar login .Fl h Ar host acct-file .Ed .Pp ただし、 .Ar width と .Ar length はピクセル単位で表され、それぞれ .Cm px エントリと .Cm py エントリによって指定される。 .Pp .\"O .\"O All filters take .\"O .Em stdin .\"O as the file, .\"O .Em stdout .\"O as the printer, .\"O may log either to .\"O .Em stderr .\"O or using .\"O .Xr syslog 3 , .\"O and must not ignore .\"O .Dv SIGINT . .\"O すべてのフィルタは、そのファイルとして .Em stdin (標準入力)を、プリンタとして .Em stdout (標準出力)をとる。そのログは、 .Em stderr (標準エラー出力)に対して、もしくは .Xr syslog 3 を使ってとられる。また、 .Dv SIGINT を無視することは許されない。 .\"O .\"O .Sh LOGGING .\"O Error messages generated by the line printer programs themselves .\"O (that is, the .\"O .Xr lp Ns * .\"O programs) .\"O are logged by .\"O .Xr syslog 3 .\"O using the .\"O .Dv LPR .\"O facility. .\"O Messages printed on .\"O .Em stderr .\"O of one of the filters .\"O are sent to the corresponding .\"O .Cm lf .\"O file. .\"O The filters may, of course, use .\"O .Xr syslog .\"O themselves. .\"O .Pp .\"O Error messages sent to the console have a carriage return and a line .\"O feed appended to them, rather than just a line feed. .\"O .Sh ロギング(LOGGING) ラインプリンタプログラム自身 (つまり、 .Xr lp Ns * プログラム) によって生成されたエラーメッセージは、 .Dv LPR を使うことで .Xr syslog 3 によって記録される。 フィルタのうちの 1 つの .Em stderr (標準エラー出力) 上に印刷されたメッセージは、それに対応する .Cm lf ファイルへと送られる。 もちろん、フィルタはそれ自身で .Xr syslog を使ってもかまわない。 .Pp コンソールへ送られるエラーメッセージには、改行(LF)だけではなく、 復帰(CR)と改行(LF)が追加される。 .\"O .\"O .Sh SEE ALSO .\"O .Xr termcap 5 , .\"O .Xr lpc 8 , .\"O .Xr lpd 8 , .\"O .Xr pac 8 , .\"O .Xr lpr 1 , .\"O .Xr lpq 1 , .\"O .Xr lprm 1 .\"O .Rs .\"O .%T "4.3 BSD Line Printer Spooler Manual" .\"O .Re .\"O .Sh 関連項目 .Xr termcap 5 , .Xr lpc 8 , .Xr lpd 8 , .Xr pac 8 , .Xr lpr 1 , .Xr lpq 1 , .Xr lprm 1 .Rs .%T "4.3 BSD ラインプリンタスプーラーマニュアル" .Re .\"O .\"O .Sh HISTORY .\"O The .\"O .Nm .\"O file format appeared in .\"O .Bx 4.2 .. .\"O .Sh 履歴 .Nm ファイルフォーマットは、 .Bx 4.2 で登場した。