Ruby
2.0.0p648(2015-12-16revision53162)
|
#include "ruby/ruby.h"
#include "date_tmx.h"
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
Go to the source code of this file.
Macros | |
#define | range(low, item, hi) (item) |
#define | add(x, y) (rb_funcall((x), '+', 1, (y))) |
#define | sub(x, y) (rb_funcall((x), '-', 1, (y))) |
#define | mul(x, y) (rb_funcall((x), '*', 1, (y))) |
#define | quo(x, y) (rb_funcall((x), rb_intern("quo"), 1, (y))) |
#define | div(x, y) (rb_funcall((x), rb_intern("div"), 1, (y))) |
#define | mod(x, y) (rb_funcall((x), '%', 1, (y))) |
#define | BIT_OF(n) (1U<<(n)) |
#define | FLAG_FOUND() |
#define | NEEDS(n) do if (s >= endp || (n) >= endp - s - 1) goto err; while (0) |
#define | FILL_PADDING(i) |
#define | FMT(def_pad, def_prec, fmt, val) |
#define | STRFTIME(fmt) |
#define | FMTV(def_pad, def_prec, fmt, val) |
Functions | |
static void | upcase (char *s, size_t i) |
static void | downcase (char *s, size_t i) |
static size_t | date_strftime_with_tmx (char *s, size_t maxsize, const char *format, const struct tmx *tmx) |
size_t | date_strftime (char *s, size_t maxsize, const char *format, const struct tmx *tmx) |
#define add | ( | x, | |
y | |||
) | (rb_funcall((x), '+', 1, (y))) |
Definition at line 23 of file date_strftime.c.
Referenced by add_heap_slots(), allocate_sorted_heaps(), onig_chain_link_add(), ossl_bn_s_generate_prime(), and rb_str_associate().
#define BIT_OF | ( | n | ) | (1U<<(n)) |
Referenced by date_strftime_with_tmx().
#define div | ( | x, | |
y | |||
) | (rb_funcall((x), rb_intern("div"), 1, (y))) |
Definition at line 27 of file date_strftime.c.
Referenced by BigDecimal_div(), BigDecimal_div2(), BigDecimal_divmod(), BigDecimal_mod(), date_strftime_with_tmx(), fix_divide(), fix_divmod(), fixdivmod(), flo_divmod(), flodivmod(), iseq_specialized_instruction(), rb_big_divmod(), VpMidRound(), and VpVtoD().
#define FILL_PADDING | ( | i | ) |
Referenced by date_strftime_with_tmx().
#define FLAG_FOUND | ( | ) |
Referenced by date_strftime_with_tmx().
#define FMT | ( | def_pad, | |
def_prec, | |||
fmt, | |||
val | |||
) |
Referenced by date_strftime_with_tmx().
#define FMTV | ( | def_pad, | |
def_prec, | |||
fmt, | |||
val | |||
) |
Referenced by date_strftime_with_tmx().
#define mod | ( | x, | |
y | |||
) | (rb_funcall((x), '%', 1, (y))) |
Definition at line 28 of file date_strftime.c.
Referenced by BigDecimal_div2(), BigDecimal_divmod(), BigDecimal_mod(), bigdivmod(), class_instance_method_list(), date_strftime_with_tmx(), fix_divmod(), fix_mod(), fixdivmod(), flo_divmod(), flodivmod(), iseq_specialized_instruction(), mod_cvar_of(), mSyslogMacros_included(), rb_ary_flatten(), rb_ary_flatten_bang(), rb_autoload_load(), rb_big_divmod(), rb_class_inherited_p(), rb_mod_alias_method(), rb_mod_const_get(), rb_mod_const_of(), rb_mod_define_method(), rb_mod_remove_method(), rb_mod_undef_method(), rb_module_s_alloc(), rb_str_sum(), and ruby_float_mod().
#define mul | ( | x, | |
y | |||
) | (rb_funcall((x), '*', 1, (y))) |
Definition at line 25 of file date_strftime.c.
Referenced by date_strftime_with_tmx(), enum_cycle_size(), and rb_ary_cycle_size().
Referenced by date_strftime_with_tmx().
#define quo | ( | x, | |
y | |||
) | (rb_funcall((x), rb_intern("quo"), 1, (y))) |
Definition at line 26 of file date_strftime.c.
#define range | ( | low, | |
item, | |||
hi | |||
) | (item) |
Definition at line 21 of file date_strftime.c.
Referenced by date_strftime_with_tmx(), enc_succ_alnum_char(), iso2022jp_check_conv(), onig_search_gpos(), range_bsearch(), range_each(), range_loader(), range_step(), rb_range_new(), rb_reg_adjust_startpos(), and rb_reg_search().
#define STRFTIME | ( | fmt | ) |
Referenced by date_strftime_with_tmx().
#define sub | ( | x, | |
y | |||
) | (rb_funcall((x), '-', 1, (y))) |
Definition at line 24 of file date_strftime.c.
Referenced by rb_str_index_m(), and rb_str_rindex_m().
Definition at line 623 of file date_strftime.c.
References date_strftime_with_tmx().
Referenced by date_strftime_alloc().
|
static |
Definition at line 51 of file date_strftime.c.
References args, BIT_OF, div, downcase(), err, errno, FILL_PADDING, FIX2LONG, FIXNUM_P, FLAG_FOUND, FMT, FMTV, i, INT2FIX, mod, mul, NEEDS, NULL, NUM2INT, range, rb_str_format(), rb_str_new2(), result, snprintf, strchr(), STRFTIME, StringValueCStr, strlcpy(), strlen(), tmx_cwday, tmx_cweek, tmx_cwyear, tmx_hour, tmx_mday, tmx_min, tmx_mon, tmx_msecs, tmx_offset, tmx_sec, tmx_sec_fraction, tmx_secs, tmx_wday, tmx_wnum0, tmx_wnum1, tmx_yday, tmx_year, tmx_zone, upcase(), and v.
Referenced by date_strftime().
|
static |
Definition at line 40 of file date_strftime.c.
References ISUPPER, and TOLOWER.
Referenced by date_strftime_with_tmx().
|
static |
Definition at line 31 of file date_strftime.c.
References ISLOWER, and TOUPPER.
Referenced by date_strftime_with_tmx().