зеркало из https://github.com/github/ruby.git
* missing/strcasecmp.c: removed. Ruby don't use locale dependent
strcasecmp. * missing/strncasecmp.c: ditto. * configure.in: don't check strcasecmp and strncasecmp. * LEGAL: missing/strcasecmp.c and missing/strncasecmp.c removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
8676df80ed
Коммит
7e2fdd4cc8
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
Wed Jan 2 11:34:57 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* missing/strcasecmp.c: removed. Ruby don't use locale dependent
|
||||
strcasecmp.
|
||||
|
||||
* missing/strncasecmp.c: ditto.
|
||||
|
||||
* configure.in: don't check strcasecmp and strncasecmp.
|
||||
|
||||
* LEGAL: missing/strcasecmp.c and missing/strncasecmp.c removed.
|
||||
|
||||
Wed Jan 2 10:13:54 2008 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* sample/time.rb: use Process.times instead of Time.times.
|
||||
|
|
2
LEGAL
2
LEGAL
|
@ -148,11 +148,9 @@ missing/isinf.c:
|
|||
missing/isnan.c:
|
||||
missing/memcmp.c:
|
||||
missing/memmove.c:
|
||||
missing/strcasecmp.c:
|
||||
missing/strchr.c:
|
||||
missing/streror.c:
|
||||
missing/strftime.c:
|
||||
missing/strncasecmp.c:
|
||||
missing/strstr.c:
|
||||
missing/strtol.c:
|
||||
ext/digest/sha1/sha1.[ch]:
|
||||
|
|
|
@ -632,7 +632,7 @@ powerpc-darwin*)
|
|||
;;
|
||||
esac
|
||||
AC_FUNC_MEMCMP
|
||||
AC_REPLACE_FUNCS(dup2 memmove strcasecmp strncasecmp strerror strftime\
|
||||
AC_REPLACE_FUNCS(dup2 memmove strerror strftime\
|
||||
strchr strstr strtoul crypt flock vsnprintf\
|
||||
isnan finite isinf hypot acosh erf strlcpy strlcat)
|
||||
AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall chroot fsync getcwd eaccess\
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
/* public domain rewrite of strcasecmp(3) */
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
int
|
||||
strcasecmp(const char *p1, const char *p2)
|
||||
{
|
||||
while (*p1 && *p2) {
|
||||
if (toupper(*p1) != toupper(*p2))
|
||||
return toupper(*p1) - toupper(*p2);
|
||||
p1++;
|
||||
p2++;
|
||||
}
|
||||
return strlen(p1) - strlen(p2);
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
/* public domain rewrite of strncasecmp(3) */
|
||||
|
||||
#include <ctype.h>
|
||||
#include <stddef.h>
|
||||
|
||||
int
|
||||
strncasecmp(const char *p1, const char *p2, size_t len)
|
||||
{
|
||||
while (len != 0) {
|
||||
if (toupper(*p1) != toupper(*p2)) {
|
||||
return toupper(*p1) - toupper(*p2);
|
||||
}
|
||||
if (*p1 == '\0') {
|
||||
return 0;
|
||||
}
|
||||
len--; p1++; p2++;
|
||||
}
|
||||
return 0;
|
||||
}
|
Загрузка…
Ссылка в новой задаче