bfs.c
/* [<][>][^][v][top][bottom][index][help] */
DEFINITIONS
This source file includes following functions.
- my_check_dirp_closed
- my_check_block_given
- my_sys_fail
- 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();
}