Changeset c2b2de7 in mainline for uspace/lib/posix/source/fnmatch.c
- Timestamp:
- 2012-10-17T22:17:29Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 150a271
- Parents:
- 6454ad47 (diff), 57912af3 (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
r6454ad47 rc2b2de7 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 51 45 46 #include "posix/stdbool.h" 47 #include "posix/ctype.h" 48 #include "posix/string.h" 49 #include "posix/stdlib.h" 50 #include "posix/assert.h" 51 52 52 #include "internal/common.h" 53 #include " fnmatch.h"53 #include "posix/fnmatch.h" 54 54 55 55 /* Returned by _match... functions. */ … … 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.