repo.or.cz
/
WRF.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Update version info for release v4.6.1 (#2122)
[WRF.git]
/
var
/
da
/
makedepf90-2.8.8
/
strcasecmp.c
blob
087831d38b9b629ed68af597b63825f053c17840
1
#include <ctype.h>
2
3
int
strcasecmp
(
const char
*
s1
,
const char
*
s2
)
4
/*
5
* Use in case no 'strcasecmp' is found in libc on the system
6
*/
7
{
8
int
diff
;
9
10
while
(*
s1
&& *
s2
) {
11
if
((
diff
= (
int
)
tolower
(*
s1
) - (
int
)
tolower
(*
s2
)) !=
0
)
12
return
diff
;
13
s1
++;
14
s2
++;
15
}
16
17
if
(*
s1
==
'\0'
&& *
s2
==
'\0'
)
18
return
0
;
19
else if
(*
s1
==
'\0'
)
20
return
-
1
;
21
else
22
return
1
;
23
}