bfs.c

/* [<][>]
[^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following functions.
  1. my_check_dirp_closed
  2. my_check_block_given
  3. my_sys_fail
  4. Init_bfs

/*
 *  bfs.c
 */

#include "bfs.h"


VALUE mBfs;
ID i_open;


extern void Init_E_mail();
extern void Init_TypeConstants();
extern void Init_fs_attr();
extern void Init_fs_index();
extern void Init_fs_info();
extern void Init_fs_query();


void
my_check_dirp_closed(DIR *dirp, const char *msg)
/* [<][>][^][v][top][bottom][index][help] */
{
  if (!dirp) {
    rb_raise(rb_eIOError, msg);
  }
}


void
my_check_block_given()
/* [<][>][^][v][top][bottom][index][help] */
{
  if (!rb_block_given_p()) {
    rb_raise(rb_eArgError, "no block");
  }
}


void
my_sys_fail(int err, const char *msg)
/* [<][>][^][v][top][bottom][index][help] */
{
  errno = err;
  rb_sys_fail(msg);
}


void
Init_bfs()
/* [<][>][^][v][top][bottom][index][help] */
{
  i_open = rb_intern("open");
  mBfs = rb_define_module("Bfs");

  Init_E_mail();
  Init_TypeConstants();
  Init_fs_attr();
  Init_fs_index();
  Init_fs_info();
  Init_fs_query();
}

/* [<][>][^][v][top][bottom][index][help] */