OSDN Git Service

64bff18aae0f9ab4cf8c7cf7b12edd45b9fa521b
[linuxjm/LDP_man-pages.git] / draft / man4 / lp.4
1 '\" t
2 .\" Copyright (c) Michael Haardt (michael@cantor.informatik.rwth-aachen.de),
3 .\"     Sun Jan 15 19:16:33 1995
4 .\"
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
9 .\"
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
14 .\"
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 .\" GNU General Public License for more details.
19 .\"
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .\" USA.
24 .\"
25 .\" Modified, Sun Feb 26 15:02:58 1995, faith@cs.unc.edu
26 .\"
27 .\" Japanese Version Copyright (c) 1996,1997,1998
28 .\"         ISHIKAWA Mutsumi, TAKAHASHI Mutsuji
29 .\"                             all rights reserved.
30 .\" Translated Tue Feb 13 22:48:47 JST 1997
31 .\"         by ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
32 .\"            and TAKAHASHI Mutsuji <muz@ilp.iijnet.or.jp>
33 .\"
34 .\" Japanese Version Last Modified Sun Jan 11 03:42:56 JST 1998
35 .\"     by ISHIKAWA Mutsumi <ishikawa@linux.or.jp>
36 .\"
37 .\" WORD:       printer                 プリンター
38 .\" WORD:       parallel                パラレル
39 .\" WORD:       polling                 ポーリング
40 .\" WORD:       interrupt               割り込み
41 .\" WORD:       dot matrix printer      ドットマトリクスプリンター
42 .\" WORD:       default                 デフォルト
43 .\" WORD:       modularize              モジュール化
44 .\" WORD:       driver                  ドライバ
45 .\" WORD:       buffer                  バッファ
46 .\"
47 .TH LP 4 1995-01-15 "Linux" "Linux Programmer's Manual"
48 .\"O .SH NAME
49 .\"O lp \- line printer devices
50 .SH 名前
51 lp \- ラインプリンターデバイス
52 .\"O .SH SYNOPSIS
53 .SH 書式
54 .B #include <linux/lp.h>
55 .\"O .SH CONFIGURATION
56 .SH 設定
57 .\"O \fBlp\fP[0\(en2] are character devices for the parallel line printers;
58 .\"O they have major number 6 and minor number 0\(en2.
59 .\"O The minor numbers
60 .\"O correspond to the printer port base addresses 0x03bc, 0x0378 and 0x0278.
61 .\"O Usually they have mode 220 and are owned by root and group lp.
62 .\"O You can use printer ports either with polling or with interrupts.
63 .\"O Interrupts are recommended when high traffic is expected, for example,
64 .\"O for laser printers.
65 .\"O For usual dot matrix printers polling will usually be enough.
66 .\"O The default is polling.
67 \fBlp\fP[0\(en2] はパラレルプリンターのためのキャラクタデバイスでメジャー
68 ナンバー 6 マイナーナンバー 0\(en2 を持つ。マイナーナンバーは、ベース
69 アドレス 0x03bc, 0x0378, 0x0278 のそれぞれのプリンターポートに対応する
70 通常、このデバイスファイルはモード 220 オーナー root グループ lp となっ
71 ている。プリンターポートはポーリング(polling)または割り込み
72 (interrupts) のどちらを用いても利用できる。割り込みの利用は、高負荷が
73 予想される時、例えばレーザープリンターをプリンタポートに接続する場合な
74 どに推奨される。普通のドットマトリクスプリンターでは、ポーリングの利用
75 で通常は十分である。デフォルトではポーリングを利用する。
76 .\"O .SH DESCRIPTION
77 .SH 説明
78 .\"O The following
79 .\"O .BR ioctl (2)
80 .\"O calls are supported:
81 次の
82 .BR ioctl (2)
83 コールがサポートされている。
84 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPTIME, int \fP\fIarg\fP\fB)\fP"
85 .\"O Sets the amount of time that the driver sleeps before rechecking the printer
86 .\"O when the printer's buffer appears to be filled to \fIarg\fP.
87 .\"O If you have a fast printer, decrease this number;
88 .\"O if you have a slow printer then increase it.
89 .\"O This is in hundredths of a second, the default 2
90 .\"O being 0.02 seconds.
91 .\"O It only influences the polling driver.
92 プリンターのバッファ( buffer ) がいっぱいになった時、ドライバがプリンター
93 を再チェックするまでに休止する時間を \fIarg\fP とする。高速なプリンター
94 の時はこれを減らし、遅いプリンターの時には増やす。単位は1秒の100分の1
95 で、デフォルトの2は0.02秒にあたる。ポーリングドライバ( polling driver
96 )のみに影響する。
97 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCHAR, int \fP\fIarg\fP\fB)\fP"
98 .\"O Sets the maximum number of busy-wait iterations which the polling driver does
99 .\"O while waiting for the printer to get ready for receiving a character to
100 .\"O \fIarg\fP.
101 .\"O If printing is too slow, increase this number; if the
102 .\"O system gets too slow, decrease this number.
103 .\"O The default is 1000.
104 .\"O It only influences the polling driver.
105 ポーリングドライバがプリンターの文字受取り準備ができるのを待
106 つビジーウエイト(busy-wait)の回数の最大値を \fIarg\fPとする。
107 もし印刷が遅すぎる時はこれを増やし、システムが遅くなりすぎる時には
108 減らす。デフォルトは 1000 である。ポーリングドライバのみに影響する。
109 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORT, int \fP\fIarg\fP\fB)\fP"
110 .\"O If \fIarg\fP is 0, the printer driver will retry on errors, otherwise
111 .\"O it will abort.
112 .\"O The default is 0.
113 もし、\fIarg\fP が 0 なら、プリンタードライバはエラーについて再試行
114 を行う。それ以外の場合は中止する。デフォルトは 0 である。
115 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPABORTOPEN, int \fP\fIarg\fP\fB)\fP"
116 .\"O If \fIarg\fP is 0,
117 .\"O .BR open (2)
118 .\"O will be aborted on error, otherwise error will be ignored.
119 .\"O The default is
120 .\"O to ignore it.
121 もし、\fIarg\fP が 0 なら
122 .BR open (2)
123 の結果がエラーの場合、動作が中止される。それ以外ならエラーは無
124 視される。デフォルトではエラーは無視される。
125 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPCAREFUL, int \fP\fIarg\fP\fB)\fP"
126 .\"O If \fIarg\fP is 0, then the out-of-paper, offline and error signals are
127 .\"O required to be false on all writes, otherwise they are ignored.
128 .\"O The default is to ignore them.
129 \fIarg\fPが0のときには、すべての書き出しの時に、紙切れ、オフライン、エ
130 ラーのシグナルが偽(false)であることが必要とされるが、0 以外ならこれ
131 らのシグナルは無視される。デフォルトでもこれらのシグナルは無視される。
132 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPWAIT, int \fP\fIarg\fP\fB)\fP"
133 .\"O Sets the number of busy waiting iterations to wait before strobing the
134 .\"O printer to accept a just-written character, and the number of iterations to
135 .\"O wait before turning the strobe off again,
136 .\"O to \fIarg\fP.
137 .\"O The specification says this time should be 0.5
138 .\"O microseconds, but experience has shown the delay caused by the code is
139 .\"O already enough.
140 .\"O For that reason, the default value is 0.
141 .\"O This is used for both the polling and the interrupt driver.
142 プリンターが送られた文字を受け取るのを待つため、ドライバが文字を送っ
143 てからストローブ(strobe)するまでの待ちの繰り返しの回数と、ストローブ
144 を再びオフにするまでの待ちの繰り返しの回数を \fIarg\fPに設定
145 する。仕様によればこの時間は 0.5 マイクロ秒とするべきだが、経験によれば
146 このコードによって生じる遅れで十分である。そのため、デフォルトでは 0 で
147 ある。これは、ポーリングと割り込みドライバの両方で使われる。
148 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPSETIRQ, int \fP\fIarg\fP\fB)\fP"
149 .\"O This
150 .\"O .BR ioctl (2)
151 .\"O requires superuser privileges.
152 .\"O It takes an
153 .\"O .I int
154 .\"O containing the new IRQ as argument.
155 .\"O As a side effect, the printer will be reset.
156 .\"O When \fIarg\fP is 0, the polling driver will be used, which is also default.
157 この
158 .BR ioctl (2)
159 を使うには、スーパーユーザの権限が必要である。新しいIRQを示す
160 .I int
161 を引数としてとる。また、副作用としてプリンターはリセットされる。
162 \fIarg\fPが0の時またはデフォルトの動作では、ポーリングドライバーが使わ
163 れる。
164 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETIRQ, int *\fP\fIarg\fP\fB)\fP"
165 .\"O Stores the currently used IRQ in \fIarg\fP.
166 現在使われているIRQを\fIarg\fPにいれる。
167 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPGETSTATUS, int *\fP\fIarg\fP\fB)\fP"
168 .\"O Stores the value of the status port in \fIarg\fP.
169 .\"O The bits have the following meaning:
170 ステータスポートの値を\fIarg\fPに収める。各ビットには次のような意味が
171 ある:
172 .TS
173 l l.
174 .\"O LP_PBUSY   inverted busy input, active high
175 .\"O LP_PACK    unchanged acknowledge input, active low
176 .\"O LP_POUTPA  unchanged out-of-paper input, active high
177 .\"O LP_PSELECD unchanged selected input, active high
178 .\"O LP_PERRORP unchanged error input, active low
179 LP_PBUSY        ビジー信号の反転、ハイがアクティブ
180 LP_PACK         アクノリッジ信号、ローがアクティブ
181 LP_POUTPA       紙切れ信号、ハイがアクティブ
182 LP_PSELECD      選択信号、ハイがアクティブ
183 LP_PERRORP      エラー信号、ローがアクティブ
184 .TE
185 .sp
186 .\"O Refer to your printer manual for the meaning of the signals.
187 .\"O Note that undocumented bits may also be set, depending on your printer.
188 信号の意味については各自のプリンターのマニュアルを参照のこと。プリンター
189 によっては記載のないビットもセットされるかもしれないので、注意のこと。
190 .IP "\fBint ioctl(int \fP\fIfd\fP\fB, LPRESET)\fP"
191 .\"O Resets the printer.
192 .\"O No argument is used.
193 プリンターをリセットする。引数はとらない。
194 .\"O .SH FILES
195 .SH ファイル
196 /dev/lp*
197 .\"O .\" .SH AUTHORS
198 .\" .SH 著者
199 .\"O .\" The printer driver was originally written by Jim Weigand and Linus
200 .\"O .\" Torvalds.
201 .\"O .\" It was further improved by Michael K.\& Johnson.
202 .\"O .\" The interrupt code was written by Nigel Gamble.
203 .\"O .\" Alan Cox modularized it.
204 .\"O .\" LPCAREFUL, LPABORT, LPGETSTATUS were added by Chris Metcalf.
205 .\" プリンタードライバは初めは Jim Weigand と Linus Torvalds によって書
206 .\" かれ、さらに Michael K.\& Johnson によって改良された。割り込みのコード
207 .\" は Nigel Gamble によって書かれた。また、Alan Cox はドライバをモジュー
208 .\" ル化した。
209 .\" LPCAREFUL, LPABORT, LPGETSTATUS は Chris Metcalf によって加えられた。
210 .\"O .SH "SEE ALSO"
211 .SH 関連項目
212 .BR chmod (1),
213 .BR chown (1),
214 .BR mknod (1),
215 .BR lpcntl (8),
216 .BR tunelp (8)
217 .\" .SH 翻訳者
218 .\" 石川 睦 <ishikawa@linux.or.jp>,
219 .\" 高橋 睦司 <muz@ilp.iijnet.or.jp>
220 .SH 翻訳者注
221 カーネル 2.1.x ではパラレルポートまわりが大幅に書き直されています。
222 したがって、カーネル 2.1.x のパラレルポートドライバには、
223 このマニュアルの内容はそのまま適用できません。