Ruby: ext/nkf/nkf.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
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$"
#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
rb_encoding * | rb_nkf_enc_get (const char *name)
int | nkf_split_options (const char *arg)
void | Init_nkf (void)

## Macro Definition Documentation

## ◆ getc

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

Definition at line 21 of file nkf.c.

## ◆ INCSIZE

#define INCSIZE 32

Definition at line 24 of file nkf.c.

## ◆ 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.

## ◆ RUBY_NKF_REVISION

#define RUBY_NKF_REVISION "$Revision$"

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.

## ◆ ungetc

#define ungetc | ( |  | c,
|  |  | f
| ) |  | input_ctr--

Definition at line 22 of file nkf.c.

## Function Documentation

## ◆ Init_nkf()

void Init_nkf | ( | void |  | ) |

Definition at line 477 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_enc_get(), rb_singleton_class(), rb_str_new2, rb_utf8_encoding(), and RUBY_NKF_VERSION.

## ◆ nkf_split_options()

int nkf_split_options | ( | const char * | arg | ) |

Definition at line 77 of file nkf.c.

References count, FALSE, and TRUE.

## ◆ rb_nkf_enc_get()

rb_encoding * rb_nkf_enc_get | ( | const char * | name | ) |

Definition at line 64 of file nkf.c.

References name, 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().