diff options
author | sanine <sanine.not@pm.me> | 2022-08-24 00:02:17 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-08-24 00:02:17 -0500 |
commit | 2cb3c3df4099297b0a0554bb482e2de04fe86b5c (patch) | |
tree | 7796b4064c16460d9d603707b5256027649aa8b6 /libs/cargs/docs/reference/cag_option_prepare.md | |
parent | 709e1b6e1ce86f8da4fc136747fcefbc6c6057bd (diff) |
add command-line arguments
Diffstat (limited to 'libs/cargs/docs/reference/cag_option_prepare.md')
-rw-r--r-- | libs/cargs/docs/reference/cag_option_prepare.md | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libs/cargs/docs/reference/cag_option_prepare.md b/libs/cargs/docs/reference/cag_option_prepare.md new file mode 100644 index 0000000..c9aa9e5 --- /dev/null +++ b/libs/cargs/docs/reference/cag_option_prepare.md @@ -0,0 +1,30 @@ +---
+title: cag_option_prepare
+description: Prepare argument options context for parsing.
+---
+
+_(since v1.0.0)_
+Prepare argument options context for parsing.
+
+## Description
+```c
+void cag_option_prepare(cag_option_context *context, const cag_option *options,
+ size_t option_count, int argc, char **argv);
+```
+
+This function prepares the context for iteration and initializes the context
+with the supplied options and arguments. After the context has been prepared,
+it can be used to fetch arguments from it.
+
+## Parameters
+ * **context**: The context which will be initialized.
+ * **options**: The registered options which are available for the program.
+ * **option_count**: The amount of options which are available for the program.
+ * **argc**: The amount of arguments the user supplied in the main function.
+ * **argv**: A pointer to the arguments of the main function.
+
+## Changelog
+
+| Version | Description |
+|------------|--------------------------------------------------------|
+| **v1.0.0** | The function is introduced. |
|