1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (c) 1993 Michael Haardt
5 .\" Fri Apr 2 11:32:09 MET DST 1993
7 .\" This is free documentation; you can redistribute it and/or
8 .\" modify it under the terms of the GNU General Public License as
9 .\" published by the Free Software Foundation; either version 2 of
10 .\" the License, or (at your option) any later version.
12 .\" The GNU General Public License's references to "object code"
13 .\" and "executables" are to be interpreted as the output of any
14 .\" document formatting or typesetting system, including
15 .\" intermediate and printed output.
17 .\" This manual is distributed in the hope that it will be useful,
18 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
19 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 .\" GNU General Public License for more details.
22 .\" You should have received a copy of the GNU General Public
23 .\" License along with this manual; if not, write to the Free
24 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
27 .\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
28 .\" Modified 1995-02-25 by Jim Van Zandt <jrv@vanzandt.mv.com>
29 .\" Modified 1995-09-02 by Jim Van Zandt <jrv@vanzandt.mv.com>
30 .\" moved to man3, aeb, 950919
31 .\" Modified 2001-09-22 by Michael Kerrisk <mtk.manpages@gmail.com>
32 .\" Modified 2001-12-17, aeb
33 .\" Modified 2004-10-31, aeb
35 .\" Added .SS headers to give some structure to this page; and a
36 .\" small amount of reordering.
37 .\" Added a section on canonical and noncanonical mode.
38 .\" Enhanced the discussion of "raw" mode for cfmakeraw().
41 .\" Japanese Version Copyright (c) 1998-1999
42 .\" Michihide Hotta and NAKANO Takeo all rights reserved.
43 .\" Translated 1998-02-02, Michihide Hotta <sim@remus.dti.ne.jp>
44 .\" Updated 1999-03-14, NAKANO Takeo <nakano@apm.seikei.ac.jp>
45 .\" Updated 2001-02-17, Kentaro Shirakata <argrath@ub32.org>
46 .\" Updated 2001-10-16, Kentaro Shirakata <argrath@ub32.org>
47 .\" Updated 2002-01-04, Kentaro Shirakata <argrath@ub32.org>
48 .\" Updated 2003-09-01, Kentaro Shirakata <argrath@ub32.org>
49 .\" Updated 2006-07-26, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
50 .\" Updated 2007-05-01, Akihiro MOTOKI, LDP v2.46
51 .\" Updated 2007-09-06, Akihiro MOTOKI, LDP v2.64
53 .\"WORD: carriage return Éüµ¢(ʸ»ú)
54 .\"WORD: new line ²þ¹Ô(ʸ»ú)
55 .\"WORD: fill character ÊäŶʸ»ú
56 .\"WORD: horizontal tab ¿åÊ¿¥¿¥Ö
57 .\"WORD: backspace ¸åÂà(ʸ»ú)
58 .\"WORD: vertical tab ¿âľ¥¿¥Ö
59 .\"WORD: feature test macro µ¡Ç½¸¡ºº¥Þ¥¯¥í
61 .TH TERMIOS 3 2010-06-20 "Linux" "Linux Programmer's Manual"
63 .\"O termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow,
64 .\"O cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed, cfsetspeed \-
65 .\"O get and set terminal attributes, line control, get and set baud rate
67 termios, tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow,
68 cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfsetospeed, cfsetspeed \-
69 ¥¿¡¼¥ß¥Ê¥ë°À¤Î¼èÆÀ¡¦ÀßÄê¡¢¥é¥¤¥óÀ©¸æ¡¢¥Ü¡¼¥ì¡¼¥È¤Î¼èÆÀ¡¦ÀßÄê
73 .B #include <termios.h>
75 .B #include <unistd.h>
77 .BI "int tcgetattr(int " fd ", struct termios *" termios_p );
79 .BI "int tcsetattr(int " fd ", int " optional_actions ,
80 .BI " const struct termios *" termios_p );
82 .BI "int tcsendbreak(int " fd ", int " duration );
84 .BI "int tcdrain(int " fd );
86 .BI "int tcflush(int " fd ", int " queue_selector );
88 .BI "int tcflow(int " fd ", int " action );
90 .BI "void cfmakeraw(struct termios *" termios_p );
92 .BI "speed_t cfgetispeed(const struct termios *" termios_p );
94 .BI "speed_t cfgetospeed(const struct termios *" termios_p );
96 .BI "int cfsetispeed(struct termios *" termios_p ", speed_t " speed );
98 .BI "int cfsetospeed(struct termios *" termios_p ", speed_t " speed );
100 .BI "int cfsetspeed(struct termios *" termios_p ", speed_t " speed );
104 .\"O Feature Test Macro Requirements for glibc (see
105 .\"O .BR feature_test_macros (7)):
106 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
107 .RB ( feature_test_macros (7)
116 .\"O The termios functions describe a general terminal interface that is
117 .\"O provided to control asynchronous communications ports.
118 termios ´Ø¿ô·²¤Ï¡¢ÈóƱ´üÄÌ¿®¥Ý¡¼¥È¤òÀ©¸æ¤¹¤ë¤¿¤á¤ÎÈÆÍÑ
119 ¥¿¡¼¥ß¥Ê¥ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ç¤¢¤ë¡£
120 .\"O .SS "The termios structure"
123 .\"O Many of the functions described here have a \fItermios_p\fP argument
124 .\"O that is a pointer to a \fItermios\fP structure.
125 .\"O This structure contains at least the following members:
126 ¤³¤³¤Ë¼¨¤µ¤ì¤Æ¤¤¤ë´Ø¿ô¤Î¿¤¯¤Ï¡¢°ú¤¿ô¤Ë \fItermios_p\fP ¤òÍѤ¤¤ë¡£
127 ¤³¤Î°ú¤¿ô¤Ï \fItermios\fP ¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤Ç¤¢¤ë¡£
128 ¤³¤Î¹½Â¤ÂΤˤϾ¯¤Ê¤¯¤È¤â°Ê²¼¤Ë¼¨¤¹¥á¥ó¥Ð¤¬´Þ¤Þ¤ì¤ë:
132 tcflag_t c_iflag; /* input modes */
133 tcflag_t c_oflag; /* output modes */
134 tcflag_t c_cflag; /* control modes */
135 tcflag_t c_lflag; /* local modes */
136 cc_t c_cc[NCCS]; /* control chars */
140 .\"O The values that may be assigned to these fields are described below.
141 .\"O In the case of the first four bit-mask fields,
142 .\"O the definitions of some of the associated flags that may be set are
143 .\"O only exposed if a specific feature test macro (see
144 .\"O .BR feature_test_macros (7))
145 .\"O is defined, as noted in brackets ("[]").
146 °Ê²¼¤Ë¡¢¤³¤ì¤é¤Î¥Õ¥£¡¼¥ë¥É¤Ë³ä¤êÅö¤Æ²Äǽ¤ÊÃͤˤĤ¤¤ÆÀâÌÀ¤¹¤ë¡£
147 ºÇ½é¤Î 4 ¤Ä¤Î¥Ó¥Ã¥È¥Þ¥¹¥¯¥Õ¥£¡¼¥ë¥É¤Ç¤Ï¡¢
148 ´Ø·¸¤¹¤ë¥Õ¥é¥°¤ÎÄêµÁ¤Î¤¤¤¯¤Ä¤«¤Ï¡¢ÆÃÄê¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í
149 .RB ( feature_test_macros (7)
150 »²¾È) ¤¬ÄêµÁ¤µ¤ì¤¿¾ì¹ç¤Ë¤Î¤ß¸ø³«¤µ¤ì¤ë¡£
151 ɬÍפʵ¡Ç½¸¡ºº¥Þ¥¯¥í¤Ï³Ñ³ç¸Ì ("[]") Æâ¤Ë½ñ¤«¤ì¤Æ¤¤¤ë¡£
153 .\"O In the descriptions below, "not in POSIX" means that the
154 .\"O value is not specified in POSIX.1-2001,
155 .\"O and "XSI" means that the value is specified in POSIX.1-2001
156 .\"O as part of the XSI extension.
157 °Ê²¼¤ÎÀâÌÀ¤Ç¡¢ "POSIX ¤Ë¤Ï¤Ê¤¤" ¤Ï
158 ¤½¤ÎÃͤ¬ POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò°ÕÌ£¤·¡¢
159 "XSI" ¤Ï¤½¤ÎÃͤ¬ POSIX.1-2001 ¤Î XSI ³ÈÄ¥¤Ç
160 µ¬Äꤵ¤ì¤Æ¤¤¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
162 .\"O \fIc_iflag\fP flag constants:
163 \fIc_iflag\fP ¥Õ¥é¥°¤Ë¤Ï°Ê²¼¤ÎÍ×ÁǤò»ØÄê¤Ç¤¤ë:
166 .\"O Ignore BREAK condition on input.
167 ÆþÎÏÃæ¤Î BREAK ¿®¹æ¤ò̵»ë¤¹¤ë¡£
170 .\"O If \fBIGNBRK\fP is set, a BREAK is ignored.
171 .\"O If it is not set
172 .\"O but \fBBRKINT\fP is set, then a BREAK causes the input and output
173 .\"O queues to be flushed, and if the terminal is the controlling
174 .\"O terminal of a foreground process group, it will cause a
175 .\"O \fBSIGINT\fP to be sent to this foreground process group.
176 \fBIGNBRK\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢BREAK ¿®¹æ¤Ï̵»ë¤µ¤ì¤ë¡£
177 \fBIGNBRK\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¤¬¡¢\fBBRKINT\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
178 BREAK ¿®¹æ¤Ë¤è¤Ã¤ÆÆþ½ÐÎÏ¥¥å¡¼¤¬¥Õ¥é¥Ã¥·¥å¤µ¤ì¡¢
179 ¤µ¤é¤Ë¡¢Ã¼Ëö¤¬¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ÎÀ©¸æüËö¤Î¾ì¹ç¤Ï¡¢
180 ¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¥°¥ë¡¼¥×¤Ë \fBSIGINT\fP ¤¬Á÷¤é¤ì¤ë¡£
181 .\"O When neither \fBIGNBRK\fP nor \fBBRKINT\fP are set, a BREAK
182 .\"O reads as a null byte (\(aq\\0\(aq), except when \fBPARMRK\fP is set,
183 .\"O in which case it reads as the sequence \\377 \\0 \\0.
184 \fBIGNBRK\fP ¤â \fBBRKINT\fP ¤âÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢
185 BREAK ¤ò NULL ¥Ð¥¤¥È (\(aq\\0\(aq) ¤È¤·¤ÆÆɤ߹þ¤à¡£
186 ¤¿¤À¤·¡¢\fBPARMRK\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï \\377 \\0 \\0 ¤Î¥·¡¼¥±¥ó¥¹¤È¤·¤Æ
190 .\"O Ignore framing errors and parity errors.
191 ¥Õ¥ì¡¼¥à¥¨¥é¡¼¤ª¤è¤Ó¥Ñ¥ê¥Æ¥£¥¨¥é¡¼¤ò̵»ë¤¹¤ë¡£
194 .\"O If \fBIGNPAR\fP is not set, prefix a character with a parity error or
195 .\"O framing error with \\377 \\0.
196 .\"O If neither \fBIGNPAR\fP nor \fBPARMRK\fP
197 .\"O is set, read a character with a parity error or framing error
199 \fBIGNPAR\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¥Ñ¥ê¥Æ¥£¥¨¥é¡¼¤¢¤ë¤¤¤Ï¥Õ¥ì¡¼¥à¥¨¥é¡¼
200 ¤ÎȯÀ¸¤·¤¿Ê¸»ú¤ÎÁ°¤Ë \\377 \\0 ¤òÉղ乤롣\fBIGNPAR\fP ¤â \fBPARMRK\fP ¤â
201 ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¥Ñ¥ê¥Æ¥£¥¨¥é¡¼¤¢¤ë¤¤¤Ï¥Õ¥ì¡¼¥à¥¨¥é¡¼¤ÎȯÀ¸¤·¤¿Ê¸»ú¤ò
205 .\"O Enable input parity checking.
206 ÆþÎϤΥѥê¥Æ¥£¥Á¥§¥Ã¥¯¤ò͸ú¤Ë¤¹¤ë¡£
209 .\"O Strip off eighth bit.
213 .\"O Translate NL to CR on input.
214 ÆþÎϤΠNL (New Line: ²þ¹Ôʸ»ú) ¤ò CR (Carriage Return: Éüµ¢Ê¸»ú) ¤Ë
218 .\"O Ignore carriage return on input.
219 ÆþÎϤΠCR ¤ò̵»ë¤¹¤ë¡£
222 .\"O Translate carriage return to newline on input (unless \fBIGNCR\fP is set).
223 (\fBIGNCR\fP ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç) ÆþÎϤΠCR ¤ò NL ¤ËÃÖ¤´¹¤¨¤ë¡£
226 .\"O (not in POSIX) Map uppercase characters to lowercase on input.
227 (POSIX ¤Ë¤Ï¤Ê¤¤) ÆþÎϤÎÂçʸ»ú¤ò¾®Ê¸»ú¤ËÃÖ¤´¹¤¨¤ë¡£
230 .\"O Enable XON/XOFF flow control on output.
231 ½ÐÎϤΠXON/XOFF ¥Õ¥í¡¼À©¸æ¤ò͸ú¤Ë¤¹¤ë¡£
234 .\"O (XSI) Typing any character will restart stopped output.
235 .\"O (The default is to allow just the START character to restart output.)
236 (XSI) Ǥ°Õ¤Îʸ»ú¤òÆþÎϤ¹¤ë¤È¡¢Ää»ß¤·¤Æ¤¤¤¿½ÐÎϤòºÆ³«¤¹¤ë
237 (¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢START ʸ»ú¤Ç¤Î¤ß½ÐÎϤ¬ºÆ³«¤µ¤ì¤ë)¡£
240 .\"O Enable XON/XOFF flow control on input.
241 ÆþÎϤΠXON/XOFF ¥Õ¥í¡¼À©¸æ¤ò͸ú¤Ë¤¹¤ë¡£
244 .\"O (not in POSIX) Ring bell when input queue is full.
245 .\"O Linux does not implement this bit, and acts as if it is always set.
246 (POSIX ¤Ë¤Ï¤Ê¤¤) ÆþÎÏ¥¥å¡¼¤¬°ìÇդλþ¤Ë¥Ù¥ë¤òÌĤ餹¡£
247 Linux ¤Ç¤Ï¤³¤Î¥Ó¥Ã¥È¤Ï¼ÂÁõ¤µ¤ì¤Æ¤ª¤é¤º¡¢
248 ¾ï¤Ë¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¤«¤Î¤è¤¦¤Ë¿¶Éñ¤¦¡£
250 .\"O .BR IUTF8 " (since Linux 2.6.4)"
251 .BR IUTF8 " (Linux 2.6.4 °Ê¹ß)"
252 .\"O (not in POSIX) Input is UTF8;
253 .\"O this allows character-erase to be correctly performed in cooked mode.
254 (POSIX ¤Ë¤Ï¤Ê¤¤) ÆþÎϤ¬ UTF8 ¤Ç¤¢¤ë;
255 ¤³¤ì¤Ë¤è¤ê cooked mode ¤Çʸ»úºï½ü (character-erase) ¤ò
256 Àµ¤·¤¯µ¡Ç½¤µ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£
258 .\"O \fIc_oflag\fP flag constants defined in POSIX.1:
259 POSIX.1 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë \fIc_oflag\fP ¥Õ¥é¥°¤ò°Ê²¼¤Ë¼¨¤¹:
262 .\"O Enable implementation-defined output processing.
263 ¼ÂÁõ¤Ë°Í¸¤·¤¿½ÐÎϽèÍý¤ò͸ú¤Ë¤¹¤ë¡£
265 .\"O The remaining \fIc_oflag\fP flag constants are defined in POSIX.1-2001,
266 .\"O unless marked otherwise.
267 »Ä¤ê¤Î \fIc_oflag\fP ¥Õ¥é¥°¤Ï¡¢Æõ¤Î¤Ê¤¤¸Â¤ê POSIX.1-2001 ¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¡£
270 .\"O (not in POSIX) Map lowercase characters to uppercase on output.
271 (POSIX ¤Ë¤Ï¤Ê¤¤) ½ÐÎÏ»þ¤Ë¾®Ê¸»ú¤òÂçʸ»ú¤ËÊÑ´¹¤¹¤ë¡£
274 .\"O (XSI) Map NL to CR-NL on output.
275 (XSI) ½ÐÎϤΠNL ¤ò CR-NL ¤ËÃÖ¤´¹¤¨¤ë¡£
278 .\"O Map CR to NL on output.
279 ½ÐÎϤΠCR ¤ò NL ¤ËÃÖ¤´¹¤¨¤ë¡£
282 .\"O Don't output CR at column 0.
283 0 ·åÌÜ¤Ç CR ¤ò½ÐÎϤ·¤Ê¤¤¡£
286 .\"O Don't output CR.
290 .\"O Send fill characters for a delay, rather than using a timed delay.
291 žÁ÷»þ´Ö¤òÃ٤餻¤ë¤Î¤Ç¤Ï¤Ê¤¯¡¢ÊäŶʸ»ú (fill character) ¤òÁ÷¤ë¡£
292 (ÌõÃí:ÆÃÄê¤Îʸ»ú¤ËÂФ·¤Æ¡¢Ã¼Ëö¦¤Î½èÍý¤òÂԤĤ¿¤á¤ËžÁ÷¤ò°ìÄê»þ´Ö
293 Ã٤餻¤ë¤³¤È¤¬¤Ç¤¤ë¡£¤Þ¤¿¡¢ \fBOFILL\fP ¤ò»ØÄꤹ¤ë¤È
294 žÁ÷¤òÃ٤餻¤ëÂå¤ï¤ê¤ËÊäŶʸ»ú¤òÁ÷¤ë¡£)
297 .\"O (not in POSIX) Fill character is ASCII DEL (0177).
298 .\"O If unset, fill character is ASCII NUL (\(aq\\0\(aq).
299 .\"O (Not implemented on Linux.)
300 (POSIX ¤Ë¤Ï¤Ê¤¤) ÊäŶʸ»ú¤ò ASCII DEL ¤Ë¤¹¤ë¡£
301 ¤³¤Î¥Õ¥é¥°¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï ASCII NUL (\(aq\\0\(aq) ¤Ë¤Ê¤ë¡£
302 (Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤)
305 .\"O Newline delay mask.
306 .\"O Values are \fBNL0\fP and \fBNL1\fP.
312 .\"O .BR _XOPEN_SOURCE ]
313 NL ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£ÃÍ¤Ï \fBNL0\fP (ÃÙ±ä¤Ê¤·) ¤ª¤è¤Ó \fBNL1\fP ¤Ç¤¢¤ë¡£
322 .\"O Carriage return delay mask.
323 .\"O Values are \fBCR0\fP, \fBCR1\fP, \fBCR2\fP, or \fBCR3\fP.
329 .\"O .BR _XOPEN_SOURCE ]
330 CR ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£ÃÍ¤Ï \fBCR0\fP (ÃÙ±ä¤Ê¤·),
331 \fBCR1\fP, \fBCR2\fP,\fBCR3\fP ¤Ç¤¢¤ë¡£
340 .\"O Horizontal tab delay mask.
341 .\"O Values are \fBTAB0\fP, \fBTAB1\fP, \fBTAB2\fP, \fBTAB3\fP (or \fBXTABS\fP).
347 .\"O .BR _XOPEN_SOURCE ]
348 ¿åÊ¿¥¿¥Ö (horizontal tab) ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£
349 ÃÍ¤Ï \fBTAB0\fP (ÃÙ±ä¤Ê¤·),
350 \fBTAB1\fP, \fBTAB2\fP, \fBTAB3\fP (\fBXTABS\fP) ¤Ç¤¢¤ë¡£
357 .\"O A value of TAB3, that is, XTABS, expands tabs to spaces
358 .\"O (with tab stops every eight columns).
359 XTAB3 (¤³¤ì¤Ï XTABS ¤ÈƱ¤¸¤Ç¤¢¤ë) ¤ÎÃͤϥ¿¥Ö¤ò¥¹¥Ú¡¼¥¹²¿¸Ä¤ËÊÑ´¹¤¹¤ë¤«¤ò¼¨¤¹
360 (¥¿¥Ö¤Ï 8 ·åËè¤Ë»ß¤Þ¤ë)¡£
363 .\"O Backspace delay mask.
364 .\"O Values are \fBBS0\fP or \fBBS1\fP.
365 .\"O (Has never been implemented.)
371 .\"O .BR _XOPEN_SOURCE ]
372 ¸åÂà (backspace) ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£
373 ÃÍ¤Ï \fBBS0\fP (ÃÙ±ä¤Ê¤·) ¤¢¤ë¤¤¤Ï \fBBS1\fP ¤Ç¤¢¤ë¡£
374 (¼ÂÁõ¤µ¤ì¤¿¤³¤È¤Ï¤Ê¤¤)
383 .\"O Vertical tab delay mask.
384 .\"O Values are \fBVT0\fP or \fBVT1\fP.
385 ¿âľ¥¿¥Ö (vertical tab) ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£
386 ÃÍ¤Ï \fBVT0\fP (ÃÙ±ä¤Ê¤·) ¤¢¤ë¤¤¤Ï \fBVT1\fP ¤Ç¤¢¤ë¡£
389 .\"O Form feed delay mask.
390 .\"O Values are \fBFF0\fP or \fBFF1\fP.
396 .\"O .BR _XOPEN_SOURCE ]
397 ÊÇÁ÷¤ê (form feed) ¤ÎÃÙ±ä¤òÀßÄꤹ¤ë¡£
398 ÃÍ¤Ï \fBFF0\fP (ÃÙ±ä¤Ê¤·) ¤¢¤ë¤¤¤Ï \fBFF1\fP ¤Ç¤¢¤ë¡£
406 .\"O \fIc_cflag\fP flag constants:
407 \fIc_cflag\fP ¥Õ¥é¥°¤Ï°Ê²¼¤ÎÄ̤ê:
410 .\"O (not in POSIX) Baud speed mask (4+1 bits).
414 .\"O .BR _SVID_SOURCE ]
415 (POSIX ¤Ë¤Ï¤Ê¤¤) ¥Ü¡¼¥ì¡¼¥È¥Þ¥¹¥¯ (4+1 ¥Ó¥Ã¥È)¡£
422 .\"O (not in POSIX) Extra baud speed mask (1 bit), included in
427 .\"O .BR _SVID_SOURCE ]
428 (POSIX ¤Ë¤Ï¤Ê¤¤) ÄɲäΥܡ¼¥ì¡¼¥È¥Þ¥¹¥¯ (1 ¥Ó¥Ã¥È)¡£
436 .\"O (POSIX says that the baud speed is stored in the
438 .\"O structure without specifying where precisely, and provides
439 .\"O .BR cfgetispeed ()
441 .\"O .BR cfsetispeed ()
442 .\"O for getting at it.
443 .\"O Some systems use bits selected by
447 .\"O other systems use separate fields, for example,
450 .\"O .IR sg_ospeed .)
453 ¹½Â¤ÂΤ˳ÊǼ¤µ¤ì¤¿¥Ü¡¼¥ì¡¼¥È¤ÏÀµ³Î¤Ê¤â¤Î¤Ç¤Ï¤Ê¤¯¡¢
454 ¥Ü¡¼¥ì¡¼¥È¤òÁàºî¤¹¤ë¤¿¤á¤Ë
462 ¤ÇÁªÂò¤µ¤ì¤¿¥Ó¥Ã¥È¤ò»È¤¦¥·¥¹¥Æ¥à¤â¤¢¤ì¤Ð¡¢
466 ¤È¤¤¤Ã¤¿ÆÈΩ¤·¤¿¥Õ¥£¡¼¥ë¥É¤ò»È¤¦¤â¤Î¤â¤¢¤ë¡£)
469 .\"O Character size mask.
470 .\"O Values are \fBCS5\fP, \fBCS6\fP, \fBCS7\fP, or \fBCS8\fP.
471 ʸ»ú¥µ¥¤¥º¤òÀßÄꤹ¤ë¡£
472 ÃÍ¤Ï \fBCS5\fP, \fBCS6\fP, \fBCS7\fP, \fBCS8\fP ¤Ç¤¢¤ë¡£
475 .\"O Set two stop bits, rather than one.
476 ¥¹¥È¥Ã¥×¥Ó¥Ã¥È¤ò 1 ¤Ç¤Ï¤Ê¤¯ 2 ¤Ë¤¹¤ë¡£
479 .\"O Enable receiver.
483 .\"O Enable parity generation on output and parity checking for input.
484 ½ÐÎϤ˥ѥê¥Æ¥£¤òÉղä·¡¢ÆþÎϤΥѥê¥Æ¥£¥Á¥§¥Ã¥¯¤ò¹Ô¤¦¡£
487 .\"O If set, then parity for input and output is odd;
488 .\"O otherwise even parity is used.
489 ÀßÄꤵ¤ì¤ë¤È¡¢ÆþÎϤª¤è¤Ó½ÐÎϤËÂФ¹¤ë¥Ñ¥ê¥Æ¥£¤¬´ñ¿ô¥Ñ¥ê¥Æ¥£¤È¤Ê¤ë¡£
490 ÀßÄꤵ¤ì¤Ê¤¤¾ì¹ç¡¢¶ö¿ô¥Ñ¥ê¥Æ¥£¤¬»ÈÍѤµ¤ì¤ë¡£
493 .\"O Lower modem control lines after last process closes the device (hang up).
494 ºÇ¸å¤Î¥×¥í¥»¥¹¤¬¥Ç¥Ð¥¤¥¹¤ò¥¯¥í¡¼¥º¤·¤¿¸å¡¢¥â¥Ç¥à¤ÎÀ©¸æÀþ¤ò low ¤Ë¤¹¤ë
498 .\"O Ignore modem control lines.
499 ¥â¥Ç¥à¤ÎÀ©¸æÀþ¤ò̵»ë¤¹¤ë¡£
502 .\"O (not in POSIX) Block output from a noncurrent shell layer.
503 .\"O For use by \fBshl\fP (shell layers). (Not implemented on Linux.)
504 (POSIX ¤Ë¤Ï¤Ê¤¤) ¸½ºß¤Î¥·¥§¥ëÁذʳ°¤«¤é¤Î½ÐÎϤòÍÞÀ©¤¹¤ë¡£
505 \fBshl\fP (¥·¥§¥ëÁØ) ¤ÇÍѤ¤¤é¤ì¤ë¡£(Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤)
508 .\"O (not in POSIX) Mask for input speeds.
509 .\"O The values for the
512 .\"O the same as the values for the
514 .\"O bits, shifted left
520 .\"O .BR _SVID_SOURCE ]
521 .\"O (Not implemented on Linux.)
522 (POSIX ¤Ë¤Ï¤Ê¤¤) ÆþÎÏ®Å٤Υޥ¹¥¯¡£
526 ¥Ó¥Ã¥È¤Î¤¿¤á¤ÎÃͤÈƱ¤¸¤Ç¤¢¤ê¡¢
529 ¥Ó¥Ã¥È¥·¥Õ¥È¤·¤¿¤â¤Î¤Ç¤¢¤ë¡£
534 (Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤)
538 .\"O Use "stick" (mark/space) parity (supported on certain serial
541 .\"O is set, the parity bit is always 1; if
543 .\"O is not set, then the parity bit is always 0).
547 .\"O .BR _SVID_SOURCE ]
549 (°ìÉô¤Î¥·¥ê¥¢¥ë¥Ç¥Ð¥¤¥¹¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë)
550 ¡Ö¥¹¥Æ¥£¥Ã¥¯ (stick)¡×¥Ñ¥ê¥Æ¥£ (¥Þ¡¼¥¯/¥¹¥Ú¡¼¥¹ ¥Ñ¥ê¥Æ¥£)¤ò»ÈÍѤ¹¤ë¡£
552 ¤¬ÀßÄꤵ¤ì¤¿¾ì¹ç¥Ñ¥ê¥Æ¥£¥Ó¥Ã¥È¤Ï¾ï¤Ë 1 ¤È¤Ê¤ê¡¢
553 ÀßÄꤵ¤ì¤Ê¤¤¾ì¹ç¤Ï¾ï¤Ë 0 ¤È¤Ê¤ë¡£
560 .\"O (not in POSIX) Enable RTS/CTS (hardware) flow control.
564 .\"O .BR _SVID_SOURCE ]
565 (POSIX ¤Ë¤Ï¤Ê¤¤) RTS/CTS (¥Ï¡¼¥É¥¦¥§¥¢) ¥Õ¥í¡¼À©¸æ¤ò͸ú¤Ë¤¹¤ë¡£
571 .\"O \fIc_lflag\fP flag constants:
572 \fIc_lflag\fP ¥Õ¥é¥°¤Ï°Ê²¼¤ÎÄ̤ê:
575 .\"O When any of the characters INTR, QUIT, SUSP, or DSUSP are received,
576 .\"O generate the corresponding signal.
577 INTR, QUIT, SUSP, DSUSP ¤Îʸ»ú¤ò¼õ¿®¤·¤¿»þ¡¢Âбþ¤¹¤ë¥·¥°¥Ê¥ë¤ò
581 .\"O Enable canonical mode (described below).
582 ¥«¥Î¥Ë¥«¥ë¥â¡¼¥É¤ò͸ú¤Ë¤¹¤ë (²¼µ»²¾È)¡£
585 .\"O (not in POSIX; not supported under Linux)
586 .\"O If \fBICANON\fP is also set, terminal is uppercase only.
587 .\"O Input is converted to lowercase, except for characters preceded by \\.
588 .\"O On output, uppercase characters are preceded by \\ and lowercase
589 .\"O characters are converted to uppercase.
590 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤)
591 \fBICANON\fP ¤¬Æ±»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢Ã¼Ëö¤ÏÂçʸ»ú¤Î¤ß¤¬Í¸ú¤Ç¤¢¤ë¡£
592 ÆþÎϤµ¤ì¤¿Ê¸»ú¤Ï \\ ¤¬ÉÕ¤¤¤¿Ê¸»ú¤ò½ü¤¤¤Æ¾®Ê¸»ú¤ËÊÑ´¹¤µ¤ì¤ë¡£
593 ½ÐÎÏ»þ¤Ï¡¢Âçʸ»ú¤ÎÁ°¤Ë \\ ¤¬ÉÕ¤¡¢¾®Ê¸»ú¤ÏÂçʸ»ú¤ËÊÑ´¹¤µ¤ì¤ë¡£
594 .\"O [requires _BSD_SOURCE or _SVID_SOURCE or _XOPEN_SOURCE]
595 .\"O .\" glibc is probably now wrong to allow
602 .\" °Ê²¼¤Ï¤ª¤½¤é¤¯ glibc ¤Î´Ö°ã¤¤¤Ç¤¢¤í¤¦¡£
604 .\"O .\" .B _XOPEN_SOURCE
613 .\"O Echo input characters.
614 ÆþÎϤµ¤ì¤¿Ê¸»ú¤ò¥¨¥³¡¼¤¹¤ë¡£
617 .\"O If \fBICANON\fP is also set, the ERASE character erases the preceding
618 .\"O input character, and WERASE erases the preceding word.
619 \fBICANON\fP ¤âƱ»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢ERASE ʸ»ú¤ÏÁ°¤Îʸ»ú¤òºï½ü¤·¡¢
620 WERASE ʸ»ú¤ÏÁ°¤Îñ¸ì¤òºï½ü¤¹¤ë¡£
623 .\"O If \fBICANON\fP is also set, the KILL character erases the current line.
624 \fBICANON\fP ¤âƱ»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢KILL ʸ»ú¤Ï¸½ºß¤Î¹Ô¤òºï½ü¤¹¤ë¡£
627 .\"O If \fBICANON\fP is also set, echo the NL character even if ECHO is not set.
628 \fBICANON\fP ¤âƱ»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢
629 ECHO ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¯¤Æ¤â NL ʸ»ú¤ò¥¨¥³¡¼¤¹¤ë¡£
632 .\"O (not in POSIX) If \fBECHO\fP is also set, ASCII control signals other than
633 .\"O TAB, NL, START, and STOP are echoed as \fB^X\fP,
634 .\"O where X is the character with
635 .\"O ASCII code 0x40 greater than the control signal.
636 .\"O For example, character
637 .\"O 0x08 (BS) is echoed as \fB^H\fP.
641 .\"O .BR _SVID_SOURCE ]
642 (POSIX ¤Ë¤Ï¤Ê¤¤) \fBECHO\fP ¤âƱ»þ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢
643 TAB, NL, START, STOP ¤Î ASCII À©¸æʸ»ú¤¬ \fB^X\fP ¤È¤·¤Æ¥¨¥³¡¼¤µ¤ì¤ë¡£
644 X ¤ÏÀ©¸æʸ»ú¤è¤ê ASCII ¥³¡¼¥É¤Ç 0x10 ¤À¤±Â礤Êʸ»ú¤Ç¤¢¤ë¡£
645 Î㤨¤Ðʸ»ú 0x28 (BS) ¤Ï \fB^H\fP ¤È¥¨¥³¡¼¤µ¤ì¤ë¡£
652 .\"O (not in POSIX) If \fBICANON\fP and \fBIECHO\fP are also set, characters
653 .\"O are printed as they are being erased.
657 .\"O .BR _SVID_SOURCE ]
658 (POSIX ¤Ë¤Ï¤Ê¤¤) \fBICANON\fP ¤ª¤è¤Ó \fBIECHO\fP ¤¬Æ±»þ¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢
659 ºï½ü¤µ¤ì¤¿Ê¸»ú¤âɽ¼¨¤µ¤ì¤ë¡£
666 .\"O (not in POSIX) If \fBICANON\fP is also set, KILL is echoed by erasing
667 .\"O each character on the line, as specified by \fBECHOE\fP and \fBECHOPRT\fP.
671 .\"O .BR _SVID_SOURCE ]
672 (POSIX ¤Ë¤Ï¤Ê¤¤) \fBICANON\fP ¤âÀßÄꤵ¤ì¤¿¾ì¹ç¡¢
673 KILL ¤¬¹Ô¤Î³Æʸ»ú¤ò¾Ãµî¤¹¤ëÂå¤ï¤ê¤Ë¥¨¥³¡¼¤µ¤ì¤ë¡£
674 ¤³¤ì¤Ï \fBECHOE\fP ¤ª¤è¤Ó \fBECHOPRT\fP ¤ò»ØÄꤹ¤ë¤³¤È¤ÈÅù¤·¤¤¡£
681 .\"O (not in POSIX) Echo only when a process is reading.
682 .\"O (Not implemented on Linux.)
683 (POSIX ¤Ë¤Ï¤Ê¤¤) ¥×¥í¥»¥¹¤¬Æɤ߹þ¤ó¤À¤È¤¤Ë¤À¤±¥¨¥³¡¼¤¹¤ë¡£
684 (Linux ¤Ç¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤Ê¤¤)
687 .\"O (not in POSIX; not supported under Linux)
688 .\"O Output is being flushed.
689 .\"O This flag is toggled by typing
690 .\"O the DISCARD character.
694 .\"O .BR _SVID_SOURCE ]
695 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤)
696 ½ÐÎϤò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£¤³¤Î¥Õ¥é¥°¤Ï DISCARD ʸ»ú¤òÆþÎϤ¹¤ë¤³¤È¤ÇÀÚÂؤ¨¤é¤ì¤ë¡£
703 .\"O Disable flushing the input and output queues when generating signals for the
704 .\"O INT, QUIT, and SUSP characters.
705 .\" Stevens lets SUSP only flush the input queue
706 INT, QUIT, SUSP ʸ»ú¤ËÂбþ¤¹¤ë¥·¥°¥Ê¥ë¤òȯÀ¸¤¹¤ëºÝ¤Î
707 ÆþÎÏ¡¦½ÐÎÏ¥¥å¡¼¤Î¥Õ¥é¥Ã¥·¥å¤ò̵¸ú¤Ë¤¹¤ë¡£
712 .\"O signal to the process group of a background process
713 .\"O which tries to write to its controlling terminal.
714 ¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¤Î¥×¥í¥»¥¹¥°¥ë¡¼¥×¤ÇÀ©¸æüËö¤Ø
715 ʸ»ú¤ò½ÐÎϤ·¤è¤¦¤È¤·¤Æ¤¤¤ë¥×¥í¥»¥¹¤ËÂФ·¤Æ
720 .\"O (not in POSIX; not supported under Linux)
721 .\"O All characters in the input queue are reprinted when
722 .\"O the next character is read.
724 .\"O handles typeahead this way.)
728 .\"O .BR _SVID_SOURCE ]
729 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤)
730 ¼¡¤Îʸ»ú¤òÆɤ߹þ¤ó¤À»þ¡¢ÆþÎÏ¥¥å¡¼Ãæ¤ÎÁ´Ê¸»ú¤òºÆɽ¼¨¤¹¤ë¡£
732 ¤ÏÆþÎϹԤò¤³¤Î¤è¤¦¤Ë½èÍý¤·¤Æ¤¤¤ë¡£)
739 .\"O Enable implementation-defined input processing.
740 .\"O This flag, as well as \fBICANON\fP must be enabled for the
741 .\"O special characters EOL2, LNEXT, REPRINT, WERASE to be interpreted,
742 .\"O and for the \fBIUCLC\fP flag to be effective.
743 ¼ÂÁõ°Í¸¤ÎÆþÎϽèÍý¤ò͸ú¤Ë¤¹¤ë¡£
744 ¤³¤Î¥Õ¥é¥°¤Ï¡¢Æüìʸ»ú¤Ç¤¢¤ë EOL2, LNEXT, REPRINT, WERASE ¤ä¡¢
745 \fBIUCLC\fP ¥Õ¥é¥°¤ò͸ú¤Ë¤¹¤ë¤¿¤á¤ËɬÍפǤ¢¤ë¡£
747 .\"O The \fIc_cc\fP array defines the special control characters.
748 .\"O The symbolic indices (initial values) and meaning are:
749 \fIc_cc\fP ÇÛÎó¤ÏÆüì¤ÊÀ©¸æʸ»ú¤òÄêµÁ¤·¤Æ¤¤¤ë¡£
750 ¥·¥ó¥Ü¥ë¤Î°ìÍ÷ (½é´üÃÍ) ¤È°ÕÌ£¤Ï°Ê²¼¤ÎÄ̤ꡣ
753 .\"O (003, ETX, Ctrl-C, or also 0177, DEL, rubout)
754 .\"O Interrupt character.
760 .\"O is set, and then not passed as input.
761 (003, ETX, Ctrl-C ¤« 0177, DEL, rubout)
766 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
769 .\"O (034, FS, Ctrl-\e)
776 .\"O is set, and then not passed as input.
782 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
785 .\"O (0177, DEL, rubout, or 010, BS, Ctrl-H, or also #)
786 .\"O Erase character.
787 .\"O This erases the previous not-yet-erased character,
788 .\"O but does not erase past EOF or beginning-of-line.
791 .\"O is set, and then not passed as input.
792 (0177, DEL, rubout ¤« 010, BS, Ctrl-H ¤« #)
793 ¾Ãµîʸ»ú¡£¤³¤ì¤Ë¤è¤ê¡¢Ä¾Á°¤Î̤¾Ãµîʸ»ú¤ò¾Ãµî¤¹¤ë¡£
794 ¤·¤«¤·¡¢EOF ¤ä¹ÔƬ¤òĶ¤¨¤Æ¤Ï¾Ãµî¤·¤Ê¤¤¡£
796 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
799 .\"O (025, NAK, Ctrl-U, or Ctrl-X, or also @)
801 .\"O This erases the input since the last EOF or beginning-of-line.
804 .\"O is set, and then not passed as input.
805 (025, NAK, Ctrl-U ¤« Ctrl-X ¤« @)
806 ´°Á´¾Ãµîʸ»ú¡£Ä¾Á°¤Î EOF ¤«¹ÔƬ°Ê¹ß¤ÎÁ´¤Æ¤ÎÆþÎϤò¾Ãµî¤¹¤ë¡£
808 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
811 .\"O (004, EOT, Ctrl-D)
812 .\"O End-of-file character.
815 .\"O More precisely: this character causes the pending tty buffer to be sent
816 .\"O to the waiting user program without waiting for end-of-line.
817 ¤è¤êÀµ³Î¤Ë¤Ï¡¢tty ¥Ð¥Ã¥Õ¥¡¤ÎÆâÍƤò¹ÔËö¤òÂÔ¤¿¤º¤Ë¥æ¡¼¥¶¡¼¥×¥í¥°¥é¥à¤ËÁ÷¤ë¡£
818 .\"O If it is the first character of the line, the
821 .\"O user program returns 0, which signifies end-of-file.
822 ¤³¤ì¤¬¹Ô¤ÎºÇ½é¤Îʸ»ú¤À¤Ã¤¿¾ì¹ç¡¢¥æ¡¼¥¶¡¼¥×¥í¥°¥é¥à¤Î
825 ÊÖ¤·¡¢¥Õ¥¡¥¤¥ë½ªÃ¼¤Ç¤¢¤ë¤³¤È¤òÃΤ餻¤ë¡£
828 .\"O is set, and then not passed as input.
830 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
833 .\"O Minimum number of characters for noncanonical read.
834 È󥫥Υ˥«¥ëÆɤ߹þ¤ß»þ¤ÎºÇ¾®Ê¸»ú¿ô¡£
838 .\"O Additional end-of-line character.
844 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤¹¤ë¡£
847 .\"O Timeout in deciseconds for noncanonical read.
848 È󥫥Υ˥«¥ëÆɤ߹þ¤ß»þ¤Î¥¿¥¤¥à¥¢¥¦¥È»þ´Ö (1/10 ÉÃñ°Ì)¡£
851 .\"O (not in POSIX; 0, NUL)
852 (POSIX ¤Ë¤Ï¤Ê¤¤; 0, NUL)
853 .\"O Yet another end-of-line character.
859 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤¹¤ë¡£
862 .\"O (not in POSIX; not supported under Linux; 0, NUL)
863 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤; 0, NUL)
864 .\"O Switch character.
865 .\"O (Used by \fBshl\fP only.)
866 ¥¹¥¤¥Ã¥Áʸ»ú (\fBshl\fP ¤Ç¤Î¤ßÍѤ¤¤é¤ì¤ë)¡£
870 .\"O Start character.
871 .\"O Restarts output stopped by the Stop character.
874 .\"O is set, and then not passed as input.
875 ³«»Ïʸ»ú¡£Ää»ßʸ»ú¤ÇÄä»ß¤·¤¿½ÐÎϤòºÆ³«¤¹¤ë¡£
877 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
882 .\"O Stop output until Start character typed.
885 .\"O is set, and then not passed as input.
886 Ää»ßʸ»ú¡£³«»Ïʸ»ú¤¬ÆþÎϤµ¤ì¤ë¤Þ¤Ç½ÐÎϤòÄä»ß¤¹¤ë¡£
888 ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
892 .\"O Suspend character.
898 .\"O is set, and then not passed as input.
903 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
906 .\"O (not in POSIX; not supported under Linux; 031, EM, Ctrl-Y)
907 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤; 031, EM, Ctrl-Y)
908 .\"O Delayed suspend character:
911 .\"O signal when the character is read by the user program.
916 .\"O are set, and the system supports
917 .\"O job control, and then not passed as input.
918 ÃÙ±äÃæÃÇʸ»ú¡£¥æ¡¼¥¶¡¼¥×¥í¥°¥é¥à¤«¤éʸ»ú¤¬Æɤ߹þ¤Þ¤ì¤¿»þ¤Ë
924 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Æ¡¢¥·¥¹¥Æ¥à¤¬¥¸¥ç¥ÖÀ©¸æ¤ËÂбþ¤·¤Æ¤¤¤ë¾ì¹ç¤Ë
925 ǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
928 .\"O (not in POSIX; 026, SYN, Ctrl-V)
929 (POSIX ¤Ë¤Ï¤Ê¤¤; 026, SYN Ctrl-V)
931 .\"O Quotes the next input character, depriving it of
932 .\"O a possible special meaning.
935 .\"O is set, and then not passed as input.
936 ¥ê¥Æ¥é¥ë¡£¼¡¤ÎÆþÎÏʸ»ú¤ò¥¨¥¹¥±¡¼¥×¤·¡¢ÆÃÊ̤ʰÕÌ£¤¬¤¢¤Ã¤Æ¤â²ò¼á¤·¤Ê¤¤¡£
938 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
941 .\"O (not in POSIX; 027, ETB, Ctrl-W)
942 (POSIX ¤Ë¤Ï¤Ê¤¤; 027, ETB, Ctrl-W)
949 .\"O are set, and then not passed as input.
953 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
956 .\"O (not in POSIX; 022, DC2, Ctrl-R)
957 (POSIX ¤Ë¤Ï¤Ê¤¤; 022, DC2, Ctrl-R)
958 .\"O Reprint unread characters.
959 ¤Þ¤ÀÆɤ߹þ¤ó¤Ç¤¤¤Ê¤¤Ê¸»úÎó¤òºÆɽ¼¨¤¹¤ë¡£
964 .\"O are set, and then not passed as input.
968 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
971 .\"O (not in POSIX; not supported under Linux; 017, SI, Ctrl-O)
972 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤; 017, SI, Ctrl-O)
973 .\"O Toggle: start/stop discarding pending output.
974 ̤Á÷¿®¥Ð¥Ã¥Õ¥¡¤ÎÆâÍƤÎÇË´þ/Êݸ¤òÀÚ¤êÂؤ¨¤ë¡£
977 .\"O is set, and then not passed as input.
979 ¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ëǧ¼±¤·¡¢ÆþÎϤˤÏÅϤµ¤ì¤Ê¤¤¡£
982 .\"O (not in POSIX; not supported under Linux;
983 .\"O status request: 024, DC4, Ctrl-T).
984 (POSIX ¤Ë¤Ï¤Ê¤¤; Linux ¤Ç¤ÏÂбþ¤·¤Æ¤¤¤Ê¤¤;
985 ¾õÂÖÍ×µá: 024, DC4, Ctrl-T)
987 .\"O These symbolic subscript values are all different, except that
990 .\"O may have the same value as
994 ¤³¤ì¤é¤Î¥·¥ó¥Ü¥ë¤Î¼¨¤¹ÃͤÏÁ´¤Æ°Û¤Ê¤ë¡£
1002 .\"O In noncanonical mode the special character meaning is replaced
1003 .\"O by the timeout meaning.
1004 .\"O For an explanation of
1008 .\"O see the description of
1009 .\"O noncanonical mode below.
1010 È󥫥Υ˥«¥ë¥â¡¼¥É¤Ç¤Ï¡¢Æüìʸ»ú¤Î°ÕÌ£¤Ï¥¿¥¤¥à¥¢¥¦¥È¤Î°ÕÌ£¤ËÊѤï¤ë¡£
1014 ¤ÎÀâÌÀ¤Ë¤Ä¤¤¤Æ¤Ï¡¢²¼µ¤ÎÈ󥫥Υ˥«¥ë¥â¡¼¥É¤ÎÀâÌÀ¤ò»²¾È¤Î¤³¤È¡£
1015 .\"O .SS "Retrieving and changing terminal settings"
1016 .SS "üËö¤ÎÀßÄê¤Î¼èÆÀ¤ÈÊѹ¹"
1018 .\"O .BR tcgetattr ()
1019 .\"O gets the parameters associated with the object referred by \fIfd\fP and
1020 .\"O stores them in the \fItermios\fP structure referenced by
1021 .\"O \fItermios_p\fP.
1022 .\"O This function may be invoked from a background process;
1023 .\"O however, the terminal attributes may be subsequently changed by a
1024 .\"O foreground process.
1026 ¤Ï \fIfd\fP ¤Ë´Ø¤¹¤ë¥Ñ¥é¥á¡¼¥¿¤ò¼èÆÀ¤·¡¢\fItermios_p\fP ¤¬»²¾È¤¹¤ë¹½
1027 ¤ÂÎ \fItermios\fP ¤ËÀßÄꤹ¤ë¡£¤³¤Î´Ø¿ô¤Ï¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹¤«¤é
1028 ¸Æ¤Ð¤ì¤ë¤³¤È¤â¤¢¤ë¤¬¡¢¤³¤Î¾ì¹ç¡¢Ã¼Ëö¤Î°À¤Ï¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¥×¥í¥»¥¹
1029 ¤Ë¤è¤Ã¤ÆÊѲ½¤¹¤ë¤³¤È¤â¤¢¤ë¡£
1031 .\"O .BR tcsetattr ()
1032 .\"O sets the parameters associated with the terminal (unless support is
1033 .\"O required from the underlying hardware that is not available) from the
1034 .\"O \fItermios\fP structure referred to by \fItermios_p\fP.
1035 .\"O \fIoptional_actions\fP specifies when the changes take effect:
1037 ¤ÏüËö¤Ë´ØÏ¢¤·¤¿¥Ñ¥é¥á¡¼¥¿¤òÀßÄꤹ¤ë (¥Ï¡¼¥É¥¦¥§¥¢¤ÎÀßÄê¤ËɬÍפǡ¢¤³¤³¤Ç
1038 ÀßÄê¤Ç¤¤Ê¤¤¤â¤Î¤ò½ü¤¯)¡£ÀßÄê¤Ë¤Ï \fItermios_p\fP ¤¬»²¾È¤¹¤ë
1039 \fItermios\fP ¹½Â¤ÂΤòÍѤ¤¤ë¡£
1040 \fIoptional_actions\fP ¤Ë¤ÏÊѹ¹¤¬Í¸ú¤È¤Ê¤ë¥¿¥¤¥ß¥ó¥°¤òÀßÄꤹ¤ë:
1042 .\"O the change occurs immediately.
1043 ¤¿¤À¤Á¤ËÊѹ¹¤¬Í¸ú¤È¤Ê¤ë¡£
1045 .\"O the change occurs after all output written to
1047 .\"O has been transmitted.
1048 .\"O This function should be used when changing
1049 .\"O parameters that affect output.
1051 ¤Ø¤Î½ÐÎϤ¬¤¹¤Ù¤ÆžÁ÷¤µ¤ì¤¿¸å¤ËÊѹ¹¤¬Í¸ú¤Ë¤Ê¤ë¡£¤³¤Îµ¡Ç½¤Ï
1052 ½ÐÎϤ˱ƶÁ¤¹¤ë¥Ñ¥é¥á¡¼¥¿¤òÊѹ¹¤¹¤ë»þ¤Ë»ÈÍѤ¹¤ë¤Ù¤¤Ç¤¢¤ë¡£
1054 .\"O the change occurs after all output written to the object referred by
1056 .\"O has been transmitted, and all input that has been received but not read
1057 .\"O will be discarded before the change is made.
1058 ¥Ñ¥é¥á¡¼¥¿¤òÊѹ¹¤¹¤ëÁ°¤Ë¡¢
1060 ¤Ø¤Î½ÐÎϤ¬¤¹¤Ù¤ÆžÁ÷¤µ¤ì¡¢¼õ¿®¤·¤¿¤¬¤Þ¤ÀÆɤ߹þ¤ó¤Ç¤¤¤Ê¤¤¤¹¤Ù¤Æ¤Î
1062 .\"O .SS "Canonical and noncanonical mode"
1063 .SS "¥«¥Î¥Ë¥«¥ë¥â¡¼¥É¤ÈÈ󥫥Υ˥«¥ë¥â¡¼¥É"
1064 .\"O The setting of the
1068 .\"O determines whether the terminal is operating in canonical mode
1071 .\"O noncanonical mode
1080 ¥Õ¥é¥°¤ÎÀßÄê¤Ë¤è¤ê¡¢Ã¼Ëö¤¬¥«¥Î¥Ë¥«¥ë¥â¡¼¥É¤ÇÆ°ºî¤¹¤ë¤«¤¬·èÄꤵ¤ì¤ë¡£
1082 ¤¬¥»¥Ã¥È¤µ¤ì¤¿¾ì¹ç¡¢¥«¥Î¥Ë¥«¥ë¥â¡¼¥É (canonical mode) ¤È¤Ê¤ê¡¢
1083 ¥»¥Ã¥È¤µ¤ì¤Ê¤¤¾ì¹ç¡¢È󥫥Υ˥«¥ë¥â¡¼¥É (noncanonical mode) ¤È¤Ê¤ë¡£
1088 .\"O In canonical mode:
1089 ¥«¥Î¥Ë¥«¥ë¥â¡¼¥É¤Ç¤Ï¡¢°Ê²¼¤Î¤è¤¦¤ÊÆ°ºî¤È¤Ê¤ë¡£
1091 .\"O Input is made available line by line.
1092 .\"O An input line is available when one of the line delimiters
1093 .\"O is typed (NL, EOL, EOL2; or EOF at the start of line).
1094 .\"O Except in the case of EOF, the line delimiter is included
1095 .\"O in the buffer returned by
1097 ÆþÎϤϹÔñ°Ì¤Ë¹Ô¤ï¤ì¤ë¡£
1098 ¹Ô¶èÀÚ¤êʸ»ú¤¬ÂǤÁ¹þ¤Þ¤ì¤¿»þÅÀ¤Ç¡¢ÆþÎϹԤ¬ÍøÍѲÄǽ¤È¤Ê¤ë¡£
1099 ¹Ô¶èÀÚ¤êʸ»ú¤Ï NL, EOL, EOL2 ¤ª¤è¤Ó¹ÔƬ¤Ç¤Î EOF ¤Ç¤¢¤ë¡£
1102 ¤¬ÊÖ¤¹¥Ð¥Ã¥Õ¥¡¤Ë¹Ô¶èÀÚ¤êʸ»ú¤â´Þ¤á¤é¤ì¤ë¡£
1104 .\"O Line editing is enabled (ERASE, KILL;
1107 .\"O flag is set: WERASE, REPRINT, LNEXT).
1110 .\"O returns at most one line of input; if the
1112 .\"O requested fewer bytes than are available in the current line of input,
1113 .\"O then only as many bytes as requested are read,
1114 .\"O and the remaining characters will be available for a future
1116 ¹ÔÊÔ½¸¤¬Í¸ú¤È¤Ê¤ë (ERASE, KILL ¤¬¸ú²Ì¤ò»ý¤Ä¡£
1118 ¥Õ¥é¥°¤¬ÀßÄꤵ¤ì¤¿¾ì¹ç¤Ï¡¢
1119 WERASE, REPRINT, LNEXT ¤â¸ú²Ì¤ò»ý¤Ä)¡£
1121 ¤ÏºÇÂç¤Ç¤â 1¹Ô¤ÎÆþÎϤ·¤«ÊÖ¤µ¤Ê¤¤¡£
1123 ¤¬Í׵ᤷ¤¿¥Ð¥¤¥È¿ô¤¬¸½ºß¤ÎÆþÎϹԤΥХ¤¥È¿ô¤è¤ê¤â¾¯¤Ê¤¤¾ì¹ç¡¢
1124 Í׵ᤷ¤¿¤Î¤ÈƱ¤¸¥Ð¥¤¥È¿ô¤À¤±¤¬Æɤ߹þ¤Þ¤ì¡¢
1129 .\"O In noncanonical mode input is available immediately (without
1130 .\"O the user having to type a line-delimiter character),
1131 .\"O and line editing is disabled.
1132 .\"O The settings of MIN
1133 .\"O .RI ( c_cc[VMIN] )
1135 .\"O .RI ( c_cc[VTIME] )
1136 .\"O determine the circumstances in which a
1138 .\"O completes; there are four distinct cases:
1139 È󥫥Υ˥«¥ë¥â¡¼¥É¤Ç¤Ï¡¢ÆþÎϤϨºÂ¤ËÍøÍѲÄǽ¤È¤Ê¤ê
1140 (¥æ¡¼¥¶¤Ï¹Ô¶èÀÚ¤êʸ»ú¤òÂǤÁ¹þ¤àɬÍפϤʤ¤)¡¢
1141 ¹ÔÊÔ½¸¤Ï̵¸ú¤È¤Ê¤ë¡£
1148 ¤¬´°Î»¤¹¤ë¾ò·ï¤¬·èÄꤵ¤ì¤ë¡£4¼ïÎà¤Î¾ì¹ç¤¬¤¢¤ë:
1150 MIN == 0; TIME == 0:
1151 .\"O If data is available,
1153 .\"O returns immediately, with the lesser of the number of bytes
1154 .\"O available, or the number of bytes requested.
1155 .\"O If no data is available,
1158 ¥Ç¡¼¥¿¤¬ÍøÍѲÄǽ¤Ç¤¢¤ì¤Ð¡¢
1160 ¤Ï¤¹¤°¤ËÊ֤롣¤³¤Î¤È¤¤ÎÊÖ¤êÃͤϡ¢¤½¤Î¤È¤ÍøÍѲÄǽ¤Ê¥Ð¥¤¥È¿ô¤«
1162 ¤ÎÍ×µá¥Ð¥¤¥È¿ô¤Î¤¦¤Á¾®¤µ¤¤Êý¤È¤Ê¤ë¡£
1163 ÍøÍѲÄǽ¤Ê¥Ç¡¼¥¿¤¬¤Ê¤¤¾ì¹ç
1169 .\"O blocks until the lesser of MIN bytes or the number of bytes requested
1170 .\"O are available, and returns the lesser of these two values.
1172 ¤Ï¡¢ÍøÍѲÄǽ¤Ê¥Ç¡¼¥¿¤¬ MIN ¥Ð¥¤¥È¤«Í×µá¥Ð¥¤¥È¿ô¤Î¤¤¤º¤ì¤«¤Ë㤹¤ë¤Þ¤Ç
1173 Ää»ß¤¹¤ë¡£ÊÖ¤êÃͤϡ¢MIN ¤«Í×µá¥Ð¥¤¥È¿ô¤Î¾®¤µ¤¤Êý¤È¤Ê¤ë¡£
1176 .\"O TIME specifies the limit for a timer in tenths of a second.
1177 .\"O The timer is started when
1181 .\"O returns either when at least one byte of data is available,
1182 .\"O or when the timer expires.
1183 .\"O If the timer expires without any input becoming available,
1186 TIME ¤Ï¥¿¥¤¥Þ¤Î¾å¸Â¤òµ¬Äꤷ¡¢Ã±°Ì¤Ï 1/10 ÉäǤ¢¤ë¡£
1189 ¤¬¸Æ¤Ð¤ì¤¿»þÅÀ¤Ç³«»Ï¤µ¤ì¤ë¡£
1191 ¤¬ÊÖ¤ë¤Î¤Ï¡¢¾¯¤Ê¤¯¤È¤â 1¥Ð¥¤¥È¤Î¥Ç¡¼¥¿¤¬ÍøÍѲÄǽ¤È¤Ê¤Ã¤¿»þÅÀ¡¢
1192 ¤Þ¤¿¤Ï¥¿¥¤¥Þ¤¬»þ´ÖÀÚ¤ì¤È¤Ê¤Ã¤¿»þÅÀ¤Ç¤¢¤ë¡£
1193 ÆþÎϤ¬Á´¤¯¤Ê¤¯¥¿¥¤¥Þ¤¬»þ´ÖÀÚ¤ì¤È¤Ê¤Ã¤¿¾ì¹ç¡¢
1198 .\"O TIME specifies the limit for a timer in tenths of a second.
1199 .\"O Once an initial byte of input becomes available,
1200 .\"O the timer is restarted after each further byte is received.
1202 .\"O returns either when the lesser of the number of bytes requested or
1203 .\"O MIN byte have been read,
1204 .\"O or when the inter-byte timeout expires.
1205 .\"O Because the timer is only started after the initial byte
1206 .\"O becomes available, at least one byte will be read.
1207 TIME ¤Ï¥¿¥¤¥Þ¤Î¾å¸Â¤òµ¬Äꤷ¡¢Ã±°Ì¤Ï 1/10 ÉäǤ¢¤ë¡£
1208 ÆþÎϤκǽé¤Î¥Ð¥¤¥È¤¬ÍøÍѲÄǽ¤Ë¤Ê¤Ã¤¿¸å¤Ï¡¢
1209 ¿·¤¿¤Ë 1¥Ð¥¤¥È¼õ¿®¤¹¤ëÅ٤˥¿¥¤¥Þ¤¬¥ê¥»¥Ã¥È¤µ¤ì¤ë¡£
1211 ¤¬ÊÖ¤ë¤Î¤Ï¡¢MIN ¥Ð¥¤¥È¤«Í×µá¥Ð¥¤¥È¿ô¤Î¤¦¤Á¾¯¤Ê¤¤Êý¤Þ¤ÇÆɤ߽Фµ¤ì¤¿»þÅÀ¤«¡¢
1212 ¥Ð¥¤¥È´Ö¥¿¥¤¥Þ¤¬»þ´ÖÀÚ¤ì¤È¤Ê¤Ã¤¿»þÅÀ¤Ç¤¢¤ë¡£
1213 ¤ÏºÇ½é¤Î¥Ð¥¤¥È¤¬ÍøÍѲÄǽ¤Ë¤Ê¤é¤Ê¤¤¤È¥¿¥¤¥Þ¤Ï³«»Ï¤µ¤ì¤Ê¤¤¤Î¤Ç¡¢
1214 ¾¯¤Ê¤¯¤È¤â 1¥Ð¥¤¥È¤ÏÆɤ߹þ¤Þ¤ì¤ë¡£
1217 .\"O .BR cfmakeraw ()
1218 .\"O sets the terminal to something like the
1219 .\"O "raw" mode of the old Version 7 terminal driver:
1220 .\"O input is available character by character,
1221 .\"O echoing is disabled, and all special processing of
1222 .\"O terminal input and output characters is disabled.
1223 .\"O The terminal attributes are set as follows:
1225 ¤Ï¡¢Ã¼Ëö¤òÀΤΠVersion 7 üËö¥É¥é¥¤¥Ð¤Î
1226 "raw" ¥â¡¼¥É¤Î¤è¤¦¤ËÀßÄꤹ¤ë¡£
1227 ÆþÎϤÏʸ»úñ°Ì¤Ë²Äǽ¤Ç¤¢¤ê¡¢¥¨¥³¡¼¤¬Ìµ¸ú¤È¤Ê¤ê¡¢
1228 üËö¤ÎÆþ½ÐÎÏʸ»ú¤ËÂФ¹¤ëÆüì½èÍý¤Ï¤¹¤Ù¤Æ̵¸ú¤È¤Ê¤ë¡£
1229 üËö¤Î°À¤Ï°Ê²¼¤Î¤è¤¦¤ËÀßÄꤵ¤ì¤ë:
1232 termios_p\->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP
1233 | INLCR | IGNCR | ICRNL | IXON);
1234 termios_p\->c_oflag &= ~OPOST;
1235 termios_p\->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
1236 termios_p\->c_cflag &= ~(CSIZE | PARENB);
1237 termios_p\->c_cflag |= CS8;
1239 .\"O .SS "Line control"
1242 .\"O .BR tcsendbreak ()
1243 .\"O transmits a continuous stream of zero-valued bits for a specific
1244 .\"O duration, if the terminal is using asynchronous serial data
1246 .\"O If \fIduration\fP is zero, it transmits zero-valued bits
1247 .\"O for at least 0.25 seconds, and not more that 0.5 seconds.
1248 .\"O If \fIduration\fP is not zero, it sends zero-valued bits for some
1249 .\"O implementation-defined length of time.
1251 ¤ÏüËö¤¬ÈóƱ´ü¤Î¥·¥ê¥¢¥ë¥Ç¡¼¥¿Å¾Á÷¤òÍѤ¤¤Æ¤¤¤ë¾ì¹ç¤Ë¡¢
1252 Ϣ³¤·¤¿0¤Î¥Ó¥Ã¥ÈÎó¤ò°ìÄê´Ö³Ö¤ÇžÁ÷¤¹¤ë¡£
1253 \fIduration\fP ¤¬ 0 ¤Î¾ì¹ç¤Ï¡¢0 ¤Î¥Ó¥Ã¥È¤ò 0.25 Éðʾ塢
1254 0.5 Éðʲ¼¤Î´Ö³Ö¤ÇžÁ÷¤¹¤ë¡£ \fIduration\fP ¤¬ 0 ¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢
1255 0 ¤Î¥Ó¥Ã¥È¤ò¼ÂÁõ°Í¸¤Î»þ´Ö´Ö³Ö¤ÇÁ÷¤ë¡£
1257 .\"O If the terminal is not using asynchronous serial data transmission,
1258 .\"O .BR tcsendbreak ()
1259 .\"O returns without taking any action.
1260 üËö¤¬ÈóƱ´ü¤Î¥·¥ê¥¢¥ë¥Ç¡¼¥¿Å¾Á÷¥â¡¼¥É¤Ç¤Ê¤¤¾ì¹ç¡¢
1262 ¤Ï²¿¤â¹Ô¤ï¤º¤ËÌá¤ë¡£
1265 .\"O waits until all output written to the object referred to by
1267 .\"O has been transmitted.
1271 ¤¬¹Ô¤Ã¤Æ¤¤¤ë½ÐÎϤΞÁ÷¤¬´°Î»¤¹¤ë¤Þ¤ÇÂԤġ£
1274 .\"O discards data written to the object referred to by
1276 .\"O but not transmitted, or data received but not read, depending on the
1278 .\"O .IR queue_selector :
1282 ¤¬¹Ô¤Ã¤Æ¤¤¤ë¥Ç¡¼¥¿¤Î½ÐÎϤǤޤÀžÁ÷¤µ¤ì¤Æ¤¤¤Ê¤¤¤â¤Î¡¢¤¢¤ë¤¤¤Ï¼õ¿®¤·
1283 ¤¿¤¬¤Þ¤ÀÆþÎϤ·¤Æ¤¤¤Ê¤¤¤â¤Î¤òÇË´þ¤¹¤ë¡£¤¤¤º¤ì¤ò¹Ô¤¦¤«¤Ï
1286 .\"??nakano flush == discard?
1288 .\"O flushes data received but not read.
1289 ¼õ¿®¤·¤¿¤¬Æɤó¤Ç¤¤¤Ê¤¤¥Ç¡¼¥¿¤ò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£
1291 .\"O flushes data written but not transmitted.
1292 ½ñ¤¤¤¿¤¬Á÷¿®¤·¤Æ¤¤¤Ê¤¤¥Ç¡¼¥¿¤ò¥Õ¥é¥Ã¥·¥å¤¹¤ë¡£
1294 .\"O flushes both data received but not read, and data written but not
1296 ¼õ¿®¤·¤¿¤¬Æɤó¤Ç¤¤¤Ê¤¤¥Ç¡¼¥¿¡¦½ñ¤¤¤¿¤¬Á÷¿®¤·¤Æ¤¤¤Ê¤¤¥Ç¡¼¥¿Î¾Êý
1300 .\"O suspends transmission or reception of data on the object referred to by
1302 .\"O depending on the value of
1307 ¤Ç»ØÄꤵ¤ì¤¿¥ª¥Ö¥¸¥§¥¯¥È¤Ë¤ª¤±¤ë¥Ç¡¼¥¿¤ÎÁ÷¿®¤¢¤ë¤¤¤Ï¼õ¿®¤ò°ì»þŪ¤ËÃæÃǤ¹¤ë¡£
1308 Á÷¿®¤È¼õ¿®¤Î¤É¤Á¤é¤«¤Ï¡¢
1309 .IR action ¤Ç·è¤Þ¤ë:
1311 .\"O suspends output.
1314 .\"O restarts suspended output.
1315 ÃæÃǤ·¤¿½ÐÎϤκƳ«¡£
1317 .\"O transmits a STOP character, which stops the terminal device from
1318 .\"O transmitting data to the system.
1320 STOP ʸ»ú¤ÏüËö¥Ç¥Ð¥¤¥¹¤«¤é¥·¥¹¥Æ¥à¤Ø¤Î¥Ç¡¼¥¿Á÷¿®¤òÄä»ß¤¹¤ë¡£
1322 .\"O transmits a START character, which starts the terminal device
1323 .\"O transmitting data to the system.
1325 START ʸ»ú¤ÏüËö¥Ç¥Ð¥¤¥¹¤«¤é¥·¥¹¥Æ¥à¤Ø¤Î¥Ç¡¼¥¿Á÷¿®¤ò³«»Ï¤¹¤ë¡£
1327 .\"O The default on open of a terminal file is that neither its input nor its
1328 .\"O output is suspended.
1329 üËö¥Õ¥¡¥¤¥ë¤¬¥ª¡¼¥×¥ó¤µ¤ì¤¿¤È¤¤Î¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢
1330 ÆþÎϤâ½ÐÎϤâÃæÃǤµ¤ì¤Æ¤¤¤Ê¤¤¡£
1331 .\"O .SS "Line speed"
1333 .\"O The baud rate functions are provided for getting and setting the values
1334 .\"O of the input and output baud rates in the \fItermios\fP structure.
1335 .\"O The new values do not take effect
1337 .\"O .BR tcsetattr ()
1338 .\"O is successfully called.
1339 ¥Ü¡¼¥ì¡¼¥È´Ø¿ô¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤ÎÆþ½ÐÎϥܡ¼¥ì¡¼¥È¤ò
1340 ¼èÆÀ¡¢ÀßÄꤹ¤ë¤¿¤á¤ËÄ󶡤µ¤ì¤ë¡£
1343 ¤Î¸Æ¤Ó½Ð¤·¤¬À®¸ù¤¹¤ë¤Þ¤Ç¤Ï͸ú¤Ç¤Ï¤Ê¤¤¡£
1345 .\"O Setting the speed to \fBB0\fP instructs the modem to "hang up".
1346 .\"O The actual bit rate corresponding to \fBB38400\fP may be altered with
1347 .\"O .BR setserial (8).
1348 ®ÅÙ¤ò \fBB0\fP ¤ËÀßÄꤷ¤¿¾ì¹ç¡¢¥â¥Ç¥à¤ÏÄä»ß (hang up) ¤¹¤ë¡£
1349 \fBB38400\fP ¤Ë³ºÅö¤¹¤ë¼ÂºÝ¤Î¥Ó¥Ã¥È¥ì¡¼¥È¤Ï
1354 .\"O The input and output baud rates are stored in the \fItermios\fP
1356 ÆþÎϤª¤è¤Ó½ÐÎϥܡ¼¥ì¡¼¥È¤Ï \fItermios\fP ¹½Â¤ÂΤ˳ÊǼ¤µ¤ì¤ë¡£
1358 .\"O .BR cfgetospeed ()
1359 .\"O returns the output baud rate stored in the \fItermios\fP structure
1361 .\"O .IR termios_p .
1365 ¤¬¼¨¤·¤Æ¤¤¤ë \fItermios\fP ¹½Â¤ÂΤ˳ÊǼ¤µ¤ì¤Æ¤¤¤ë
1366 ½ÐÎϥܡ¼¥ì¡¼¥È¤òÊÖ¤¹¡£
1368 .\"O .BR cfsetospeed ()
1369 .\"O sets the output baud rate stored in the \fItermios\fP structure pointed
1370 .\"O to by \fItermios_p\fP to \fIspeed\fP, which must be one of these constants:
1372 ¤Ï \fItermios_p\fP ¤Ç¼¨¤µ¤ì¤Æ¤¤¤ë \fItermios\fP ¹½Â¤ÂÎÃæ¤Î½ÐÎϥܡ¼¥ì¡¼¥È¤ò
1373 \fIspeed\fP ¤ËÀßÄꤹ¤ë¡£Ãͤϰʲ¼¤Î¤¤¤º¤ì¤«¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤:
1399 .\"O The zero baud rate, \fBB0\fP,
1400 .\"O is used to terminate the connection.
1401 .\"O If B0 is specified, the modem control lines shall no longer be asserted.
1402 .\"O Normally, this will disconnect the line.
1403 .\"O \fBCBAUDEX\fP is a mask
1404 .\"O for the speeds beyond those defined in POSIX.1 (57600 and above).
1405 .\"O Thus, \fBB57600\fP & \fBCBAUDEX\fP is nonzero.
1406 0¥Ü¡¼ (\fBB0\fP) ¤ÏÀܳ¤ÎÃæÃǤËÍѤ¤¤é¤ì¤ë¡£
1407 B0¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¡¢¥â¥Ç¥à¤ÎÀ©¸æÀþ¤Ï»ÈÍѤµ¤ì¤Ê¤¤¾õÂ֤ˤʤꡢ°ìÈ̤ˤϤ³¤ì¤Ç
1409 \fBCBAUDEX\fP ¤ÏPOSIX.1¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë®ÅÙ¤ÎÈϰϳ° (57600 ¤ª¤è¤Ó¤½¤ì°Ê¾å)
1410 ¤òÀßÄꤹ¤ë¡£¤¹¤Ê¤ï¤ÁÎ㤨¤Ð \fBB57600\fP & \fBCBAUDEX\fP ¤Ï 0 ¤Ç¤Ê¤¤¡£
1412 .\"O .BR cfgetispeed ()
1413 .\"O returns the input baud rate stored in the \fItermios\fP structure.
1415 ¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤ÎÆþÎϥܡ¼¥ì¡¼¥È¤òÊÖ¤¹¡£
1417 .\"O .BR cfsetispeed ()
1418 .\"O sets the input baud rate stored in the \fItermios\fP structure to
1420 .\"O which must be specified as one of the \fBBnnn\fP constants listed above for
1421 .\"O .BR cfsetospeed ().
1422 .\"O If the input baud rate is set to zero, the input baud rate will be
1423 .\"O equal to the output baud rate.
1425 ¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤ÎÆþÎϥܡ¼¥ì¡¼¥È¤ò
1431 ¤Î¥Ü¡¼¥ì¡¼¥ÈÄê¿ô \fBBnnn\fP ¤Î¤¤¤º¤ì¤«°ì¤Ä¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¡£
1432 ÆþÎϥܡ¼¥ì¡¼¥È¤¬ 0 ¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¡¢ÆþÎϥܡ¼¥ì¡¼¥È¤Ï½ÐÎϥܡ¼¥ì¡¼¥È
1435 .\"O .BR cfsetspeed ()
1436 .\"O is a 4.4BSD extension.
1437 .\"O It takes the same arguments as
1438 .\"O .BR cfsetispeed (),
1439 .\"O and sets both input and output speed.
1441 ¤Ï 4.4BSD ¤Ë¤è¤ë³ÈÄ¥¤Ç¤¢¤ë¡£¤³¤Î´Ø¿ô¤Ï
1443 ¤ÈƱ¤¸°ú¤¿ô¤ò¤È¤ê¡¢Æþ½ÐÎÏξÊý¤Î®ÅÙ¤òÀßÄꤹ¤ë¡£
1444 .\"O .SH "RETURN VALUE"
1447 .\"O .BR cfgetispeed ()
1448 .\"O returns the input baud rate stored in the
1452 ¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤ÎÆþÎϥܡ¼¥ì¡¼¥È¤òÊÖ¤¹¡£
1454 .\"O .BR cfgetospeed ()
1455 .\"O returns the output baud rate stored in the \fItermios\fP structure.
1457 ¤Ï \fItermios\fP ¹½Â¤ÂÎÃæ¤Î½ÐÎϥܡ¼¥ì¡¼¥È¤òÊÖ¤¹¡£
1459 .\"O All other functions return:
1460 ¾¤Î¤¹¤Ù¤Æ¤Î´Ø¿ô¤ÎÌá¤êÃÍ:
1465 .\"O on failure and set
1467 .\"O to indicate the error.
1470 ¤¬¥¨¥é¡¼¤Î¼ïÎà¤ò¼¨¤¹¡£
1473 .\"O .BR tcsetattr ()
1474 .\"O returns success if \fIany\fP of the requested changes could be
1475 .\"O successfully carried out.
1476 .\"O Therefore, when making multiple changes
1477 .\"O it may be necessary to follow this call with a further call to
1478 .\"O .BR tcgetattr ()
1479 .\"O to check that all changes have been performed successfully.
1481 ¤Ï \fI¤Ê¤ó¤é¤«¤Î\fP Êѹ¹Í׵᤬À®¸ù¤·¤¿¾ì¹ç¤ËÀ®¸ù¤òÊÖ¤¹¤³¤È¤ËÃí°Õ¡£
1482 ½¾¤Ã¤Æ¡¢Ê£¿ô¤ÎÊѹ¹¤ò¹Ô¤Ã¤¿¾ì¹ç¤Ë¤Ï¡¢°ú¤Â³¤¤¤Æ
1484 ¤ò¸Æ¤Ó½Ð¤·¤ÆÁ´¤Æ¤ÎÊѹ¹¤¬¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë¤«¤ò³Îǧ¤¹¤ëɬÍפ¬¤¢¤ë¤«¤â¤·¤ì¤Ê¤¤¡£
1485 .\"O .SH CONFORMING TO
1498 .\"O are specified in POSIX.1-2001.
1499 ¤Ï POSIX.1-2001 ¤Çµ¬Äꤵ¤ì¤Æ¤¤¤ë¡£
1501 .\"O .BR cfmakeraw ()
1503 .\"O .BR cfsetspeed ()
1504 .\"O are nonstandard, but available on the BSDs.
1508 ¤ÏÈóɸ½à¤À¤¬¡¢BSD ¤Ç¤ÏÍøÍѲÄǽ¤Ç¤¢¤ë¡£
1511 .\"O UNIX V7 and several later systems have a list of baud rates
1512 .\"O where after the fourteen values B0, ..., B9600 one finds the
1513 .\"O two constants EXTA, EXTB ("External A" and "External B").
1514 .\"O Many systems extend the list with much higher baud rates.
1515 UNIX V7 ¤È¤½¤Î¸å¤Î¤¤¤¯¤Ä¤«¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¡¢¥Ü¡¼¥ì¡¼¥È¤Î 14 ¸Ä¤Î¥ê¥¹¥È¤Ç¤¢¤ë
1516 B0, ..., B9600 ¤Î¸å¤í¤Ë EXTA, EXTB ("External A" ¤È "External B") ¤Î 2 ¤Ä¤ò
1518 ¿¤¯¤Î¥·¥¹¥Æ¥à¤Ç¤Ï¤µ¤é¤Ë¹â®¤Ê¥Ü¡¼¥ì¡¼¥È¤Î¤¿¤á¤Ë¥ê¥¹¥È¤ò³ÈÄ¥¤·¤Æ¤¤¤ë¡£
1520 .\"O The effect of a nonzero \fIduration\fP with
1521 .\"O .BR tcsendbreak ()
1524 ¤Ç \fIduration\fP ¤Ë 0 °Ê³°¤ò»ØÄꤷ¤¿¾ì¹ç¤Î¸ú²Ì¤ÏÍÍ¡¹¤Ç¤¢¤ë¡£
1525 .\"O SunOS specifies a break of
1526 .\"O .I "duration\ *\ N"
1527 .\"O seconds, where \fIN\fP is at least 0.25, and not more than 0.5.
1530 ÉäΥ֥졼¥¯¤òµ¬Äꤷ¤Æ¤¤¤ë¡£¤³¤³¤Ç \fIN\fP ¤Ï 0.25 °Ê¾å 0.5 ̤Ëþ¤Ç¤¢¤ë¡£
1531 .\"O Linux, AIX, DU, Tru64 send a break of
1534 Linux, AIX, DU, Tru64 ¤Ï
1536 ¥ß¥êÉäΥ֥졼¥¯¤òÁ÷¿®¤¹¤ë¡£
1537 .\"O FreeBSD and NetBSD and HP-UX and MacOS ignore the value of
1539 FreeBSD, NetBSD, HP-UX, MacOS ¤Ï
1542 .\"O Under Solaris and UnixWare,
1543 .\"O .BR tcsendbreak ()
1547 .\"O .BR tcdrain ().
1548 Solaris ¤È UnixWare ¤Ç¤Ï¡¢Èó¥¼¥í¤Î
1555 .\"O .\" libc4 until 4.7.5, glibc for sysv: EINVAL for duration > 0.
1556 .\"O .\" libc4.7.6, libc5, glibc for unix: duration in ms.
1557 .\"O .\" glibc for bsd: duration in us
1558 .\"O .\" glibc for sunos4: ignore duration
1562 .BR console_ioctl (4),