From 9e67f6ecec169787bb489ccb3f71d32a141f01da Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 23 Apr 2010 05:07:38 +0000 Subject: * doc/etc.rd, doc/etc.rd.ja: moved from ext/etc. * ext/etc.c (Init_etc): fixed rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/etc/etc.c | 4 +-- ext/etc/etc.txt | 72 ------------------------------------------------------ ext/etc/etc.txt.ja | 72 ------------------------------------------------------ 3 files changed, 2 insertions(+), 146 deletions(-) delete mode 100644 ext/etc/etc.txt delete mode 100644 ext/etc/etc.txt.ja (limited to 'ext') diff --git a/ext/etc/etc.c b/ext/etc/etc.c index a1f9669e98..e538aa32c6 100644 --- a/ext/etc/etc.c +++ b/ext/etc/etc.c @@ -549,8 +549,8 @@ etc_getgrent(VALUE obj) return Qnil; } -/* The etc module provides access to information from the /etc/passwd and - * /etc/group files on Linux and Unix systems. +/* + * The etc module provides access to information from the running OS. * * Documented by mathew . */ diff --git a/ext/etc/etc.txt b/ext/etc/etc.txt deleted file mode 100644 index 534790172c..0000000000 --- a/ext/etc/etc.txt +++ /dev/null @@ -1,72 +0,0 @@ -.\" etc.txt - -*- Indented-Text -*- created at: Fri Jul 14 00:47:15 JST 1995 - -** Etc(Module) - -The module to retrieve information under /etc directory. Available -only on UNIX platforms. All operations defined in this module are -module functions, so that you can include Etc module into your class. - -Module Function: - - getlogin - - returns login name of the user. It this fails, try getpwuid(). - - getpwnam(name) - - searches in /etc/passwd file (or equivalent database), and - returns password entry for the user. The return value is an - passwd structure, which has members described below. - - struct passwd - name # user name(string) - passwd # encrypted password(string) - uid # user ID(integer) - gid # group ID(integer) - gecos # gecos field(string) - dir # home directory(string) - shell # login shell(string) - # members below are optional - change # password change time(integer) - quota # quota value(integer) - age # password age(integer) - class # user access class(string) - comment # comment(string) - expire # account expiration time(integer) - end - - See getpwnam(3) for detail. - - getpwuid([uid]) - - returns passwd entry for the specified user id. If uid is - ommitted, use the value from getuid(). See getpwuid(3) for - detail. - - getgrgid(gid) - - searches in /etc/group file (or equivalent database), and - returns group entry for the group id. The return value is an - group structure, which has members described below. - - struct group - name # group name(string) - passwd # group password(string) - gid # group ID(integer) - mem # array of the group member names - end - - See getgrgid(3) for detail. - - getgrnam(name) - - returns the group entry for the specified name. The return - value is the group structure. See getgrnam(3) for detail. - - group - - iterates over all group entries. - - passwd - - iterates over all passwd entries. diff --git a/ext/etc/etc.txt.ja b/ext/etc/etc.txt.ja deleted file mode 100644 index 2dddcfb036..0000000000 --- a/ext/etc/etc.txt.ja +++ /dev/null @@ -1,72 +0,0 @@ -.\" etc.txt.ja - -*- Indented-Text -*- created at: Fri Jul 14 00:47:15 JST 1995 - -** Etc(モジュール) - -/etcディレクトリ以下の情報を得るためのモジュール.クラスにインクルード -して使うこともできる. - -Module Function: - - getlogin - - 自分のlogin名を返す.これが失敗した場合はgetpwuid()を用いると - 良い. - - getpwnam(name) - - /etc/passwdファイル(あるいはDBMファイルやNISデータベース)を検 - 索し,nameの名前を持つpasswdエントリを返す.戻り値はpasswd構造 - 体で以下のメンバを持つ. - - struct passwd - name # ユーザ名(文字列) - passwd # パスワード(文字列) - uid # ユーザID(整数) - gid # グループID(整数) - gecos # gecosフィールド(文字列) - dir # ホームディレクトリ(文字列) - shell # ログインシェル(文字列) - # 以降のメンバはシステムによっては提供されない. - change # パスワード変更時間(整数) - quota # クォータ(整数) - age # エージ(整数) - class # ユーザアクセスクラス(文字列) - comment # コメント(文字列) - expire # アカウント有効期限(整数) - end - - 詳細はgetpwnam(3)を参照のこと. - - getpwuid([uid]) - - uidをユーザIDとするpasswdエントリを返す.戻り値はgetpwnam()と - 同様である.引数を省略した場合にはgetuid()の値を用いる.詳細は - getpwuid(3)を参照のこと. - - getgrgid(gid) - - /etc/groupファイル(あるいは…getpwnam参照)を検索し,gidをグルー - プIDとするグループエントリを返す.戻り値はgroup構造体で以下の - メンバを持つ. - - struct group - name # グループ名(文字列) - passwd # グループのパスワード(文字列) - gid # グループID(整数) - mem # グループメンバ名の配列 - end - - 詳細はgetgrgid(3)を参照のこと. - - getgrnam(name) - - nameという名前のグループエントリを返す.戻り値はgetgrgid()と同 - 様である.詳細はgetgrnam(3)を参照. - - group - - 全てのグループエントリを順にアクセスするためのイテレータ. - - passwd - - 全てのpasswdエントリを順にアクセスするためのイテレータ. -- cgit v1.2.3