aboutsummaryrefslogtreecommitdiffstats
path: root/missing/strncasecmp.c
diff options
context:
space:
mode:
authorocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-22 01:28:00 +0000
committerocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-10-22 01:28:00 +0000
commit9c60701e4f39d7039da73e7dd5a36f5edade308a (patch)
tree3475fe7f783e96106c803fca0c28620dd27e9f2f /missing/strncasecmp.c
parent1a61008f18e651ef8848813a34cdebd6d8fd5eba (diff)
downloadruby-9c60701e4f39d7039da73e7dd5a36f5edade308a.tar.gz
* missing.h, missing/*.c: SUSv3 compatible strcasecmp and strncasecmp,
ANSI compatible strtol and strtoul, and ANSI styled other functions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'missing/strncasecmp.c')
-rw-r--r--missing/strncasecmp.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/missing/strncasecmp.c b/missing/strncasecmp.c
index a4cc5828b8..59d4477a40 100644
--- a/missing/strncasecmp.c
+++ b/missing/strncasecmp.c
@@ -1,12 +1,10 @@
/* public domain rewrite of strncasecmp(3) */
#include <ctype.h>
+#include <stddef.h>
int
-strncasecmp(p1, p2, len)
- char *p1;
- char *p2;
- int len;
+strncasecmp(const char *p1, const char *p2, size_t len)
{
while (len != 0) {
if (toupper(*p1) != toupper(*p2)) {