Ruby  2.4.2p198(2017-09-14revision59899)
Macros | Functions | Variables
nkf.c File Reference
#include "ruby/ruby.h"
#include "ruby/encoding.h"
#include "nkf-utf8/config.h"
#include "nkf-utf8/utf8tbl.c"
#include "nkf-utf8/nkf.c"
Include dependency graph for nkf.c:

Go to the source code of this file.

Macros

#define RUBY_NKF_REVISION   "$Revision: 47744 $"
 
#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_encodingrb_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 (void)
 

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
 

Macro Definition Documentation

◆ getc

#define getc (   f)    (input_ctr>=i_len?-1:input[input_ctr++])

Definition at line 21 of file nkf.c.

Referenced by std_getc().

◆ INCSIZE

#define INCSIZE   32

Definition at line 24 of file nkf.c.

Referenced by rb_nkf_convert().

◆ PERL_XS

#define PERL_XS   1

Definition at line 59 of file nkf.c.

◆ putchar

#define putchar (   c)    rb_nkf_putchar(c)

Definition at line 28 of file nkf.c.

Referenced by std_putc().

◆ RUBY_NKF_REVISION

#define RUBY_NKF_REVISION   "$Revision: 47744 $"

Definition at line 10 of file nkf.c.

◆ RUBY_NKF_VERSION

#define RUBY_NKF_VERSION   NKF_VERSION " (" NKF_RELEASE_DATE ")"

Definition at line 11 of file nkf.c.

Referenced by Init_nkf().

◆ ungetc

#define ungetc (   c,
  f 
)    input_ctr--

Definition at line 22 of file nkf.c.

Function Documentation

◆ Init_nkf()

void Init_nkf ( void  )

◆ nkf_split_options()

int nkf_split_options ( const char *  arg)

Definition at line 77 of file nkf.c.

References count, FALSE, options(), and TRUE.

Referenced by rb_nkf_convert().

◆ rb_nkf_convert()

static VALUE rb_nkf_convert ( VALUE  obj,
VALUE  opt,
VALUE  src 
)
static

◆ rb_nkf_enc_get()

rb_encoding* rb_nkf_enc_get ( const char *  name)

◆ rb_nkf_guess()

static VALUE rb_nkf_guess ( VALUE  obj,
VALUE  src 
)
static

◆ rb_nkf_putchar()

static int rb_nkf_putchar ( unsigned int  c)
static

Definition at line 43 of file nkf.c.

References incsize, o_len, output, output_ctr, rb_str_resize(), result, and RSTRING_PTR.

Variable Documentation

◆ i_len

int i_len
static

Definition at line 35 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_guess().

◆ incsize

int incsize
static

Definition at line 38 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_putchar().

◆ input

unsigned char* input
static

Definition at line 33 of file nkf.c.

◆ input_ctr

int input_ctr
static

Definition at line 34 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_guess().

◆ o_len

int o_len
static

Definition at line 37 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_putchar().

◆ output

unsigned char* output
static

◆ output_ctr

int output_ctr
static

Definition at line 36 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_putchar().

◆ result

VALUE result
static

Definition at line 40 of file nkf.c.

Referenced by append_literal_keys(), ary_join_1(), ary_make_partial(), ary_reject(), B_fn(), big2str_base_poweroftwo(), C_fn(), call_method_data_safe(), call_method_entry(), callee(), cls_pointer_fn(), cls_pointer_fn1(), cls_pointer_fn2(), cls_struct_108byte_fn(), cls_struct_116byte_fn(), cls_struct_12byte_fn(), cls_struct_16byte_fn(), cls_struct_18byte_fn(), cls_struct_19byte_fn(), cls_struct_1_1byte_fn(), cls_struct_20byte_fn(), cls_struct_24byte_fn(), cls_struct_2byte_fn(), cls_struct_3_1byte_fn(), cls_struct_3byte_fn(), cls_struct_3byte_fn1(), cls_struct_4_1byte_fn(), cls_struct_4byte_fn(), cls_struct_5byte_fn(), cls_struct_64byte_fn(), cls_struct_6byte_fn(), cls_struct_72byte_fn(), cls_struct_7byte_fn(), cls_struct_8byte_fn(), cls_struct_9byte_fn(), cls_struct_align_fn(), cls_struct_combined_fn(), code_status(), collect_caller_bindings(), collect_trace(), copy_home_path(), cParser_parse(), cState_generate(), cState_to_h(), date_strftime_with_tmx(), DEFINE_ENUMFUNCS(), dlmalloc_trim(), dlmallopt(), do_select(), do_waitpid_nonblocking(), econv_convpath(), enum_drop(), enum_drop_while(), enum_max(), enum_min(), enum_one(), enum_take(), enum_zip(), enumerable_lazy(), env_rassoc(), env_select(), env_shift(), env_values_at(), etc_systmpdir(), eval_string_with_cref(), EVENTSINK_Invoke(), exec_recursive(), fbuffer_append_char(), ffi_call(), ffi_closure_helper(), ffi_closure_unix_inner(), ffi_java_raw_size(), ffi_raw_size(), filename_completion_proc_call(), finish_overlapped_socket(), flatten(), fole_each(), fstrndup(), get_id_entry(), get_param(), gmtime_with_leapsecond(), gmtimew(), h_conv(), hfa_type_store(), init_leap_second_info(), initialize(), io_flush_buffer_sync2(), json_string_unescape(), kanji_convert(), lazy_drop_proc(), lazy_drop_while_proc(), lazy_flat_map_proc(), lazy_grep_iter_proc(), lazy_grep_proc(), lazy_grep_v_func(), lazy_grep_v_iter(), lazy_init_iterator(), lazy_init_yielder(), lazy_map_proc(), lazy_reject_proc(), lazy_select_proc(), lazy_take_proc(), lazy_take_while_proc(), localtime_with_gmtoff_zone(), localtimew(), main(), make_unique_str(), match_ary_aref(), match_ary_subseq(), match_values_at(), method_missing(), mString_included_s(), mString_to_json_raw_object(), next_i(), num_equal(), ole_invoke(), ole_invoke2(), onig_st_insert_strend(), ossl_bn_s_generate_prime(), ossl_ocspbres_verify(), ossl_ocspcid_cmp(), ossl_ocspcid_cmp_issuer(), ossl_ocspreq_verify(), ossl_pkey_sign(), ossl_pkey_verify(), ossl_x509name_cmp(), ossl_x509store_verify(), p_gamma(), parse_atmark(), parse_ident(), parser_number_literal_suffix(), proc_waitall(), pruby_async_return_int(), pruby_async_return_str(), pruby_eval(), q_gamma(), rb_ary_drop(), rb_ary_flatten(), rb_ary_flatten_bang(), rb_ary_join(), rb_ary_max(), rb_ary_min(), rb_ary_pop_m(), rb_ary_product(), rb_ary_resurrect(), rb_ary_sample(), rb_ary_select(), rb_ary_shift_m(), rb_ary_transpose(), rb_ary_zip(), rb_autoload_load(), rb_class_ivar_set(), rb_cstr_parse_inum(), rb_data_object_make(), rb_data_typed_object_make(), rb_debug_inspector_open(), rb_default_home_dir(), rb_dir_s_empty_p(), rb_during_gc(), rb_enc_sprintf(), rb_enc_vsprintf(), rb_ensure(), rb_equal(), rb_f_backquote(), rb_file_expand_path_internal(), rb_file_join(), rb_get_values_at(), rb_gmtime_r(), rb_hash_compact(), rb_hash_fetch_values(), rb_hash_reject(), rb_hash_select(), rb_hash_transform_values(), rb_hash_values_at(), rb_home_dir_of(), rb_invcmp(), rb_io_inspect(), rb_iseqw_line_trace_all(), rb_localtime_r(), rb_name_err_mesg_new(), rb_nkf_convert(), rb_nkf_putchar(), rb_nmin_run(), rb_obj_not_equal(), rb_obj_not_match(), rb_protect(), rb_reg_match_m(), rb_reg_match_p(), rb_reg_preprocess_dregexp(), rb_reg_search0(), rb_rescue2(), rb_sprintf(), rb_str_cmp_m(), rb_str_crypt(), rb_str_dump(), rb_str_escape(), rb_str_format(), rb_str_inspect(), rb_str_match_m(), rb_str_scan(), rb_str_slice_bang(), rb_str_split_m(), rb_strftime(), rb_strftime_timespec(), rb_strftime_with_timespec(), rb_struct_select(), rb_suppress_tracing(), rb_thread_fd_select(), rb_thread_wait_fd_rw(), rb_vm_make_jump_tag_but_local_jump(), rb_waitpid(), rb_waitpid_blocking(), readline_attempted_completion_function(), readline_readline(), remove_duplicate_keys(), rgengc_remembered(), ruby__sfvextra(), ruby__sfvwrite(), ruby_num_interval_step_size(), scan_once(), strtol(), take_items(), tbl_update(), test_func_fn(), time_add(), ttymode(), unescape_unicode(), username_completion_proc_call(), vm_default_params(), vm_exec(), vm_respond_to(), vtable_included(), zip_ary(), and zip_i().