Ruby  2.0.0p645(2015-04-13revision50299)
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"

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_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 ()
 

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

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

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 PERL_XS   1

Definition at line 59 of file nkf.c.

#define putchar (   c)    rb_nkf_putchar(c)

Definition at line 28 of file nkf.c.

Referenced by std_putc().

#define RUBY_NKF_REVISION   "$Revision: 36966 $"

Definition at line 10 of file nkf.c.

#define RUBY_NKF_VERSION   NKF_VERSION " (" NKF_RELEASE_DATE ")"

Definition at line 11 of file nkf.c.

Referenced by Init_nkf().

#define ungetc (   c,
  f 
)    input_ctr--

Definition at line 22 of file nkf.c.

Function Documentation

void Init_nkf ( )
int nkf_split_options ( const char *  arg)

Definition at line 77 of file nkf.c.

References count, FALSE, i, and TRUE.

Referenced by rb_nkf_convert().

static VALUE rb_nkf_convert ( VALUE  obj,
VALUE  opt,
VALUE  src 
)
static
rb_encoding* rb_nkf_enc_get ( const char *  name)
static VALUE rb_nkf_guess ( VALUE  obj,
VALUE  src 
)
static
static int rb_nkf_putchar ( unsigned int  c)
static

Definition at line 43 of file nkf.c.

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

Variable Documentation

int i_len
static

Definition at line 35 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_guess().

int incsize
static

Definition at line 38 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_putchar().

unsigned char* input
static

Definition at line 33 of file nkf.c.

int input_ctr
static

Definition at line 34 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_guess().

int o_len
static

Definition at line 37 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_putchar().

unsigned char* output
static
int output_ctr
static

Definition at line 36 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_putchar().

VALUE result
static

Definition at line 40 of file nkf.c.

Referenced by rb_nkf_convert(), and rb_nkf_putchar().