Ruby
2.5.0dev(2017-10-22revision60238)
|
#include "ruby.h"
#include "ruby/encoding.h"
#include "ruby/re.h"
#include <ctype.h>
#include "zonetab.h"
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_to_s(x) rb_funcall(x, rb_intern("to_s"), 0) |
#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_aref2(o, i, j) rb_funcall(o, rb_intern("[]"), 2, i, j) |
#define | f_begin(o, i) rb_funcall(o, rb_intern("begin"), 1, i) |
#define | f_end(o, i) rb_funcall(o, rb_intern("end"), 1, i) |
#define | f_aset(o, i, v) rb_funcall(o, rb_intern("[]="), 2, i, v) |
#define | f_aset2(o, i, j, v) rb_funcall(o, rb_intern("[]="), 3, i, j, v) |
#define | f_sub_bang(s, r, x) rb_funcall(s, rb_intern("sub!"), 2, r, x) |
#define | f_gsub_bang(s, r, x) rb_funcall(s, rb_intern("gsub!"), 2, r, x) |
#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 | cstr2num(s) rb_cstr_to_inum(s, 10, 0) |
#define | str2num(s) rb_str_to_inum(s, 10, 0) |
#define | issign(c) ((c) == '-' || (c) == '+') |
#define | asp_string() rb_str_new(" ", 1) |
#define | DECDIGIT "0123456789" |
#define | DAYS "sunday|monday|tuesday|wednesday|thursday|friday|saturday" |
#define | MONTHS "january|february|march|april|may|june|july|august|september|october|november|december" |
#define | ABBR_DAYS "sun|mon|tue|wed|thu|fri|sat" |
#define | ABBR_MONTHS "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec" |
#define | REGCOMP(pat, opt) |
#define | REGCOMP_0(pat) REGCOMP(pat, 0) |
#define | REGCOMP_I(pat) REGCOMP(pat, ONIG_OPTION_IGNORECASE) |
#define | MATCH(s, p, c) |
#define | SUBS(s, p, c) |
#define | HAVE_ALPHA (1<<0) |
#define | HAVE_DIGIT (1<<1) |
#define | HAVE_DASH (1<<2) |
#define | HAVE_DOT (1<<3) |
#define | HAVE_SLASH (1<<4) |
#define | HAVE_ELEM_P(x) ((check_class(str) & (x)) == (x)) |
#define | SNUM 14 |
#define | SNUM 17 |
#define | SNUM 5 |
#define | iso8601_bas_time_cb iso8601_ext_time_cb |
#define | SNUM 8 |
#define | SNUM 8 |
#define | SNUM 5 |
#define | SNUM 4 |
#define | SNUM 8 |
#define | SNUM 8 |
#define | SNUM 8 |
#define | SNUM 7 |
#define | SNUM 9 |
Functions | |
RUBY_EXTERN VALUE | rb_int_positive_pow (long x, unsigned long y) |
RUBY_EXTERN unsigned long | ruby_scan_digits (const char *str, ssize_t len, int base, size_t *retlen, int *overflow) |
VALUE | date_zone_to_diff (VALUE str) |
VALUE | date__parse (VALUE str, VALUE comp) |
VALUE | date__iso8601 (VALUE str) |
VALUE | date__rfc3339 (VALUE str) |
VALUE | date__xmlschema (VALUE str) |
VALUE | date__rfc2822 (VALUE str) |
VALUE | date__httpdate (VALUE str) |
VALUE | date__jisx0301 (VALUE str) |
#define ABBR_DAYS "sun|mon|tue|wed|thu|fri|sat" |
Definition at line 235 of file date_parse.c.
#define ABBR_MONTHS "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec" |
Definition at line 236 of file date_parse.c.
#define asp_string | ( | ) | rb_str_new(" ", 1) |
Definition at line 61 of file date_parse.c.
#define cstr2num | ( | s | ) | rb_cstr_to_inum(s, 10, 0) |
Definition at line 47 of file date_parse.c.
#define DAYS "sunday|monday|tuesday|wednesday|thursday|friday|saturday" |
Definition at line 233 of file date_parse.c.
#define DECDIGIT "0123456789" |
Definition at line 69 of file date_parse.c.
#define del_hash | ( | k | ) | rb_hash_delete(hash, ID2SYM(rb_intern(k))) |
Definition at line 45 of file date_parse.c.
#define f_add | ( | x, | |
y | |||
) | rb_funcall(x, '+', 1, y) |
Definition at line 18 of file date_parse.c.
#define f_aref | ( | o, | |
i | |||
) | rb_funcall(o, rb_intern("[]"), 1, i) |
Definition at line 34 of file date_parse.c.
#define f_aref2 | ( | o, | |
i, | |||
j | |||
) | rb_funcall(o, rb_intern("[]"), 2, i, j) |
Definition at line 35 of file date_parse.c.
#define f_aset | ( | o, | |
i, | |||
v | |||
) | rb_funcall(o, rb_intern("[]="), 2, i, v) |
Definition at line 38 of file date_parse.c.
#define f_aset2 | ( | o, | |
i, | |||
j, | |||
v | |||
) | rb_funcall(o, rb_intern("[]="), 3, i, j, v) |
Definition at line 39 of file date_parse.c.
#define f_begin | ( | o, | |
i | |||
) | rb_funcall(o, rb_intern("begin"), 1, i) |
Definition at line 36 of file date_parse.c.
#define f_div | ( | x, | |
y | |||
) | rb_funcall(x, '/', 1, y) |
Definition at line 21 of file date_parse.c.
#define f_end | ( | o, | |
i | |||
) | rb_funcall(o, rb_intern("end"), 1, i) |
Definition at line 37 of file date_parse.c.
#define f_expt | ( | x, | |
y | |||
) | rb_funcall(x, rb_intern("**"), 1, y) |
Definition at line 24 of file date_parse.c.
#define f_ge_p | ( | x, | |
y | |||
) | rb_funcall(x, rb_intern(">="), 1, y) |
Definition at line 29 of file date_parse.c.
#define f_gsub_bang | ( | s, | |
r, | |||
x | |||
) | rb_funcall(s, rb_intern("gsub!"), 2, r, x) |
Definition at line 41 of file date_parse.c.
#define f_gt_p | ( | x, | |
y | |||
) | rb_funcall(x, '>', 1, y) |
Definition at line 27 of file date_parse.c.
#define f_idiv | ( | x, | |
y | |||
) | rb_funcall(x, rb_intern("div"), 1, y) |
Definition at line 22 of file date_parse.c.
#define f_le_p | ( | x, | |
y | |||
) | rb_funcall(x, rb_intern("<="), 1, y) |
Definition at line 28 of file date_parse.c.
#define f_lt_p | ( | x, | |
y | |||
) | rb_funcall(x, '<', 1, y) |
Definition at line 26 of file date_parse.c.
#define f_match | ( | r, | |
s | |||
) | rb_funcall(r, rb_intern("match"), 1, s) |
Definition at line 33 of file date_parse.c.
#define f_mod | ( | x, | |
y | |||
) | rb_funcall(x, '%', 1, y) |
Definition at line 23 of file date_parse.c.
#define f_mul | ( | x, | |
y | |||
) | rb_funcall(x, '*', 1, y) |
Definition at line 20 of file date_parse.c.
#define f_negate | ( | x | ) | rb_funcall(x, rb_intern("-@"), 0) |
Definition at line 17 of file date_parse.c.
#define f_sub | ( | x, | |
y | |||
) | rb_funcall(x, '-', 1, y) |
Definition at line 19 of file date_parse.c.
#define f_sub_bang | ( | s, | |
r, | |||
x | |||
) | rb_funcall(s, rb_intern("sub!"), 2, r, x) |
Definition at line 40 of file date_parse.c.
#define f_to_s | ( | x | ) | rb_funcall(x, rb_intern("to_s"), 0) |
Definition at line 31 of file date_parse.c.
#define HAVE_ALPHA (1<<0) |
Definition at line 2014 of file date_parse.c.
#define HAVE_DASH (1<<2) |
Definition at line 2016 of file date_parse.c.
#define HAVE_DIGIT (1<<1) |
Definition at line 2015 of file date_parse.c.
#define HAVE_DOT (1<<3) |
Definition at line 2017 of file date_parse.c.
#define HAVE_ELEM_P | ( | x | ) | ((check_class(str) & (x)) == (x)) |
Definition at line 2042 of file date_parse.c.
#define HAVE_SLASH (1<<4) |
Definition at line 2018 of file date_parse.c.
#define iso8601_bas_time_cb iso8601_ext_time_cb |
Definition at line 2443 of file date_parse.c.
#define issign | ( | c | ) | ((c) == '-' || (c) == '+') |
Definition at line 60 of file date_parse.c.
#define MATCH | ( | s, | |
p, | |||
c | |||
) |
Definition at line 274 of file date_parse.c.
#define MONTHS "january|february|march|april|may|june|july|august|september|october|november|december" |
Definition at line 234 of file date_parse.c.
#define ref_hash | ( | k | ) | rb_hash_aref(hash, ID2SYM(rb_intern(k))) |
Definition at line 44 of file date_parse.c.
#define REGCOMP | ( | pat, | |
opt | |||
) |
Definition at line 265 of file date_parse.c.
#define REGCOMP_0 | ( | pat | ) | REGCOMP(pat, 0) |
Definition at line 271 of file date_parse.c.
#define REGCOMP_I | ( | pat | ) | REGCOMP(pat, ONIG_OPTION_IGNORECASE) |
Definition at line 272 of file date_parse.c.
#define set_hash | ( | k, | |
v | |||
) | rb_hash_aset(hash, ID2SYM(rb_intern(k)), v) |
Definition at line 43 of file date_parse.c.
#define sizeof_array | ( | o | ) | (sizeof o / sizeof o[0]) |
Definition at line 15 of file date_parse.c.
#define SNUM 14 |
Definition at line 2926 of file date_parse.c.
#define SNUM 17 |
Definition at line 2926 of file date_parse.c.
#define SNUM 5 |
Definition at line 2926 of file date_parse.c.
#define SNUM 8 |
Definition at line 2926 of file date_parse.c.
#define SNUM 8 |
Definition at line 2926 of file date_parse.c.
#define SNUM 5 |
Definition at line 2926 of file date_parse.c.
#define SNUM 4 |
Definition at line 2926 of file date_parse.c.
#define SNUM 8 |
Definition at line 2926 of file date_parse.c.
#define SNUM 8 |
Definition at line 2926 of file date_parse.c.
#define SNUM 8 |
Definition at line 2926 of file date_parse.c.
#define SNUM 7 |
Definition at line 2926 of file date_parse.c.
#define SNUM 9 |
Definition at line 2926 of file date_parse.c.
#define str2num | ( | s | ) | rb_str_to_inum(s, 10, 0) |
Definition at line 48 of file date_parse.c.
#define SUBS | ( | s, | |
p, | |||
c | |||
) |
Definition at line 316 of file date_parse.c.
Definition at line 2903 of file date_parse.c.
Definition at line 2470 of file date_parse.c.
Definition at line 2977 of file date_parse.c.
Definition at line 2049 of file date_parse.c.
Definition at line 2757 of file date_parse.c.
Definition at line 2538 of file date_parse.c.
Definition at line 2684 of file date_parse.c.
Definition at line 353 of file date_parse.c.
References ALLOCV_N, Qnil, RSTRING_LEN, and RSTRING_PTR.
RUBY_EXTERN VALUE rb_int_positive_pow | ( | long | x, |
unsigned long | y | ||
) |
RUBY_EXTERN unsigned long ruby_scan_digits | ( | const char * | str, |
ssize_t | len, | ||
int | base, | ||
size_t * | retlen, | ||
int * | overflow | ||
) |