summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-23 05:07:38 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-04-23 05:07:38 +0000
commit9e67f6ecec169787bb489ccb3f71d32a141f01da (patch)
treea4953094ab4bd3abd815a6946e076177e272dac5
parent400afca88a0adb5a380925dea61220e08a04022f (diff)
* 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
-rw-r--r--ChangeLog6
-rw-r--r--doc/etc.rd (renamed from ext/etc/etc.txt)29
-rw-r--r--doc/etc.rd.ja (renamed from ext/etc/etc.txt.ja)25
-rw-r--r--ext/etc/etc.c4
4 files changed, 38 insertions, 26 deletions
diff --git a/ChangeLog b/ChangeLog
index b79c368a27..3fcd4b9ec8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Fri Apr 23 14:07:36 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * doc/etc.rd, doc/etc.rd.ja: moved from ext/etc.
+
+ * ext/etc.c (Init_etc): fixed rdoc.
+
Fri Apr 23 11:31:25 2010 Eric Hodel <drbrain@segment7.net>
* lib/rdoc: Update to RDoc 2.5.6.
diff --git a/ext/etc/etc.txt b/doc/etc.rd
index 534790172c..b69f9884ad 100644
--- a/ext/etc/etc.txt
+++ b/doc/etc.rd
@@ -1,18 +1,19 @@
-.\" etc.txt - -*- Indented-Text -*- created at: Fri Jul 14 00:47:15 JST 1995
+# etc.rd - -*- mode: rd; coding: us-ascii -*- created at: Fri Jul 14 00:47:15 JST 1995
+=begin
-** Etc(Module)
+= 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.
+The module to retrieve information from running OS. All operations
+defined in this module are module functions, so that you can include
+Etc module into your class.
-Module Function:
+== Module Function
- getlogin
+--- getlogin
returns login name of the user. It this fails, try getpwuid().
- getpwnam(name)
+--- getpwnam(name)
searches in /etc/passwd file (or equivalent database), and
returns password entry for the user. The return value is an
@@ -37,13 +38,13 @@ Module Function:
See getpwnam(3) for detail.
- getpwuid([uid])
+--- 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)
+--- getgrgid(gid)
searches in /etc/group file (or equivalent database), and
returns group entry for the group id. The return value is an
@@ -58,15 +59,17 @@ Module Function:
See getgrgid(3) for detail.
- getgrnam(name)
+--- getgrnam(name)
returns the group entry for the specified name. The return
value is the group structure. See getgrnam(3) for detail.
- group
+--- group
iterates over all group entries.
- passwd
+--- passwd
iterates over all passwd entries.
+
+=end
diff --git a/ext/etc/etc.txt.ja b/doc/etc.rd.ja
index 2dddcfb036..39a1efbff1 100644
--- a/ext/etc/etc.txt.ja
+++ b/doc/etc.rd.ja
@@ -1,18 +1,19 @@
-.\" etc.txt.ja - -*- Indented-Text -*- created at: Fri Jul 14 00:47:15 JST 1995
+# etc.rd.ja - -*- mode: rd; coding: euc-jp; -*- created at: Fri Jul 14 00:47:15 JST 1995
+=begin
-** Etc(モジュール)
+= Etc(モジュール)
-/etcディレクトリ以下の情報を得るためのモジュール.クラスにインクルード
+実行しているOSからの情報を得るためのモジュール.クラスにインクルード
して使うこともできる.
-Module Function:
+== Module Function
- getlogin
+--- getlogin
自分のlogin名を返す.これが失敗した場合はgetpwuid()を用いると
良い.
- getpwnam(name)
+--- getpwnam(name)
/etc/passwdファイル(あるいはDBMファイルやNISデータベース)を検
索し,nameの名前を持つpasswdエントリを返す.戻り値はpasswd構造
@@ -37,13 +38,13 @@ Module Function:
詳細はgetpwnam(3)を参照のこと.
- getpwuid([uid])
+--- getpwuid([uid])
uidをユーザIDとするpasswdエントリを返す.戻り値はgetpwnam()と
同様である.引数を省略した場合にはgetuid()の値を用いる.詳細は
getpwuid(3)を参照のこと.
- getgrgid(gid)
+--- getgrgid(gid)
/etc/groupファイル(あるいは…getpwnam参照)を検索し,gidをグルー
プIDとするグループエントリを返す.戻り値はgroup構造体で以下の
@@ -58,15 +59,17 @@ Module Function:
詳細はgetgrgid(3)を参照のこと.
- getgrnam(name)
+--- getgrnam(name)
nameという名前のグループエントリを返す.戻り値はgetgrgid()と同
様である.詳細はgetgrnam(3)を参照.
- group
+--- group
全てのグループエントリを順にアクセスするためのイテレータ.
- passwd
+--- passwd
全てのpasswdエントリを順にアクセスするためのイテレータ.
+
+=end
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 <meta@pobox.com>.
*/