bfs.h

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

DEFINITIONS

This source file includes following functions.

/*
 *  bfs.h
 */

#ifndef _BFS_H
#define _BFS_H


#include <dirent.h>
#include <errno.h>
#include <TypeConstants.h>
#include <ruby.h>
#include <rubyio.h>

#include "bfs_num.h"


extern VALUE mBfs;
extern ID i_open;

extern void  my_sys_fail(int err, const char *msg);
extern void  my_check_block_given();
extern void  my_check_dirp_closed(DIR *dirp, const char *msg);
extern dev_t my_get_dev_for_obj(VALUE obj);
extern VALUE my_get_path_for_dirobj(VALUE dir);


#define ROBJ_AS_CSTR(x) (RSTRING(rb_obj_as_string(x))->ptr)

#define STRING_P(x)  (TYPE(x) == T_STRING)
#define FILE_P(x)    (TYPE(x) == T_FILE)
#define BIGNUM_P(x)  (TYPE(x) == T_BIGNUM)
#define DIR_P(x)     rb_obj_is_kind_of((x), rb_cDir)
#define NUMERIC_P(x) rb_obj_is_kind_of((x), rb_cNumeric)
#define TIME_P(x)    rb_obj_is_kind_of((x), rb_cTime)


#endif /* _BFS_H */

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