fixed multiple definition of stricmp
[NeonServV5.git] / main.c
diff --git a/main.c b/main.c
index 79cd5d9d476906d026a61707d9aeada922d9fc63..9302ee90895c1c40bb572b173ac7246bd4b086ee 100644 (file)
--- a/main.c
+++ b/main.c
@@ -42,3 +42,17 @@ int main(void)
         clearTempUsers();
     }
 }
+
+int stricmp (const char *s1, const char *s2)
+{
+   if (s1 == NULL) return s2 == NULL ? 0 : -(*s2);
+   if (s2 == NULL) return *s1;
+   char c1, c2;
+   while ((c1 = tolower (*s1)) == (c2 = tolower (*s2)))
+   {
+     if (*s1 == '\0') break;
+     ++s1; ++s2;
+   }
+   return c1 - c2;
+}
+