OSDN Git Service

8b444fce277557528821c76ecb32dc57a66bdda2
[linuxjm/LDP_man-pages.git] / draft / man3 / getttyent.3
1 .\"  Copyright 2002 walter harms (walter.harms@informatik.uni-oldenburg.de)
2 .\"  Distributed under GPL
3 .\"
4 .\" Japanese Version Copyright (c) 2004 Yuichi SATO
5 .\"         all rights reserved.
6 .\" Translated Fri Aug 20 03:27:22 JST 2004
7 .\"         by Yuichi SATO <ysato444@yahoo.co.jp>
8 .\"
9 .TH GETTTYENT 3 2002-07-18  "GNU" "Linux Programmer's Manual"
10 .\"O .SH NAME
11 .SH 名前
12 .\"O getttyent, getttynam, setttyent, endttyent \- get ttys file entry
13 getttyent, getttynam, setttyent, endttyent \- ttys ファイルのエントリを取得する
14 .\"O .SH SYNOPSIS
15 .SH 書式
16 .B "#include <ttyent.h>"
17 .sp
18 .B "struct ttyent *getttyent(void);"
19 .sp
20 .BI "struct ttyent *getttynam(const char *" name );
21 .sp
22 .B "int setttyent(void);"
23 .sp
24 .B "int endttyent(void);"
25 .\"O .SH DESCRIPTION
26 .SH 説明
27 .\"O These functions provide an interface to the file
28 .\"O .B _PATH_TTYS
29 .\"O (e.g.,
30 .\"O .IR /etc/ttys ).
31 これらの関数はファイル
32 .B _PATH_TTYS
33 (例えば
34 .IR /etc/ttys )
35 へのインタフェースを提供する。
36
37 .\"O The function
38 .\"O .BR setttyent ()
39 .\"O opens the file or rewinds it if already open.
40 関数
41 .BR setttyent ()
42 はファイルをオープンする。
43 また既にオープンされている場合は、巻き戻す。
44
45 .\"O The function
46 .\"O .BR endttyent ()
47 .\"O closes the file.
48 関数
49 .BR endttyent ()
50 はファイルをクローズする。
51
52 .\"O The function
53 .\"O .BR getttynam ()
54 .\"O searches for a given ttyname in the file.
55 .\"O It returns a pointer to a
56 .\"O .I ttyent
57 .\"O structure (description below).
58 関数
59 .BR getttynam ()
60 は指定された端末名についてファイルを検索する。
61 この関数は (以下で説明されている)
62 .I ttyent
63 構造体へのポインタを返す。
64
65 .\"O The function
66 .\"O .BR getttyent ()
67 .\"O opens the file
68 .\"O .B _PATH_TTYS
69 .\"O (if necessary) and returns the first entry.
70 .\"O If the file is already open, the next entry.
71 関数
72 .BR getttyent ()
73 は (もし必要であれば) ファイル
74 .B _PATH_TTYS
75 をオープンし、最初のエントリを返す。
76 ファイルが既にオープンされている場合は、次のエントリを返す。
77 .\"O The
78 .\"O .I ttyent
79 .\"O structure has the form:
80 .I ttyent
81 構造体は以下の通りである。
82 .in +4n
83 .nf
84
85 struct ttyent {
86 .\"O     char *ty_name;     /* terminal device name */
87 .\"O     char *ty_getty;    /* command to execute, usually getty */
88 .\"O     char *ty_type;     /* terminal type for termcap */
89 .\"O     int   ty_status;   /* status flags */
90 .\"O     char *ty_window;   /* command to start up window manager */
91 .\"O     char *ty_comment;  /* comment field */
92     char *ty_name;     /* 端末デバイス名 */
93     char *ty_getty;    /* 実行するコマンド。通常は getty */
94     char *ty_type;     /* termcap のための端末タイプ */
95     int   ty_status;   /* 状態フラグ */
96     char *ty_window;   /* ウィンドウマネージャを起動するコマンド */
97     char *ty_comment;  /* コメントフィールド */
98 };
99 .fi
100 .in
101
102 .\"O .I ty_status
103 .\"O can be:
104 .I ty_status
105 は以下のいずれか値をとることができる。
106 .br
107 .nf
108
109 .\"O #define TTY_ON     0x01  /* enable logins (start ty_getty program) */
110 .\"O #define TTY_SECURE 0x02  /* allow UID 0 to login */
111 #define TTY_ON     0x01  /* ログインを有効にする (ty_getty プログラムを開始する) */
112 #define TTY_SECURE 0x02  /* ユーザ ID 0 でのログインを許可する */
113 .fi
114 .\"O .SH "CONFORMING TO"
115 .SH 準拠
116 .\"O Not in POSIX.1-2001.
117 .\"O Present on the BSDs, and perhaps other systems.
118 POSIX.1-2001 にはない。
119 BSD 系に存在し、おそらく他のシステムにもあるだろう。
120 .\"O .SH NOTES
121 .SH 注意
122 .\"O Under Linux the file
123 .\"O .IR /etc/ttys ,
124 .\"O and the functions described above, are not used.
125 Linux では、ファイル
126 .I /etc/ttys
127 と上で説明した関数は使われていない。
128 .\"O .SH "SEE ALSO"
129 .SH 関連項目
130 .BR ttyname (3),
131 .BR ttyslot (3)