Changeset 272 for trunk/src/slib.c
- Timestamp:
- Jan 27, 2010, 10:52:20 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/slib.c
r252 r272 1080 1080 if (a != NULL && b != NULL) 1081 1081 return (strncmp(a, b, n)); 1082 else if (a == NULL && b != NULL) 1083 return (-1); 1084 else if (a != NULL && b == NULL) 1085 return (1); 1086 else 1087 return (-7); /* default to not equal */ 1088 } 1089 1090 int sl_strncasecmp(const char * a, const char * b, size_t n) 1091 { 1092 #ifdef SL_FAIL_ON_ERROR 1093 SL_REQUIRE (a != NULL, _("a != NULL")); 1094 SL_REQUIRE (b != NULL, _("b != NULL")); 1095 SL_REQUIRE (n > 0, _("n > 0")); 1096 #endif 1097 1098 if (a != NULL && b != NULL) 1099 return (strncasecmp(a, b, n)); 1082 1100 else if (a == NULL && b != NULL) 1083 1101 return (-1);
Note:
See TracChangeset
for help on using the changeset viewer.