23 #include "ruby/internal/config.h"
85 # define ISASCII rb_isascii
86 # define ISPRINT rb_isprint
87 # define ISGRAPH rb_isgraph
88 # define ISSPACE rb_isspace
89 # define ISUPPER rb_isupper
90 # define ISLOWER rb_islower
91 # define ISALNUM rb_isalnum
92 # define ISALPHA rb_isalpha
93 # define ISDIGIT rb_isdigit
94 # define ISXDIGIT rb_isxdigit
95 # define ISBLANK rb_isblank
96 # define ISCNTRL rb_iscntrl
97 # define ISPUNCT rb_ispunct
100 #define TOUPPER rb_toupper
101 #define TOLOWER rb_tolower
102 #define STRCASECMP st_locale_insensitive_strcasecmp
103 #define STRNCASECMP st_locale_insensitive_strncasecmp
104 #define STRTOUL ruby_strtoul
187 unsigned long ruby_strtoul(const
char *str,
char **endptr,
int base);
211 return '\0' <= c && c <=
'\x7f';
234 return 'A' <= c && c <=
'Z';
257 return 'a' <= c && c <=
'z';
304 return '0' <= c && c <=
'9';
351 return rb_isdigit(c) || (
'A' <= c && c <=
'F') || (
'a' <= c && c <=
'f');
374 return c ==
' ' || c ==
'\t';
397 return c ==
' ' || (
'\t' <= c && c <=
'\r');
420 return (
'\0' <= c && c <
' ') || c ==
'\x7f';
444 return ' ' <= c && c <=
'\x7e';
491 return '!' <= c && c <=
'\x7e';
Defines RBIMPL_ATTR_ARTIFICIAL.
#define RBIMPL_ATTR_ARTIFICIAL()
Wraps (or simulates) __attribute__((artificial))
Defines RBIMPL_ATTR_CONST.
#define RBIMPL_ATTR_CONSTEXPR(_)
Wraps (or simulates) C++11 constexpr.
static int rb_isdigit(int c)
Our own locale-insensitive version of isdigit(3).
static int rb_isupper(int c)
Our own locale-insensitive version of isupper(3).
static int rb_iscntrl(int c)
Our own locale-insensitive version of iscntrl(3).
int st_locale_insensitive_strcasecmp(const char *s1, const char *s2)
Our own locale-insensitive version of strcasecmp(3).
static int rb_ispunct(int c)
Our own locale-insensitive version of ispunct(3).
static int rb_isalnum(int c)
Our own locale-insensitive version of isalnum(3).
static int rb_isxdigit(int c)
Our own locale-insensitive version of isxdigit(3).
static int rb_isspace(int c)
Our own locale-insensitive version of isspace(3).
static int rb_isascii(int c)
Our own locale-insensitive version of isascii(3).
static int rb_toupper(int c)
Our own locale-insensitive version of toupper(3).
unsigned long ruby_strtoul(const char *str, char **endptr, int base)
Our own locale-insensitive version of strtoul(3).
static int rb_tolower(int c)
Our own locale-insensitive version of tolower(3).
int st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n)
Our own locale-insensitive version of strcnasecmp(3).
static int rb_isgraph(int c)
Our own locale-insensitive version of isgraph(3).
static int rb_isalpha(int c)
Our own locale-insensitive version of isalpha(3).
static int rb_islower(int c)
Our own locale-insensitive version of islower(3).
static int rb_isprint(int c)
Identical to rb_isgraph(), except it also returns true for ‘’ '`.
static int rb_isblank(int c)
Our own locale-insensitive version of isblank(3).
Tweaking visibility of C variables/functions.
#define RBIMPL_SYMBOL_EXPORT_END()
Counterpart of RBIMPL_SYMBOL_EXPORT_BEGIN.
#define RBIMPL_SYMBOL_EXPORT_BEGIN()
Shortcut macro equivalent to RUBY_SYMBOL_EXPORT_BEGIN extern "C" {.
RBIMPL_ATTR_CONST() int rb_io_oflags_fmode(int oflags)
Converts an oflags (that rb_io_modestr_oflags() returns) to a fmode (that rb_io_mode_flags() returns)...
Defines RBIMPL_ATTR_NONNULL.
#define RBIMPL_ATTR_NONNULL(list)
Wraps (or simulates) __attribute__((nonnull))
#define inline
Old Visual Studio versions do not support the inline keyword, so we need to define it to be __inline.