projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
cleanup, add manual page
[unix-history]
/
usr
/
src
/
games
/
monop
/
strcmp.c
# include <stdio.h>
# include <ctype.h>
# define reg register
# define makelower(c) (isupper(c) ? tolower(c) : c)
/*
* Compare strings: s1>s2: >0 s1==s2: 0 s1<s2: <0
*/
strcmp
(
s1
,
s2
)
reg
char
*
s1
, *
s2
; {
while
(
makelower
(*
s1
) ==
makelower
(*
s2
)) {
if
(*
s1
==
'\0'
)
return
0
;
s1
++,
s2
++;
}
return
*
s1
- *
s2
;
}