|
Ruby
2.7.2p137(2020-10-01revision5445e0435260b449decf2ac16f9d09bae3cafe72)
|
#include "internal.h"#include <ctype.h>#include <stdio.h>#include <errno.h>#include <math.h>#include <float.h>#include "ruby/util.h"#include <sys/types.h>#include <sys/stat.h>#include "missing/dtoa.c"Go to the source code of this file.
Data Structures | |
| struct | stack_node |
Macros | |
| #define | hexdigit ruby_hexdigits |
| #define | S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) |
| #define | mmtype long |
| #define | mmcount (16 / SIZEOF_LONG) |
| #define | A ((mmtype*)a) |
| #define | B ((mmtype*)b) |
| #define | C ((mmtype*)c) |
| #define | D ((mmtype*)d) |
| #define | mmstep (sizeof(mmtype) * mmcount) |
| #define | mmprepare(base, size) |
| #define | mmarg mmkind, size, high, low |
| #define | mmargdecl int mmkind, size_t size, size_t high, size_t low |
| #define | mmswap(a, b) mmswap_((a),(b),mmarg) |
| #define | mmrot3(a, b, c) mmrot3_((a),(b),(c),mmarg) |
| #define | PUSH(ll, rr) do { top->LL = (ll); top->RR = (rr); ++top; } while (0) /* Push L,l,R,r */ |
| #define | POP(ll, rr) do { --top; (ll) = top->LL; (rr) = top->RR; } while (0) /* Pop L,l,R,r */ |
| #define | med3(a, b, c) |
| #define | PATH_MAX 8192 |
| #define | strtod ruby_strtod |
| #define | dtoa ruby_dtoa |
| #define | hdtoa ruby_hdtoa |
Typedefs | |
| typedef int() | cmpfunc_t(const void *, const void *, void *) |
Functions | |
| unsigned long | ruby_scan_oct (const char *start, size_t len, size_t *retlen) |
| unsigned long | ruby_scan_hex (const char *start, size_t len, size_t *retlen) |
| NO_SANITIZE ("unsigned-integer-overflow", extern unsigned long ruby_scan_digits(const char *str, ssize_t len, int base, size_t *retlen, int *overflow)) | |
| unsigned long | ruby_scan_digits (const char *str, ssize_t len, int base, size_t *retlen, int *overflow) |
| unsigned long | ruby_strtoul (const char *str, char **endptr, int base) |
| void | ruby_qsort (void *base, const size_t nel, const size_t size, cmpfunc_t *cmp, void *d) |
| char * | ruby_strdup (const char *str) |
| char * | ruby_getcwd (void) |
| void | ruby_each_words (const char *str, void(*func)(const char *, int, void *), void *arg) |
Variables | |
| const char | ruby_hexdigits [] = "0123456789abcdef0123456789ABCDEF" |
| const signed char | ruby_digit36_to_number_table [] |
| #define hdtoa ruby_hdtoa |
| #define hexdigit ruby_hexdigits |
| #define med3 | ( | a, | |
| b, | |||
| c | |||
| ) |
| #define mmcount (16 / SIZEOF_LONG) |
| #define mmprepare | ( | base, | |
| size | |||
| ) |
| #define PATH_MAX 8192 |
| #define strtod ruby_strtod |
| NO_SANITIZE | ( | "unsigned-integer-overflow" | , |
| extern unsigned long | ruby_scan_digitsconst char *str, ssize_t len, int base, size_t *retlen, int *overflow | ||
| ) |
Definition at line 539 of file util.c.
References buf, DATA_PTR, Data_Wrap_Struct, ERANGE, errno, free, getcwd(), getwd(), NULL, PATH_MAX, RB_GC_GUARD, rb_sys_fail(), rb_syserr_fail(), RUBY_DEFAULT_FREE, ruby_strdup(), size, xfree, xmalloc, and xrealloc.
Referenced by rb_dir_getwd_ospath().
| unsigned long ruby_scan_digits | ( | const char * | str, |
| ssize_t | len, | ||
| int | base, | ||
| size_t * | retlen, | ||
| int * | overflow | ||
| ) |
Definition at line 97 of file util.c.
References char, len, long, ruby_digit36_to_number_table, and str.
Referenced by ruby_strtoul().
Definition at line 527 of file util.c.
References len, memcpy(), str, strlen(), and xmalloc.
Referenced by compat_init_setproctitle(), and ruby_getcwd().
Definition at line 75 of file util.c.
Referenced by ruby_scan_digits().