projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
strcasecmp.c
diff --git
a/strcasecmp.c
b/strcasecmp.c
index
51e6e10
..
f604092
100644
(file)
--- a/
strcasecmp.c
+++ b/
strcasecmp.c
@@
-1,3
+1,12
@@
+/*
+ * Copyright notice from original mutt:
+ * [none]
+ *
+ * This file is part of mutt-ng, see http://www.muttng.org/.
+ * It's licensed under the GNU General Public License,
+ * please see the file GPL in the top level source directory.
+ */
+
#include <ctype.h>
#include <sys/types.h>
#include <ctype.h>
#include <sys/types.h>
@@
-6,9
+15,8
@@
int strncasecmp (char *s1, char *s2, size_t n)
{
register int c1, c2, l = 0;
int strncasecmp (char *s1, char *s2, size_t n)
{
register int c1, c2, l = 0;
-
- while (*s1 && *s2 && l < n)
- {
+
+ while (*s1 && *s2 && l < n) {
c1 = tolower ((unsigned char) *s1);
c2 = tolower ((unsigned char) *s2);
if (c1 != c2)
c1 = tolower ((unsigned char) *s1);
c2 = tolower ((unsigned char) *s2);
if (c1 != c2)
@@
-26,15
+34,14
@@
int strncasecmp (char *s1, char *s2, size_t n)
int strcasecmp (char *s1, char *s2)
{
register int c1, c2;
int strcasecmp (char *s1, char *s2)
{
register int c1, c2;
-
- while (*s1 && *s2)
- {
+
+ while (*s1 && *s2) {
c1 = tolower ((unsigned char) *s1);
c2 = tolower ((unsigned char) *s2);
if (c1 != c2)
return (c1 - c2);
s1++;
s2++;
c1 = tolower ((unsigned char) *s1);
c2 = tolower ((unsigned char) *s2);
if (c1 != c2)
return (c1 - c2);
s1++;
s2++;
- }
+ }
return (int) (*s1 - *s2);
}
return (int) (*s1 - *s2);
}