Ruby  2.1.10p492(2016-04-01revision54464)
Macros | Functions | Variables
etc.c File Reference
#include "ruby.h"
#include "ruby/encoding.h"
#include <sys/types.h>

Go to the source code of this file.

Macros

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

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

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

Function Documentation

static VALUE etc_each_passwd ( VALUE  obj)
static

Definition at line 308 of file etc.c.

References obj, and RETURN_ENUMERATOR.

Referenced by Init_etc().

static VALUE etc_endgrent ( VALUE  obj)
static

Definition at line 571 of file etc.c.

References Qnil.

Referenced by Init_etc().

static VALUE etc_endpwent ( VALUE  obj)
static

Definition at line 333 of file etc.c.

References Qnil.

Referenced by Init_etc().

static VALUE etc_getgrent ( VALUE  obj)
static

Definition at line 590 of file etc.c.

References group, and Qnil.

Referenced by Init_etc().

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

Definition at line 405 of file etc.c.

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

Referenced by Init_etc().

static VALUE etc_getgrnam ( VALUE  obj,
VALUE  nam 
)
static

Definition at line 443 of file etc.c.

References group, PRIsVALUE, Qnil, rb_eArgError, rb_raise(), RSTRING_PTR, and SafeStringValue.

Referenced by Init_etc().

static VALUE etc_getlogin ( VALUE  obj)
static

Definition at line 59 of file etc.c.

References getenv, getlogin(), Qnil, rb_external_str_new_with_enc(), rb_locale_encoding(), rb_utf8_encoding(), and strlen().

Referenced by Init_etc().

static VALUE etc_getpwent ( VALUE  obj)
static

Definition at line 353 of file etc.c.

References Qnil.

Referenced by Init_etc().

static VALUE etc_getpwnam ( VALUE  obj,
VALUE  nam 
)
static

Definition at line 200 of file etc.c.

References PRIsVALUE, Qnil, rb_eArgError, rb_raise(), RSTRING_PTR, and SafeStringValue.

Referenced by Init_etc().

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

Definition at line 163 of file etc.c.

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

Referenced by Init_etc().

static VALUE etc_group ( VALUE  obj)
static

Definition at line 508 of file etc.c.

References group, Qnil, and rb_block_given_p().

Referenced by Init_etc().

static VALUE etc_passwd ( VALUE  obj)
static

Definition at line 268 of file etc.c.

References Qnil, and rb_block_given_p().

Referenced by Init_etc().

static VALUE etc_setgrent ( VALUE  obj)
static

Definition at line 559 of file etc.c.

References Qnil.

Referenced by Init_etc().

static VALUE etc_setpwent ( VALUE  obj)
static

Definition at line 321 of file etc.c.

References Qnil.

Referenced by Init_etc().

static VALUE etc_sysconfdir ( VALUE  obj)
static

Definition at line 618 of file etc.c.

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

Referenced by Init_etc().

static VALUE etc_systmpdir ( void  )
static
char* getenv ( )
char* getlogin ( )

Definition at line 792 of file win32.c.

References NTLoginName.

Referenced by etc_getlogin().

void Init_etc ( void  )

Variable Documentation

VALUE sPasswd
static

Definition at line 26 of file etc.c.

Referenced by Init_etc().