Ruby
2.0.0p645(2015-04-13revision50299)
|
#include "ruby/ruby.h"
#include "ruby/encoding.h"
#include "nkf-utf8/config.h"
#include "nkf-utf8/utf8tbl.c"
#include "nkf-utf8/nkf.c"
Go to the source code of this file.
Macros | |
#define | RUBY_NKF_REVISION "$Revision: 36966 $" |
#define | RUBY_NKF_VERSION NKF_VERSION " (" NKF_RELEASE_DATE ")" |
#define | getc(f) (input_ctr>=i_len?-1:input[input_ctr++]) |
#define | ungetc(c, f) input_ctr-- |
#define | INCSIZE 32 |
#define | putchar(c) rb_nkf_putchar(c) |
#define | PERL_XS 1 |
Functions | |
static int | rb_nkf_putchar (unsigned int c) |
rb_encoding * | rb_nkf_enc_get (const char *name) |
int | nkf_split_options (const char *arg) |
static VALUE | rb_nkf_convert (VALUE obj, VALUE opt, VALUE src) |
static VALUE | rb_nkf_guess (VALUE obj, VALUE src) |
void | Init_nkf () |
Variables | |
static unsigned char * | output |
static unsigned char * | input |
static int | input_ctr |
static int | i_len |
static int | output_ctr |
static int | o_len |
static int | incsize |
static VALUE | result |
Definition at line 21 of file nkf.c.
Referenced by std_getc().
#define INCSIZE 32 |
Definition at line 24 of file nkf.c.
Referenced by rb_nkf_convert().
#define putchar | ( | c | ) | rb_nkf_putchar(c) |
Definition at line 28 of file nkf.c.
Referenced by std_putc().
#define RUBY_NKF_VERSION NKF_VERSION " (" NKF_RELEASE_DATE ")" |
Definition at line 11 of file nkf.c.
Referenced by Init_nkf().
void Init_nkf | ( | ) |
Definition at line 481 of file nkf.c.
References NKF_RELEASE_DATE, NKF_VERSION, Qnil, rb_define_alias(), rb_define_const(), rb_define_module(), rb_define_module_function(), rb_enc_from_encoding(), rb_nkf_convert(), rb_nkf_enc_get(), rb_nkf_guess(), rb_singleton_class(), rb_str_new2, rb_utf8_encoding(), and RUBY_NKF_VERSION.
Definition at line 136 of file nkf.c.
References FALSE, i_len, INCSIZE, incsize, input, input_ctr, kanji_convert(), mimeout_f, nkf_enc_from_index(), nkf_enc_name, nkf_enc_to_index, nkf_split_options(), NULL, o_len, OBJ_INFECT, output, output_bom_f, output_ctr, output_encoding, Qnil, rb_eArgError, rb_enc_associate(), rb_nkf_enc_get(), rb_raise(), rb_str_new(), rb_str_set_len(), rb_usascii_encoding(), reinit(), result, RSTRING_LENINT, RSTRING_PTR, StringValue, tmp, UTF_16BE, UTF_16BE_BOM, UTF_16LE, UTF_16LE_BOM, UTF_32BE, UTF_32BE_BOM, UTF_32LE, UTF_32LE_BOM, UTF_8, and UTF_8_BOM.
Referenced by Init_nkf().
rb_encoding* rb_nkf_enc_get | ( | const char * | name | ) |
Definition at line 64 of file nkf.c.
References idx, nkf_enc_find(), nkf_enc_name, nkf_enc_to_base_encoding, rb_define_dummy_encoding(), rb_enc_find_index(), and rb_enc_from_index().
Referenced by Init_nkf(), rb_nkf_convert(), and rb_nkf_guess().
Definition at line 193 of file nkf.c.
References FALSE, get_guessed_code(), guess_f, i_len, input, input_ctr, kanji_convert(), NULL, rb_enc_from_encoding(), rb_nkf_enc_get(), reinit(), RSTRING_LENINT, RSTRING_PTR, StringValue, and TRUE.
Referenced by Init_nkf().
Definition at line 43 of file nkf.c.
References c, incsize, o_len, output, output_ctr, rb_str_resize(), result, and RSTRING_PTR.
|
static |
Definition at line 35 of file nkf.c.
Referenced by rb_nkf_convert(), and rb_nkf_guess().
|
static |
Definition at line 38 of file nkf.c.
Referenced by rb_nkf_convert(), and rb_nkf_putchar().
|
static |
Definition at line 34 of file nkf.c.
Referenced by rb_nkf_convert(), and rb_nkf_guess().
|
static |
Definition at line 37 of file nkf.c.
Referenced by rb_nkf_convert(), and rb_nkf_putchar().
|
static |
Definition at line 32 of file nkf.c.
Referenced by econv_primitive_convert(), rb_nkf_convert(), rb_nkf_putchar(), readline_s_set_output(), and yaml_emitter_set_output_string().
|
static |
Definition at line 36 of file nkf.c.
Referenced by rb_nkf_convert(), and rb_nkf_putchar().
|
static |
Definition at line 40 of file nkf.c.
Referenced by rb_nkf_convert(), and rb_nkf_putchar().