|
Ruby
1.9.3p551(2014-11-13revision48407)
|
Go to the source code of this file.
Macros | |
| #define | sizeof_array(o) (sizeof o / sizeof o[0]) |
| #define | f_negate(x) rb_funcall(x, rb_intern("-@"), 0) |
| #define | f_add(x, y) rb_funcall(x, '+', 1, y) |
| #define | f_sub(x, y) rb_funcall(x, '-', 1, y) |
| #define | f_mul(x, y) rb_funcall(x, '*', 1, y) |
| #define | f_div(x, y) rb_funcall(x, '/', 1, y) |
| #define | f_idiv(x, y) rb_funcall(x, rb_intern("div"), 1, y) |
| #define | f_mod(x, y) rb_funcall(x, '%', 1, y) |
| #define | f_expt(x, y) rb_funcall(x, rb_intern("**"), 1, y) |
| #define | f_lt_p(x, y) rb_funcall(x, '<', 1, y) |
| #define | f_gt_p(x, y) rb_funcall(x, '>', 1, y) |
| #define | f_le_p(x, y) rb_funcall(x, rb_intern("<="), 1, y) |
| #define | f_ge_p(x, y) rb_funcall(x, rb_intern(">="), 1, y) |
| #define | f_match(r, s) rb_funcall(r, rb_intern("match"), 1, s) |
| #define | f_aref(o, i) rb_funcall(o, rb_intern("[]"), 1, i) |
| #define | f_end(o, i) rb_funcall(o, rb_intern("end"), 1, i) |
| #define | issign(c) ((c) == '-' || (c) == '+') |
| #define | NUM_PATTERN_P() num_pattern_p(&fmt[fi + 1]) |
| #define | set_hash(k, v) rb_hash_aset(hash, ID2SYM(rb_intern(k)), v) |
| #define | ref_hash(k) rb_hash_aref(hash, ID2SYM(rb_intern(k))) |
| #define | del_hash(k) rb_hash_delete(hash, ID2SYM(rb_intern(k))) |
| #define | fail() |
| #define | fail_p() (!NIL_P(ref_hash("_fail"))) |
| #define | READ_DIGITS(n, w) |
| #define | READ_DIGITS_MAX(n) READ_DIGITS(n, LONG_MAX) |
| #define | recur(fmt) |
Functions | |
| static int | num_pattern_p (const char *s) |
| static long | read_digits (const char *s, VALUE *n, size_t width) |
| static int | valid_range_p (VALUE v, int a, int b) |
| VALUE | date_zone_to_diff (VALUE) |
| static size_t | date__strptime_internal (const char *str, size_t slen, const char *fmt, size_t flen, VALUE hash) |
Variables | |
| static const char * | day_names [] |
| static const char * | month_names [] |
| static const char * | merid_names [] |
| static const char * | extz_pats [] |
| #define del_hash | ( | k | ) | rb_hash_delete(hash, ID2SYM(rb_intern(k))) |
Definition at line 115 of file date_strptime.c.
| #define f_add | ( | x, | |
| y | |||
| ) | rb_funcall(x, '+', 1, y) |
Definition at line 39 of file date_strptime.c.
| #define f_aref | ( | o, | |
| i | |||
| ) | rb_funcall(o, rb_intern("[]"), 1, i) |
Definition at line 53 of file date_strptime.c.
| #define f_div | ( | x, | |
| y | |||
| ) | rb_funcall(x, '/', 1, y) |
Definition at line 42 of file date_strptime.c.
| #define f_end | ( | o, | |
| i | |||
| ) | rb_funcall(o, rb_intern("end"), 1, i) |
Definition at line 54 of file date_strptime.c.
Referenced by date__strptime_internal().
| #define f_expt | ( | x, | |
| y | |||
| ) | rb_funcall(x, rb_intern("**"), 1, y) |
Definition at line 45 of file date_strptime.c.
Referenced by date__strptime_internal().
| #define f_ge_p | ( | x, | |
| y | |||
| ) | rb_funcall(x, rb_intern(">="), 1, y) |
Definition at line 50 of file date_strptime.c.
Referenced by date__strptime_internal().
| #define f_gt_p | ( | x, | |
| y | |||
| ) | rb_funcall(x, '>', 1, y) |
Definition at line 48 of file date_strptime.c.
Referenced by valid_range_p().
| #define f_idiv | ( | x, | |
| y | |||
| ) | rb_funcall(x, rb_intern("div"), 1, y) |
Definition at line 43 of file date_strptime.c.
| #define f_le_p | ( | x, | |
| y | |||
| ) | rb_funcall(x, rb_intern("<="), 1, y) |
Definition at line 49 of file date_strptime.c.
| #define f_lt_p | ( | x, | |
| y | |||
| ) | rb_funcall(x, '<', 1, y) |
Definition at line 47 of file date_strptime.c.
Referenced by valid_range_p().
| #define f_match | ( | r, | |
| s | |||
| ) | rb_funcall(r, rb_intern("match"), 1, s) |
Definition at line 52 of file date_strptime.c.
Referenced by date__strptime_internal().
| #define f_mod | ( | x, | |
| y | |||
| ) | rb_funcall(x, '%', 1, y) |
Definition at line 44 of file date_strptime.c.
| #define f_mul | ( | x, | |
| y | |||
| ) | rb_funcall(x, '*', 1, y) |
Definition at line 41 of file date_strptime.c.
| #define f_negate | ( | x | ) | rb_funcall(x, rb_intern("-@"), 0) |
Definition at line 38 of file date_strptime.c.
Referenced by date__strptime_internal().
| #define f_sub | ( | x, | |
| y | |||
| ) | rb_funcall(x, '-', 1, y) |
Definition at line 40 of file date_strptime.c.
| #define fail | ( | ) |
Definition at line 117 of file date_strptime.c.
Referenced by allocate_converted_string(), backward_search_range(), date__strptime_internal(), get_device_once(), match_at(), output_hex_charref(), rb_econv_insert_output(), ruby_qsort(), ruby_setenv(), and run_exec_dup2().
Definition at line 123 of file date_strptime.c.
| #define issign | ( | c | ) | ((c) == '-' || (c) == '+') |
Definition at line 56 of file date_strptime.c.
Referenced by date__strptime_internal().
| #define NUM_PATTERN_P | ( | ) | num_pattern_p(&fmt[fi + 1]) |
Definition at line 74 of file date_strptime.c.
Referenced by date__strptime_internal().
| #define READ_DIGITS | ( | n, | |
| w | |||
| ) |
Definition at line 125 of file date_strptime.c.
Referenced by date__strptime_internal().
| #define READ_DIGITS_MAX | ( | n | ) | READ_DIGITS(n, LONG_MAX) |
Definition at line 134 of file date_strptime.c.
Referenced by date__strptime_internal().
| #define recur | ( | fmt | ) |
Definition at line 146 of file date_strptime.c.
Referenced by class_instance_method_list(), date__strptime_internal(), file_inspect_join(), inspect_ary(), inspect_enumerator(), inspect_hash(), inspect_obj(), inspect_range(), inspect_struct(), io_puts_ary(), rb_mod_const_defined(), rb_mod_const_get(), rb_obj_methods(), rb_obj_singleton_methods(), recursive_cmp(), recursive_eql(), recursive_equal(), recursive_hash(), and recursive_join().
| #define ref_hash | ( | k | ) | rb_hash_aref(hash, ID2SYM(rb_intern(k))) |
Definition at line 114 of file date_strptime.c.
Definition at line 113 of file date_strptime.c.
Referenced by date__strptime_internal().
Definition at line 36 of file date_strptime.c.
Referenced by date__strptime_internal().
|
static |
Definition at line 159 of file date_strptime.c.
References date_zone_to_diff(), day_names, extz_pats, f_end, f_expt, f_ge_p, f_match, f_negate, fail, i, INT2FIX, issign, merid_names, month_names, NIL_P, NUM2LONG(), NUM_PATTERN_P, ONIG_OPTION_IGNORECASE, Qnil, rb_backref_get(), rb_backref_set(), rb_gc_register_mark_object(), rb_match_busy(), rb_rational_new2, rb_reg_new(), rb_reg_nth_match(), rb_usascii_str_new2(), READ_DIGITS, READ_DIGITS_MAX, recur, set_hash, sizeof_array, strchr(), strlen(), strncasecmp, ULONG2NUM(), and valid_range_p().
Definition at line 370 of file date_parse.c.
References ALLOCA_N, cstr2num, DST, f_add, f_aref, f_expt, f_mul, f_negate, i, INT2FIX, issign, LONG2NUM, min(), name, NIL_P, zone::offset, p, Qnil, RB_GC_GUARD, rb_gc_register_mark_object(), rb_hash_aset(), rb_hash_new(), rb_rational_new2, rb_str_new(), rb_str_new2(), RSTRING_LEN, RSTRING_PTR, sizeof_array, STD, str2num, strchr(), strlen(), T_STRING, TYPE, and zones_source.
Referenced by date__strptime_internal().
|
static |
Definition at line 59 of file date_strptime.c.
References strchr().
Definition at line 77 of file date_strptime.c.
References ALLOCA_N, CHAR_BIT, LONG2NUM, rb_cstr_to_inum(), and v.
|
static |
Definition at line 137 of file date_strptime.c.
References f_gt_p, f_lt_p, FIX2INT, FIXNUM_P, INT2NUM(), and v.
Referenced by date__strptime_internal().
|
static |
Definition at line 10 of file date_strptime.c.
Referenced by date__strptime_internal().
|
static |
Definition at line 30 of file date_strptime.c.
Referenced by date__strptime_internal().
|
static |
Definition at line 25 of file date_strptime.c.
Referenced by date__strptime_internal().
|
static |
Definition at line 17 of file date_strptime.c.
Referenced by date__strptime_internal().
1.8.14