summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/compat/string.c
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2005-11-01 16:42:51 +0000
committerBenny Prijono <bennylp@teluu.com>2005-11-01 16:42:51 +0000
commit81ecc233996dcddfbef707bd9a5099f5d9e5eb13 (patch)
treec735c382ff2dac0179b96505c4192ee70185372d /pjlib/src/pj/compat/string.c
parentb5a1af6f999820564ead4867b1e5d5574778ee56 (diff)
Added suppor /and fix things for SunOS port
git-svn-id: http://svn.pjsip.org/repos/pjproject/main@2 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjlib/src/pj/compat/string.c')
-rw-r--r--pjlib/src/pj/compat/string.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/pjlib/src/pj/compat/string.c b/pjlib/src/pj/compat/string.c
index 25fd11c9..ccaf09a2 100644
--- a/pjlib/src/pj/compat/string.c
+++ b/pjlib/src/pj/compat/string.c
@@ -1,33 +1,33 @@
-/* $Header: /pjproject-0.3/pjlib/src/pj/compat/string.c 1 9/22/05 10:43a Bennylp $ */
-/* $Log: /pjproject-0.3/pjlib/src/pj/compat/string.c $
- *
- * 1 9/22/05 10:43a Bennylp
- * Created.
- *
- */
-#include <pj/types.h>
-#include <pj/compat/string.h>
-#include <pj/ctype.h>
-
-PJ_DEF(int) strcasecmp(const char *s1, const char *s2)
-{
- while ((*s1==*s2) || (pj_tolower(*s1)==pj_tolower(*s2))) {
- if (!*s1++)
- return 0;
- ++s2;
- }
- return (pj_tolower(*s1) < pj_tolower(*s2)) ? -1 : 1;
-}
-
-PJ_DEF(int) strncasecmp(const char *s1, const char *s2, int len)
-{
- if (!len) return 0;
-
- while ((*s1==*s2) || (pj_tolower(*s1)==pj_tolower(*s2))) {
- if (!*s1++ || --len <= 0)
- return 0;
- ++s2;
- }
- return (pj_tolower(*s1) < pj_tolower(*s2)) ? -1 : 1;
-}
-
+/* $Header: /pjproject-0.3/pjlib/src/pj/compat/string.c 1 9/22/05 10:43a Bennylp $ */
+/* $Log: /pjproject-0.3/pjlib/src/pj/compat/string.c $
+ *
+ * 1 9/22/05 10:43a Bennylp
+ * Created.
+ *
+ */
+#include <pj/types.h>
+#include <pj/compat/string.h>
+#include <pj/ctype.h>
+
+PJ_DEF(int) strcasecmp(const char *s1, const char *s2)
+{
+ while ((*s1==*s2) || (pj_tolower(*s1)==pj_tolower(*s2))) {
+ if (!*s1++)
+ return 0;
+ ++s2;
+ }
+ return (pj_tolower(*s1) < pj_tolower(*s2)) ? -1 : 1;
+}
+
+PJ_DEF(int) strncasecmp(const char *s1, const char *s2, int len)
+{
+ if (!len) return 0;
+
+ while ((*s1==*s2) || (pj_tolower(*s1)==pj_tolower(*s2))) {
+ if (!*s1++ || --len <= 0)
+ return 0;
+ ++s2;
+ }
+ return (pj_tolower(*s1) < pj_tolower(*s2)) ? -1 : 1;
+}
+