diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-01 12:24:04 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-01 12:24:04 +0000 |
commit | 041e8291271557ca0b18f283411b013888c55955 (patch) | |
tree | 474e4518a368fcd26881d41c3f011e9525b1fdf2 /ruby.c | |
parent | 46933426b0a013efe1c978bbd200ea63c9ec644d (diff) |
* include/ruby/encoding.h (rb_isascii): defined.
(rb_isalnum): ditto.
(rb_isalpha): ditto.
(rb_isblank): ditto.
(rb_iscntrl): ditto.
(rb_isdigit): ditto.
(rb_isgraph): ditto.
(rb_islower): ditto.
(rb_isprint): ditto.
(rb_ispunct): ditto.
(rb_isspace): ditto.
(rb_isupper): ditto.
(rb_isxdigit): ditto.
(rb_tolower): ditto.
(rb_toupper): ditto.
* include/ruby/st.h (st_strcasecmp): declared.
(st_strncasecmp): ditto.
* st.c (type_strcasehash): use st_strcasecmp instead of strcasecmp.
(st_strcasecmp): defined.
(st_strncasecmp): ditto.
* include/ruby/ruby.h: include include/ruby/encoding.h.
(ISASCII): use rb_isascii.
(ISPRINT): use rb_isprint.
(ISSPACE): use rb_isspace.
(ISUPPER): use rb_isupper.
(ISLOWER): use rb_islower.
(ISALNUM): use rb_isalnum.
(ISALPHA): use rb_isalpha.
(ISDIGIT): use rb_isdigit.
(ISXDIGIT): use rb_isxdigit.
(TOUPPER): defined.
(TOLOWER): ditto.
(STRCASECMP): ditto.
(STRNCASECMP): ditto.
* dir.c, encoding.c, file.c, hash.c, process.c, ruby.c, time.c,
transcode.c, ext/readline/readline.c: use locale insensitive
functions. [ruby-core:14662]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r-- | ruby.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -184,7 +184,7 @@ rubylib_mangled_path(const char *s, unsigned int l) notfound = 1; } } - if (!newp || l < oldl || strncasecmp(oldp, s, oldl) != 0) { + if (!newp || l < oldl || STRNCASECMP(oldp, s, oldl) != 0) { return rb_str_new(s, l); } ret = rb_str_new(0, l + newl - oldl); @@ -345,7 +345,7 @@ ruby_init_loadpath(void) p = strrchr(libpath, '/'); if (p) { *p = 0; - if (p - libpath > 3 && !strcasecmp(p - 4, "/bin")) { + if (p - libpath > 3 && !STRCASECMP(p - 4, "/bin")) { p -= 4; *p = 0; } @@ -1039,7 +1039,7 @@ load_file(VALUE parser, const char *fname, int script, struct cmdline_options *o #if defined DOSISH || defined __CYGWIN__ { const char *ext = strrchr(fname, '.'); - if (ext && strcasecmp(ext, ".exe") == 0) + if (ext && STRCASECMP(ext, ".exe") == 0) mode |= O_BINARY; } #endif |