Skip to content

Commit

Permalink
* doc/etc.rd, doc/etc.rd.ja: moved from ext/etc.
Browse files Browse the repository at this point in the history
* ext/etc.c (Init_etc): fixed rdoc.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Apr 23, 2010
1 parent 400afca commit 9e67f6e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 26 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Fri Apr 23 14:07:36 2010 Nobuyoshi Nakada <[email protected]>

* 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 <[email protected]>

* lib/rdoc: Update to RDoc 2.5.6.
Expand Down
29 changes: 16 additions & 13 deletions ext/etc/etc.txt → doc/etc.rd
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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
25 changes: 14 additions & 11 deletions ext/etc/etc.txt.ja → doc/etc.rd.ja
Original file line number Diff line number Diff line change
@@ -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��¤
Expand All @@ -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��¤�Τǰʲ���
Expand All @@ -58,15 +59,17 @@ Module Function:

�ܺ٤�getgrgid(3)�򻲾ȤΤ��ȡ�

getgrnam(name)
--- getgrnam(name)

name�Ȥ���̾���Υ��롼�ץ���ȥ���֤�������ͤ�getgrgid()��Ʊ
�ͤǤ��롥�ܺ٤�getgrnam(3)�򻲾ȡ�

group
--- group

���ƤΥ��롼�ץ���ȥ���˥����������뤿��Υ��ƥ졼����

passwd
--- passwd

���Ƥ�passwd����ȥ���˥����������뤿��Υ��ƥ졼����

=end
4 changes: 2 additions & 2 deletions ext/etc/etc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>.
*/
Expand Down

0 comments on commit 9e67f6e

Please sign in to comment.