Skip to content

Commit 8c75b51

Browse files
committed
posix: c_lib_ext: fnmatch: added Doxygen
Added Doxygen on new functions and on fnmatch function Signed-off-by: Harun Spago <harun.spago.code@gmail.com>
1 parent d68d00c commit 8c75b51

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

include/zephyr/posix/fnmatch.h

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,34 @@
3636
#ifndef _FNMATCH_H_
3737
#define _FNMATCH_H_
3838

39-
#define FNM_NOMATCH 1 /* Match failed. */
39+
#define FNM_NOMATCH 1 /**< Match failed */
4040
#define FNM_NOSYS 2 /* Function not implemented. */
4141
#define FNM_NORES 3 /* Out of resources */
4242

43-
#define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */
44-
#define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */
45-
#define FNM_PERIOD 0x04 /* Period must be matched by period. */
46-
#define FNM_CASEFOLD 0x08 /* Pattern is matched case-insensitive */
47-
#define FNM_LEADING_DIR 0x10 /* Ignore /<tail> after Imatch. */
43+
#define FNM_NOESCAPE 0x01 /**< Disable backslash escaping */
44+
#define FNM_PATHNAME 0x02 /**< Slash must be matched by slash */
45+
#define FNM_PERIOD 0x04 /**< Period must be matched by period */
46+
#define FNM_CASEFOLD 0x08 /**< Pattern is matched case-insensitive */
47+
#define FNM_LEADING_DIR 0x10 /**< Only match the initial segment of a string up to the first '/' */
4848

4949
#ifdef __cplusplus
5050
extern "C" {
5151
#endif
5252

53-
int fnmatch(const char *, const char *, int);
53+
/**
54+
* @brief Check if a filename or input string matches a shell-style matching pattern.
55+
*
56+
* @param pattern pattern that is matched against @param string
57+
* @param string input string to match against @param pattern
58+
* @param flags flags used to signal special matching conditions such as @ref FNM_NOESCAPE
59+
*
60+
*
61+
* @retval 0 pattern found in string
62+
* @retval FNM_NOMATCH pattern not found in string
63+
* @retval FNM_NORES recursion limit reached
64+
* @retval FNM_NOSYS function not implemented
65+
*/
66+
int fnmatch(const char *pattern, const char *string, int flags);
5467

5568
#ifdef __cplusplus
5669
}

0 commit comments

Comments
 (0)