Changeset baeeee2 in mainline for uspace/lib/posix/source/fnmatch.c
- Timestamp:
- 2012-09-04T12:44:40Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 32b3a12
- Parents:
- f8cbe2c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/source/fnmatch.c
rf8cbe2c3 rbaeeee2 42 42 */ 43 43 44 #define LIBPOSIX_INTERNAL 45 44 46 #include "posix/stdbool.h" 45 47 #include "posix/ctype.h" … … 47 49 #include "posix/stdlib.h" 48 50 #include "posix/assert.h" 49 50 #define LIBPOSIX_INTERNAL51 51 52 52 #include "internal/common.h" … … 182 182 { "alnum", isalnum }, 183 183 { "alpha", isalpha }, 184 { "blank", isblank },185 { "cntrl", iscntrl },184 { "blank", posix_isblank }, 185 { "cntrl", posix_iscntrl }, 186 186 { "digit", isdigit }, 187 { "graph", isgraph },187 { "graph", posix_isgraph }, 188 188 { "lower", islower }, 189 { "print", isprint },190 { "punct", ispunct },189 { "print", posix_isprint }, 190 { "punct", posix_ispunct }, 191 191 { "space", isspace }, 192 192 { "upper", isupper }, 193 { "xdigit", isxdigit }193 { "xdigit", posix_isxdigit } 194 194 }; 195 195 … … 204 204 { 205 205 const struct _char_class *class = elem; 206 return strcmp((const char *) key, class->name);206 return posix_strcmp((const char *) key, class->name); 207 207 } 208 208 … … 217 217 { 218 218 /* Search for class in the array of supported character classes. */ 219 const struct _char_class *class = bsearch(cname, _char_classes,219 const struct _char_class *class = posix_bsearch(cname, _char_classes, 220 220 sizeof(_char_classes) / sizeof(struct _char_class), 221 221 sizeof(struct _char_class), _class_compare); … … 549 549 end = string; 550 550 } else { 551 end = strchrnul(string, pathname ? '/' : '\0');551 end = gnu_strchrnul(string, pathname ? '/' : '\0'); 552 552 } 553 553 … … 581 581 { 582 582 assert(s != NULL); 583 char *result = strdup(s);583 char *result = posix_strdup(s); 584 584 for (char *i = result; *i != '\0'; ++i) { 585 585 *i = tolower(*i);
Note:
See TracChangeset
for help on using the changeset viewer.