|
Ruby
1.9.3p551(2014-11-13revision48407)
|
#include "ruby/ruby.h"#include "date_tmx.h"#include <stdio.h>#include <ctype.h>#include <string.h>#include <time.h>#include <sys/types.h>#include <errno.h>#include <math.h>Go to the source code of this file.
Macros | |
| #define | SYSV_EXT 1 /* stuff in System V ascftime routine */ |
| #define | SUNOS_EXT 1 /* stuff in SunOS strftime routine */ |
| #define | POSIX2_DATE 1 /* stuff in Posix 1003.2 date command */ |
| #define | VMS_EXT 1 /* include %v for VMS date format */ |
| #define | MAILHEADER_EXT 1 /* add %z for HHMM format */ |
| #define | ISO_DATE_EXT 1 /* %G and %g for year of ISO week */ |
| #define | adddecl(stuff) stuff |
| #define | range(low, item, hi) max((low), min((item), (hi))) |
| #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 | |
| void * | malloc () |
| void * | realloc () |
| char * | getenv () |
| char * | strchr () |
| static int | min (int a, int b) |
| static int | max (int a, int b) |
| 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 163 of file date_strftime.c.
Referenced by add_heap_slots(), alt_merge_node_opt_info(), alt_merge_opt_anc_info(), alt_merge_opt_exact_info(), alt_merge_opt_map_info(), concat_left_node_opt_info(), concat_opt_exact_info(), onig_chain_link_add(), ossl_bn_s_generate_prime(), and rb_str_associate().
| #define adddecl | ( | stuff | ) | stuff |
Definition at line 93 of file date_strftime.c.
| #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 167 of file date_strftime.c.
Referenced by BigDecimal_div(), BigDecimal_div2(), BigDecimal_divide(), BigDecimal_divmod(), BigDecimal_DoDivmod(), BigDecimal_mod(), date_strftime_with_tmx(), fix_divide(), fix_divmod(), fixdivmod(), flo_divmod(), flodivmod(), rb_big_divide(), 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().
Definition at line 75 of file date_strftime.c.
Definition at line 74 of file date_strftime.c.
| #define mod | ( | x, | |
| y | |||
| ) | (rb_funcall((x), '%', 1, (y))) |
Definition at line 168 of file date_strftime.c.
Referenced by add_modules(), autoload_delete(), autoload_node(), autoload_node_id(), BigDecimal_div2(), BigDecimal_divmod(), BigDecimal_DoDivmod(), BigDecimal_mod(), bigdivmod(), check_definition(), class_instance_method_list(), date_strftime_with_tmx(), fix_divmod(), fix_mod(), fixdivmod(), flo_divmod(), flodivmod(), rb_ary_flatten(), rb_ary_flatten_bang(), rb_autoload(), rb_autoload_load(), rb_autoload_p(), rb_big_divmod(), rb_class_inherited_p(), rb_class_instance_methods(), rb_class_private_instance_methods(), rb_class_protected_instance_methods(), rb_class_public_instance_methods(), rb_const_remove(), rb_define_notimplement_method_id(), rb_mod_alias_method(), rb_mod_ancestors(), rb_mod_autoload(), rb_mod_autoload_p(), rb_mod_cmp(), rb_mod_const_at(), rb_mod_const_defined(), rb_mod_const_get(), rb_mod_const_of(), rb_mod_const_set(), rb_mod_constants(), rb_mod_define_method(), rb_mod_eqq(), rb_mod_extend_object(), rb_mod_freeze(), rb_mod_ge(), rb_mod_gt(), rb_mod_include_p(), rb_mod_included_modules(), rb_mod_instance_method(), rb_mod_lt(), rb_mod_method_arity(), rb_mod_method_defined(), rb_mod_module_eval(), rb_mod_module_exec(), rb_mod_name(), rb_mod_private_method_defined(), rb_mod_protected_method_defined(), rb_mod_public_instance_method(), rb_mod_public_method_defined(), rb_mod_remove_const(), rb_mod_remove_cvar(), rb_mod_remove_method(), rb_mod_s_constants(), rb_mod_sys_fail(), rb_mod_sys_fail_str(), rb_mod_syserr_fail(), rb_mod_syserr_fail_str(), rb_mod_undef_method(), rb_module_s_alloc(), rb_str_sum(), ruby_float_mod(), and set_const_visibility().
| #define mul | ( | x, | |
| y | |||
| ) | (rb_funcall((x), '*', 1, (y))) |
Definition at line 165 of file date_strftime.c.
Referenced by date_strftime_with_tmx().
Referenced by date_strftime_with_tmx().
| #define POSIX2_DATE 1 /* stuff in Posix 1003.2 date command */ |
Definition at line 72 of file date_strftime.c.
| #define quo | ( | x, | |
| y | |||
| ) | (rb_funcall((x), rb_intern("quo"), 1, (y))) |
Definition at line 166 of file date_strftime.c.
Definition at line 125 of file date_strftime.c.
Referenced by backward_search_range(), BN_pseudo_rand_range(), BN_rand_range(), bn_rand_range(), date_strftime_with_tmx(), enc_succ_alnum_char(), forward_search_range(), inspect_range(), iso2022jp_check_conv(), onig_search(), rand_range(), range_begin(), range_cover(), range_dumper(), range_each(), range_each_func(), range_end(), range_eq(), range_eql(), range_eqq(), range_exclude_end_p(), range_first(), range_hash(), range_include(), range_init(), range_initialize(), range_inspect(), range_last(), range_loader(), range_max(), range_min(), range_step(), range_to_s(), rb_range_beg_len(), rb_range_new(), rb_range_values(), rb_reg_adjust_startpos(), rb_reg_search(), recursive_eql(), recursive_equal(), and recursive_hash().
| #define STRFTIME | ( | fmt | ) |
Referenced by date_strftime_with_tmx().
| #define sub | ( | x, | |
| y | |||
| ) | (rb_funcall((x), '-', 1, (y))) |
Definition at line 164 of file date_strftime.c.
Referenced by rb_str_index(), rb_str_index_m(), rb_str_rindex(), rb_str_rindex_m(), and rb_str_substr().
| #define SUNOS_EXT 1 /* stuff in SunOS strftime routine */ |
Definition at line 71 of file date_strftime.c.
| #define SYSV_EXT 1 /* stuff in System V ascftime routine */ |
Definition at line 70 of file date_strftime.c.
Definition at line 73 of file date_strftime.c.
Definition at line 807 of file date_strftime.c.
References date_strftime_with_tmx().
Referenced by date_strftime_alloc().
|
static |
Definition at line 173 of file date_strftime.c.
References args, BIT_OF, div, err, errno, FILL_PADDING, FIX2LONG, FIXNUM_P, FLAG_FOUND, FMT, FMTV, i, INT2FIX, ISLOWER, ISUPPER, mod, mul, NEEDS, NULL, NUM2INT, NUM2LONG(), range, rb_funcall(), rb_intern, 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, TOLOWER, and TOUPPER.
Referenced by date_strftime().
| char* getenv | ( | ) |
| void* malloc | ( | ) |
Referenced by allocate_sorted_heaps(), assign_heap_slot(), cbsubst_table_setup(), cmdglob(), Init_BareVM(), init_heap(), insert(), mbstr_to_wstr(), nkf_xmalloc(), open_ifs_socket(), rb_objspace_alloc(), rb_w32_cmdvector(), rb_w32_conv_from_wstr(), rb_w32_get_environ(), rb_w32_getcwd(), readline_attempted_completion_function(), ruby_setenv(), run_exec_dup2(), sdbm_open(), sdbm_prep(), sip_hash_final(), sip_hash_new(), stack_chunk_alloc(), th_init(), vm_xmalloc(), and wstr_to_mbstr().
|
inlinestatic |
Definition at line 149 of file date_strftime.c.
Referenced by array2fdset(), ary_join_0(), cmp_between(), d_lite_upto(), econv_putback(), fdset2array(), get_max_match_length(), old_thread_select(), optimize_node_left(), rand_int(), rand_range(), random_rand(), rb_thread_fd_select(), rb_thread_select(), rb_w32_fd_copy(), ruby_setenv(), select_internal(), set_mml(), and tr_trans().
|
inlinestatic |
Definition at line 133 of file date_strftime.c.
Referenced by ary_double_capa(), c_valid_time_p(), cmp_between(), d_complex_new_internal(), d_lite_downto(), date_zone_to_diff(), datetime_s_civil(), datetime_s_commercial(), datetime_s_jd(), datetime_s_now(), datetime_s_ordinal(), df_to_time(), get_c_civil(), get_c_time(), get_min_match_length(), min_trunc(), mktime_do(), optimize_node_left(), parse_time2_cb(), rand_range(), rb_enc_mbclen(), rb_w32_fd_copy(), rb_w32_write(), rt_rewrite_frags(), set_mml(), subexp_inf_recursive_check(), time_to_datetime(), time_to_df(), and vtm_add_offset().
| void* realloc | ( | ) |
Referenced by allocate_sorted_heaps(), enc_table_expand(), nkf_xrealloc(), opendir_internal(), stub_sysinit(), and vm_xrealloc().
| char* strchr | ( | ) |
Referenced by date_strftime_with_tmx().
1.8.14