Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
83b820b1
Commit
83b820b1
authored
Mar 02, 2004
by
Niels Möller
Browse files
(strcasecmp): New file.
Rev: src/argp/configure.ac:1.16 Rev: src/argp/strcasecmp.c:1.1
parent
d03cbad0
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/argp/configure.ac
View file @
83b820b1
...
...
@@ -38,9 +38,9 @@ LSH_GCC_ATTRIBUTES
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(strerror
,
sleep
,
getpid)
AC_CHECK_FUNCS(strerror sleep getpid)
AC_REPLACE_FUNCS(mempcpy strndup strchrnul)
AC_REPLACE_FUNCS(mempcpy strndup strchrnul
strcasecmp
)
dnl ARGP_CHECK_FUNC(includes, function-call [, if-found [, if-not-found]])
AC_DEFUN([ARGP_CHECK_FUNC],
...
...
src/argp/strcasecmp.c
0 → 100644
View file @
83b820b1
/* strcasecmp.c
*
*/
/* Written by Niels Mller <nisse@lysator.liu.se>
*
* This file is hereby placed in the public domain.
*/
#include <ctype.h>
int
strcasecmp
(
const
char
*
s1
,
const
char
*
s2
)
{
unsigned
i
;
for
(
i
=
0
;
s1
[
i
]
&&
s2
[
i
];
i
++
)
{
unsigned
char
c1
=
tolower
(
(
unsigned
char
)
s1
[
i
]);
unsigned
char
c2
=
tolower
(
(
unsigned
char
)
s2
[
i
]);
if
(
c1
<
c2
)
return
-
1
;
else
if
(
c1
>
c2
)
return
1
;
}
return
!
s2
[
i
]
-
!
s1
[
i
];
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment