10 #define RUBY_NKF_REVISION "$Revision: 36966 $"
11 #define RUBY_NKF_VERSION NKF_VERSION " (" NKF_RELEASE_DATE ")"
21 #define getc(f) (input_ctr>=i_len?-1:input[input_ctr++])
22 #define ungetc(c,f) input_ctr--
28 #define putchar(c) rb_nkf_putchar(c)
80 unsigned char option[256];
82 int is_escaped =
FALSE;
83 int is_single_quoted =
FALSE;
84 int is_double_quoted =
FALSE;
85 for(i = 0; arg[
i]; i++){
88 }
else if(is_single_quoted){
90 is_single_quoted =
FALSE;
97 }
else if(arg[i] ==
'\\'){
99 }
else if(is_double_quoted){
101 is_double_quoted =
FALSE;
103 option[j++] = arg[
i];
105 }
else if(arg[i] ==
'\''){
106 is_single_quoted =
TRUE;
107 }
else if(arg[i] ==
'"'){
108 is_double_quoted =
TRUE;
109 }
else if(arg[i] ==
' '){
114 option[j++] = arg[
i];
static VALUE rb_nkf_convert(VALUE obj, VALUE opt, VALUE src)
rb_encoding * rb_nkf_enc_get(const char *name)
static int rb_nkf_putchar(unsigned int c)
#define nkf_enc_name(enc)
VALUE rb_enc_from_encoding(rb_encoding *encoding)
void rb_raise(VALUE exc, const char *fmt,...)
VALUE rb_enc_associate(VALUE obj, rb_encoding *enc)
static VALUE rb_nkf_guess(VALUE obj, VALUE src)
static int kanji_convert(FILE *f)
rb_encoding * rb_utf8_encoding(void)
static unsigned char * output
VALUE rb_singleton_class(VALUE obj)
Returns the singleton class of obj.
void rb_define_const(VALUE, const char *, VALUE)
static const char * get_guessed_code(void)
void rb_define_alias(VALUE klass, const char *name1, const char *name2)
Defines an alias of a method.
VALUE rb_str_resize(VALUE, long)
void rb_define_module_function(VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a module function for module.
#define nkf_enc_to_base_encoding(enc)
rb_encoding * rb_usascii_encoding(void)
#define nkf_enc_to_index(enc)
int rb_define_dummy_encoding(const char *name)
static int options(unsigned char *cp)
static nkf_encoding * nkf_enc_find(const char *name)
#define RSTRING_LENINT(str)
VALUE rb_str_new(const char *, long)
int rb_enc_find_index(const char *name)
VALUE rb_define_module(const char *name)
int nkf_split_options(const char *arg)
static nkf_encoding * output_encoding
static nkf_encoding * nkf_enc_from_index(int idx)
rb_encoding * rb_enc_from_index(int index)
void rb_str_set_len(VALUE, long)