|
Ruby
3.1.0dev(2021-09-10revisionb76ad15ed0da636161de0243c547ee1e6fc95681)
|
#include "ruby/internal/config.h"#include <stdio.h>#include <ctype.h>#include <string.h>#include <time.h>#include <sys/types.h>#include <errno.h>#include <math.h>#include "internal.h"#include "internal/string.h"#include "internal/vm.h"#include "ruby/encoding.h"#include "ruby/ruby.h"#include "ruby/util.h"#include "timev.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 | const |
| #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 | TBUFSIZE 100 |
| #define | FLAG_FOUND() |
| #define | NEEDS(n) |
| #define | FILL_PADDING(i) |
| #define | FMT_PADDING(fmt, def_pad) |
| #define | FMT_PRECISION(def_prec) |
| #define | FMT(def_pad, def_prec, fmt, val) |
| #define | STRFTIME(fmt) |
| #define | FMTV(def_pad, def_prec, fmt, val) |
Enumerations | |
| enum | { LEFT, CHCASE, LOWER, UPPER } |
Functions | |
| adddecl (static int iso8601wknum();) | |
| VALUE | rb_strftime (const char *format, size_t format_len, rb_encoding *enc, VALUE time, const struct vtm *vtm, VALUE timev, int gmt) |
| VALUE | rb_strftime_timespec (const char *format, size_t format_len, rb_encoding *enc, VALUE time, const struct vtm *vtm, struct timespec *ts, int gmt) |
| #define add | ( | x, | |
| y | |||
| ) | (rb_funcall((x), '+', 1, (y))) |
Definition at line 156 of file strftime.c.
| #define adddecl | ( | stuff | ) | stuff |
Definition at line 100 of file strftime.c.
| #define BIT_OF | ( | n | ) | (1U<<(n)) |
Definition at line 166 of file strftime.c.
| #define const |
Definition at line 108 of file strftime.c.
| #define div | ( | x, | |
| y | |||
| ) | (rb_funcall((x), rb_intern("div"), 1, (y))) |
Definition at line 160 of file strftime.c.
| #define FILL_PADDING | ( | i | ) |
| #define FLAG_FOUND | ( | ) |
| #define FMT | ( | def_pad, | |
| def_prec, | |||
| fmt, | |||
| val | |||
| ) |
| #define FMT_PADDING | ( | fmt, | |
| def_pad | |||
| ) |
| #define FMT_PRECISION | ( | def_prec | ) |
| #define FMTV | ( | def_pad, | |
| def_prec, | |||
| fmt, | |||
| val | |||
| ) |
| #define ISO_DATE_EXT 1 /* %G and %g for year of ISO week */ |
Definition at line 82 of file strftime.c.
| #define MAILHEADER_EXT 1 /* add %z for HHMM format */ |
Definition at line 81 of file strftime.c.
| #define mod | ( | x, | |
| y | |||
| ) | (rb_funcall((x), '%', 1, (y))) |
Definition at line 161 of file strftime.c.
| #define mul | ( | x, | |
| y | |||
| ) | (rb_funcall((x), '*', 1, (y))) |
Definition at line 158 of file strftime.c.
| #define NEEDS | ( | n | ) |
| #define POSIX2_DATE 1 /* stuff in Posix 1003.2 date command */ |
Definition at line 79 of file strftime.c.
| #define quo | ( | x, | |
| y | |||
| ) | (rb_funcall((x), rb_intern("quo"), 1, (y))) |
Definition at line 159 of file strftime.c.
| #define STRFTIME | ( | fmt | ) |
| #define sub | ( | x, | |
| y | |||
| ) | (rb_funcall((x), '-', 1, (y))) |
Definition at line 157 of file strftime.c.
| #define SUNOS_EXT 1 /* stuff in SunOS strftime routine */ |
Definition at line 78 of file strftime.c.
| #define SYSV_EXT 1 /* stuff in System V ascftime routine */ |
Definition at line 77 of file strftime.c.
| #define TBUFSIZE 100 |
| #define VMS_EXT 1 /* include %v for VMS date format */ |
Definition at line 80 of file strftime.c.
| anonymous enum |
| Enumerator | |
|---|---|
| LEFT | |
| CHCASE | |
| LOWER | |
| UPPER | |
Definition at line 165 of file strftime.c.
| adddecl | ( | static int iso8601wknum(); | ) |
Definition at line 110 of file strftime.c.
| VALUE rb_strftime | ( | const char * | format, |
| size_t | format_len, | ||
| rb_encoding * | enc, | ||
| VALUE | time, | ||
| const struct vtm * | vtm, | ||
| VALUE | timev, | ||
| int | gmt | ||
| ) |
Definition at line 928 of file strftime.c.
| VALUE rb_strftime_timespec | ( | const char * | format, |
| size_t | format_len, | ||
| rb_encoding * | enc, | ||
| VALUE | time, | ||
| const struct vtm * | vtm, | ||
| struct timespec * | ts, | ||
| int | gmt | ||
| ) |
Definition at line 938 of file strftime.c.
1.8.17