Changeset c2b2de7 in mainline for uspace/lib/posix/source/fnmatch.c


Ignore:
Timestamp:
2012-10-17T22:17:29Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
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.
Message:

merge changes from bbxm branch

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/source/fnmatch.c

    r6454ad47 rc2b2de7  
    4242 */
    4343
    44 #include "stdbool.h"
    45 #include "ctype.h"
    46 #include "string.h"
    47 #include "stdlib.h"
    48 #include "assert.h"
    49 
    5044#define LIBPOSIX_INTERNAL
    5145
     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
    5252#include "internal/common.h"
    53 #include "fnmatch.h"
     53#include "posix/fnmatch.h"
    5454
    5555/* Returned by _match... functions. */
     
    182182        { "alnum", isalnum },
    183183        { "alpha", isalpha },
    184         { "blank", isblank },
    185         { "cntrl", iscntrl },
     184        { "blank", posix_isblank },
     185        { "cntrl", posix_iscntrl },
    186186        { "digit", isdigit },
    187         { "graph", isgraph },
     187        { "graph", posix_isgraph },
    188188        { "lower", islower },
    189         { "print", isprint },
    190         { "punct", ispunct },
     189        { "print", posix_isprint },
     190        { "punct", posix_ispunct },
    191191        { "space", isspace },
    192192        { "upper", isupper },
    193         { "xdigit", isxdigit }
     193        { "xdigit", posix_isxdigit }
    194194};
    195195
     
    204204{
    205205        const struct _char_class *class = elem;
    206         return strcmp((const char *) key, class->name);
     206        return posix_strcmp((const char *) key, class->name);
    207207}
    208208
     
    217217{
    218218        /* 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,
    220220            sizeof(_char_classes) / sizeof(struct _char_class),
    221221            sizeof(struct _char_class), _class_compare);
     
    549549                        end = string;
    550550                } else {
    551                         end = strchrnul(string, pathname ? '/' : '\0');
     551                        end = gnu_strchrnul(string, pathname ? '/' : '\0');
    552552                }
    553553
     
    581581{
    582582        assert(s != NULL);
    583         char *result = strdup(s);
     583        char *result = posix_strdup(s);
    584584        for (char *i = result; *i != '\0'; ++i) {
    585585                *i = tolower(*i);
Note: See TracChangeset for help on using the changeset viewer.