Ignore:
File:
1 edited

Legend:

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

    ra43fbc95 ra12f7f1  
    3030 * @{
    3131 */
    32 /** @file
     32/** @file Filename-matching.
    3333 */
    3434
     
    4545#include "internal/common.h"
    4646#include "fnmatch.h"
     47
     48// TODO: documentation
    4749
    4850#define INVALID_PATTERN -1
     
    169171};
    170172
     173/**
     174 *
     175 * @param key
     176 * @param elem
     177 * @return
     178 */
    171179static int _class_compare(const void *key, const void *elem)
    172180{
     
    175183}
    176184
     185/**
     186 *
     187 * @param cname
     188 * @param c
     189 * @return
     190 */
    177191static bool _is_in_class (const char *cname, int c)
    178192{
     
    191205}
    192206
     207/**
     208 *
     209 * @param pattern
     210 * @param str
     211 * @param flags
     212 * @return
     213 */
    193214static int _match_char_class(const char **pattern, const char *str, int flags)
    194215{
     
    204225/************** END CHARACTER CLASSES ****************/
    205226
     227/**
     228 *
     229 * @param pattern
     230 * @param flags
     231 * @return
     232 */
    206233static _coll_elm_t _next_coll_elm(const char **pattern, int flags)
    207234{
     
    240267
    241268/**
    242  *
     269 *
     270 * @param pattern
     271 * @param str
     272 * @param flags
     273 * @return
    243274 */
    244275static int _match_bracket_expr(const char **pattern, const char *str, int flags)
     
    327358
    328359/**
    329  *
     360 *
     361 * @param pattern
     362 * @param string
     363 * @param flags
     364 * @return
    330365 */
    331366static bool _partial_match(const char **pattern, const char **string, int flags)
     
    421456}
    422457
     458/**
     459 *
     460 * @param pattern
     461 * @param string
     462 * @param flags
     463 * @return
     464 */
    423465static bool _full_match(const char *pattern, const char *string, int flags)
    424466{
     
    476518}
    477519
     520/**
     521 *
     522 * @param s
     523 * @return
     524 */
    478525static char *_casefold(const char *s)
    479526{
     
    506553
    507554        if ((flags & FNM_CASEFOLD) != 0) {
    508                 free((char *) pattern);
    509                 free((char *) string);
     555                if (pattern) {
     556                        free((char *) pattern);
     557                }
     558                if (string) {
     559                        free((char *) string);
     560                }
    510561        }
    511562
     
    604655/** @}
    605656 */
    606 
Note: See TracChangeset for help on using the changeset viewer.