Ruby  2.4.2p198(2017-09-14revision59899)
Macros | Functions | Variables
etc.c File Reference
#include "ruby.h"
#include "ruby/encoding.h"
#include "ruby/io.h"
#include <sys/types.h>
#include <errno.h>
#include "constdefs.h"
Include dependency graph for etc.c:

Go to the source code of this file.

Macros

#define numberof(array)   (sizeof(array) / sizeof(*(array)))
 
#define etc_uname   rb_f_notimplement
 
#define etc_sysconf   rb_f_notimplement
 
#define etc_confstr   rb_f_notimplement
 
#define io_pathconf   rb_f_notimplement
 
#define etc_nprocessors   rb_f_notimplement
 

Functions

char * getenv ()
 
char * getlogin ()
 
static VALUE etc_getlogin (VALUE obj)
 
static VALUE etc_getpwuid (int argc, VALUE *argv, VALUE obj)
 
static VALUE etc_getpwnam (VALUE obj, VALUE nam)
 
static VALUE etc_passwd (VALUE obj)
 
static VALUE etc_each_passwd (VALUE obj)
 
static VALUE etc_setpwent (VALUE obj)
 
static VALUE etc_endpwent (VALUE obj)
 
static VALUE etc_getpwent (VALUE obj)
 
static VALUE etc_getgrgid (int argc, VALUE *argv, VALUE obj)
 
static VALUE etc_getgrnam (VALUE obj, VALUE nam)
 
static VALUE etc_group (VALUE obj)
 
static VALUE etc_setgrent (VALUE obj)
 
static VALUE etc_endgrent (VALUE obj)
 
static VALUE etc_getgrent (VALUE obj)
 
static VALUE etc_sysconfdir (VALUE obj)
 
static VALUE etc_systmpdir (void)
 
void Init_etc (void)
 

Variables

static VALUE sPasswd
 

Macro Definition Documentation

◆ etc_confstr

#define etc_confstr   rb_f_notimplement

Definition at line 881 of file etc.c.

Referenced by Init_etc().

◆ etc_nprocessors

#define etc_nprocessors   rb_f_notimplement

Definition at line 1033 of file etc.c.

Referenced by Init_etc().

◆ etc_sysconf

#define etc_sysconf   rb_f_notimplement

Definition at line 834 of file etc.c.

Referenced by Init_etc().

◆ etc_uname

#define etc_uname   rb_f_notimplement

Definition at line 800 of file etc.c.

Referenced by etc_systmpdir(), and Init_etc().

◆ io_pathconf

#define io_pathconf   rb_f_notimplement

Definition at line 920 of file etc.c.

Referenced by Init_etc().

◆ numberof

#define numberof (   array)    (sizeof(array) / sizeof(*(array)))

Function Documentation

◆ etc_each_passwd()

static VALUE etc_each_passwd ( VALUE  obj)
static

Definition at line 322 of file etc.c.

References RETURN_ENUMERATOR.

Referenced by Init_etc().

◆ etc_endgrent()

static VALUE etc_endgrent ( VALUE  obj)
static

Definition at line 585 of file etc.c.

References Qnil.

Referenced by Init_etc().

◆ etc_endpwent()

static VALUE etc_endpwent ( VALUE  obj)
static

Definition at line 347 of file etc.c.

References endpwent, and Qnil.

Referenced by Init_etc().

◆ etc_getgrent()

static VALUE etc_getgrent ( VALUE  obj)
static

Definition at line 604 of file etc.c.

References Qnil.

Referenced by Init_etc().

◆ etc_getgrgid()

static VALUE etc_getgrgid ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 419 of file etc.c.

References getgid(), id, NUM2GIDT, Qnil, rb_eArgError, rb_raise(), and rb_scan_args().

Referenced by Init_etc().

◆ etc_getgrnam()

static VALUE etc_getgrnam ( VALUE  obj,
VALUE  nam 
)
static

◆ etc_getlogin()

static VALUE etc_getlogin ( VALUE  obj)
static

◆ etc_getpwent()

static VALUE etc_getpwent ( VALUE  obj)
static

Definition at line 367 of file etc.c.

References GIDT2NUM, Qnil, rb_ary_new(), rb_ary_push(), and rb_struct_new().

Referenced by Init_etc().

◆ etc_getpwnam()

static VALUE etc_getpwnam ( VALUE  obj,
VALUE  nam 
)
static

◆ etc_getpwuid()

static VALUE etc_getpwuid ( int  argc,
VALUE argv,
VALUE  obj 
)
static

Definition at line 177 of file etc.c.

References getuid(), id, NUM2UIDT, Qnil, rb_eArgError, rb_raise(), and rb_scan_args().

Referenced by Init_etc().

◆ etc_group()

static VALUE etc_group ( VALUE  obj)
static

Definition at line 522 of file etc.c.

References Qnil, rb_block_given_p(), and RETURN_ENUMERATOR.

Referenced by Init_etc().

◆ etc_passwd()

static VALUE etc_passwd ( VALUE  obj)
static

Definition at line 282 of file etc.c.

References Qnil, and rb_block_given_p().

Referenced by Init_etc().

◆ etc_setgrent()

static VALUE etc_setgrent ( VALUE  obj)
static

Definition at line 573 of file etc.c.

References Qnil.

Referenced by Init_etc().

◆ etc_setpwent()

static VALUE etc_setpwent ( VALUE  obj)
static

Definition at line 335 of file etc.c.

References Qnil.

Referenced by Init_etc().

◆ etc_sysconfdir()

static VALUE etc_sysconfdir ( VALUE  obj)
static

Definition at line 632 of file etc.c.

References CSIDL_COMMON_APPDATA, rb_filesystem_str_new_cstr(), and rb_w32_special_folder().

Referenced by Init_etc().

◆ etc_systmpdir()

static VALUE etc_systmpdir ( void  )
static

◆ getenv()

char* getenv ( )

Referenced by etc_getlogin().

◆ getlogin()

char* getlogin ( )

Definition at line 867 of file win32.c.

References NTLoginName.

Referenced by establishShell(), etc_getlogin(), rb_default_home_dir(), and rb_home_dir_of().

◆ Init_etc()

void Init_etc ( void  )

Variable Documentation

◆ sPasswd

VALUE sPasswd
static

Definition at line 37 of file etc.c.

Referenced by etc_getlogin(), and Init_etc().