Changeset eccd20e6 in mainline for uspace/lib/posix/fnmatch.c
- Timestamp:
- 2011-07-21T22:34:14Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c6f4681, e478cebf
- Parents:
- df0956ee (diff), cfbb5d18 (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 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/posix/fnmatch.c
rdf0956ee reccd20e6 30 30 * @{ 31 31 */ 32 /** @file 32 /** @file Filename-matching. 33 33 */ 34 34 … … 45 45 #include "internal/common.h" 46 46 #include "fnmatch.h" 47 48 // TODO: documentation 47 49 48 50 #define INVALID_PATTERN -1 … … 169 171 }; 170 172 173 /** 174 * 175 * @param key 176 * @param elem 177 * @return 178 */ 171 179 static int _class_compare(const void *key, const void *elem) 172 180 { … … 175 183 } 176 184 185 /** 186 * 187 * @param cname 188 * @param c 189 * @return 190 */ 177 191 static bool _is_in_class (const char *cname, int c) 178 192 { … … 191 205 } 192 206 207 /** 208 * 209 * @param pattern 210 * @param str 211 * @param flags 212 * @return 213 */ 193 214 static int _match_char_class(const char **pattern, const char *str, int flags) 194 215 { … … 204 225 /************** END CHARACTER CLASSES ****************/ 205 226 227 /** 228 * 229 * @param pattern 230 * @param flags 231 * @return 232 */ 206 233 static _coll_elm_t _next_coll_elm(const char **pattern, int flags) 207 234 { … … 240 267 241 268 /** 242 * 269 * 270 * @param pattern 271 * @param str 272 * @param flags 273 * @return 243 274 */ 244 275 static int _match_bracket_expr(const char **pattern, const char *str, int flags) … … 327 358 328 359 /** 329 * 360 * 361 * @param pattern 362 * @param string 363 * @param flags 364 * @return 330 365 */ 331 366 static bool _partial_match(const char **pattern, const char **string, int flags) … … 421 456 } 422 457 458 /** 459 * 460 * @param pattern 461 * @param string 462 * @param flags 463 * @return 464 */ 423 465 static bool _full_match(const char *pattern, const char *string, int flags) 424 466 { … … 476 518 } 477 519 520 /** 521 * 522 * @param s 523 * @return 524 */ 478 525 static char *_casefold(const char *s) 479 526 { … … 506 553 507 554 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 } 510 561 } 511 562 … … 604 655 /** @} 605 656 */ 606
Note:
See TracChangeset
for help on using the changeset viewer.