Changeset 4c53333 in mainline for uspace/lib/posix/source/fnmatch.c
- Timestamp:
- 2013-07-11T08:21:10Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 64e63ce1
- Parents:
- 80445cf (diff), c8bb1633 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/fnmatch.c
r80445cf r4c53333 42 42 */ 43 43 44 #include "stdbool.h"45 #include "ctype.h"46 #include "string.h"47 #include "stdlib.h"48 #include "assert.h"49 50 44 #define LIBPOSIX_INTERNAL 45 #define __POSIX_DEF__(x) posix_##x 46 47 #include "libc/stdbool.h" 48 #include "posix/ctype.h" 49 #include "posix/string.h" 50 #include "posix/stdlib.h" 51 #include "posix/assert.h" 51 52 52 53 #include "internal/common.h" 53 #include " fnmatch.h"54 #include "posix/fnmatch.h" 54 55 55 56 /* Returned by _match... functions. */ … … 182 183 { "alnum", isalnum }, 183 184 { "alpha", isalpha }, 184 { "blank", isblank },185 { "cntrl", iscntrl },185 { "blank", posix_isblank }, 186 { "cntrl", posix_iscntrl }, 186 187 { "digit", isdigit }, 187 { "graph", isgraph },188 { "graph", posix_isgraph }, 188 189 { "lower", islower }, 189 { "print", isprint },190 { "punct", ispunct },190 { "print", posix_isprint }, 191 { "punct", posix_ispunct }, 191 192 { "space", isspace }, 192 193 { "upper", isupper }, 193 { "xdigit", isxdigit }194 { "xdigit", posix_isxdigit } 194 195 }; 195 196 … … 204 205 { 205 206 const struct _char_class *class = elem; 206 return strcmp((const char *) key, class->name);207 return posix_strcmp((const char *) key, class->name); 207 208 } 208 209 … … 217 218 { 218 219 /* Search for class in the array of supported character classes. */ 219 const struct _char_class *class = bsearch(cname, _char_classes,220 const struct _char_class *class = posix_bsearch(cname, _char_classes, 220 221 sizeof(_char_classes) / sizeof(struct _char_class), 221 222 sizeof(struct _char_class), _class_compare); … … 549 550 end = string; 550 551 } else { 551 end = strchrnul(string, pathname ? '/' : '\0');552 end = gnu_strchrnul(string, pathname ? '/' : '\0'); 552 553 } 553 554 … … 581 582 { 582 583 assert(s != NULL); 583 char *result = strdup(s);584 char *result = posix_strdup(s); 584 585 for (char *i = result; *i != '\0'; ++i) { 585 586 *i = tolower(*i);
Note:
See TracChangeset
for help on using the changeset viewer.