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


Ignore:
Timestamp:
2012-09-04T12:44:40Z (13 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
32b3a12
Parents:
f8cbe2c3
Message:

libposix: less includes from libc

File:
1 edited

Legend:

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

    rf8cbe2c3 rbaeeee2  
    4242 */
    4343
     44#define LIBPOSIX_INTERNAL
     45
    4446#include "posix/stdbool.h"
    4547#include "posix/ctype.h"
     
    4749#include "posix/stdlib.h"
    4850#include "posix/assert.h"
    49 
    50 #define LIBPOSIX_INTERNAL
    5151
    5252#include "internal/common.h"
     
    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.