Changeset 07b39338 in mainline for uspace/lib/posix/fnmatch.c


Ignore:
Timestamp:
2011-08-20T18:21:49Z (13 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6ab014d
Parents:
0cf27ee (diff), f00af83 (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 libposix.

File:
1 edited

Legend:

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

    r0cf27ee r07b39338  
    6666#define COLL_ELM_INVALID -1
    6767
    68 /** Get collating element matching a string.
    69  *
    70  * @param str
     68/**
     69 * Get collating element matching a string.
     70 *
     71 * @param str String representation of the element.
    7172 * @return Matching collating element or COLL_ELM_INVALID.
    7273 */
     
    7980}
    8081
    81 /** Get collating element matching a single character.
    82  *
    83  * @param c
    84  * @return
     82/**
     83 * Get collating element matching a single character.
     84 *
     85 * @param c Character representation of the element.
     86 * @return Matching collating element.
    8587 */
    8688static coll_elm_t _coll_elm_char(int c)
     
    8991}
    9092
    91 /** Match collating element with a beginning of a string.
    92  *
    93  * @param elm
    94  * @param str
     93/**
     94 * Match collating element with a beginning of a string.
     95 *
     96 * @param elm Collating element to match.
     97 * @param str String which beginning should match the element.
    9598 * @return 0 if the element doesn't match, or the number of characters matched.
    9699 */
     
    100103}
    101104
    102 /** Checks whether a string begins with a collating element in the given range.
    103  *  Ordering depends on the locale (if locales are supported).
     105/**
     106 * Checks whether a string begins with a collating element in the given range.
     107 * Ordering depends on the locale (if locales are supported).
    104108 *
    105109 * @param first First element of the range.
     
    114118}
    115119
    116 /** Read a string delimited by [? and ?].
     120/**
     121 * Read a string delimited by [? and ?].
    117122 *
    118123 * @param pattern Pointer to the string to read from. Its position is moved
     
    189194};
    190195
    191 /** Compare function for binary search in the _char_classes array.
     196/**
     197 * Compare function for binary search in the _char_classes array.
    192198 *
    193  * @param key
    194  * @param elem
    195  * @return
     199 * @param key Key of the searched element.
     200 * @param elem Element of _char_classes array.
     201 * @return Ordering indicator (-1 less than, 0 equal, 1 greater than).
    196202 */
    197203static int _class_compare(const void *key, const void *elem)
     
    201207}
    202208
    203 /** Returns whether the given character belongs to the specified character class.
     209/**
     210 * Returns whether the given character belongs to the specified character class.
    204211 *
    205212 * @param cname Name of the character class.
     
    223230}
    224231
    225 /** Tries to parse an initial part of the pattern as a character class pattern,
    226  *  and if successful, matches the beginning of the given string against the class.
     232/**
     233 * Tries to parse an initial part of the pattern as a character class pattern,
     234 * and if successful, matches the beginning of the given string against the class.
    227235 *
    228236 * @param pattern Pointer to the pattern to match. Must begin with a class
     
    248256/************** END CHARACTER CLASSES ****************/
    249257
    250 /** Reads the next collating element in the pattern, taking into account
    251  *  locale (if supported) and flags (see fnmatch()).
     258/**
     259 * Reads the next collating element in the pattern, taking into account
     260 * locale (if supported) and flags (see fnmatch()).
    252261 *
    253262 * @param pattern Pattern.
     
    299308}
    300309
    301 /** Matches the beginning of the given string against a bracket expression
    302  *  the pattern begins with.
     310/**
     311 * Matches the beginning of the given string against a bracket expression
     312 * the pattern begins with.
    303313 *
    304314 * @param pattern Pointer to the beginning of a bracket expression in a pattern.
     
    394404}
    395405
    396 /** Matches a portion of the pattern containing no asterisks (*) against
    397  *  the given string.
     406/**
     407 * Matches a portion of the pattern containing no asterisks (*) against
     408 * the given string.
    398409 *
    399410 * @param pattern Pointer to the unmatched portion of the pattern.
     
    497508}
    498509
    499 /** Match string against a pattern.
     510/**
     511 * Match string against a pattern.
    500512 *
    501513 * @param pattern Pattern.
     
    559571}
    560572
    561 /** Transform the entire string to lowercase.
     573/**
     574 * Transform the entire string to lowercase.
    562575 *
    563576 * @param s Input string.
     
    578591 * Filename pattern matching.
    579592 *
    580  * @param pattern
    581  * @param string
    582  * @param flags
    583  * @return
     593 * @param pattern Pattern to match the string against.
     594 * @param string Matched string.
     595 * @param flags Flags altering the matching of special characters
     596 *     (mainly for dot and slash).
     597 * @return Zero if the string matches the pattern, FNM_NOMATCH otherwise.
    584598 */
    585599int posix_fnmatch(const char *pattern, const char *string, int flags)
     
    610624}
    611625
    612 // FIXME: put the testcases somewhere else
     626// FIXME: put the testcases to the app/tester after fnmatch is included into libc
    613627
    614628#if 0
Note: See TracChangeset for help on using the changeset viewer.