Skip to content

Commit

Permalink
added missing output function documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
likle committed Aug 1, 2020
1 parent 3108ca6 commit a6bd857
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 2 deletions.
28 changes: 28 additions & 0 deletions docs/reference/cag_option_print.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: cag_option_print
description: Prints all options to the terminal.
---

_(since v1.0.0)_
description: Prints all options to the terminal.

## Description
```c
void cag_option_print(const cag_option *options, size_t option_count,
FILE *destination);
```
This function prints all options to the terminal. This can be used to generate
the output for a "--help" option.
## Parameters
* **options**: The options which will be printed.
* **option_count**: The option count which will be printed.
* **destination**: The destination where the output will be printed.
## Changelog
| Version | Description |
|------------|--------------------------------------------------------|
| **v1.0.0** | The function is introduced. |
7 changes: 7 additions & 0 deletions docs/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@ Gets the value from the option.

* **[cag_option_get_index]({{ site.baseurl }}{% link reference/cag_option_get_index.md %})**
Gets the current index of the context.

## Output
This section describes functions which are used to output argument information.

### Functions
* **[cag_option_print]({{ site.baseurl }}{% link reference/cag_option_print.md %})**
Prints all options to the terminal.
4 changes: 2 additions & 2 deletions include/cargs.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ typedef struct cag_option_context
/**
* @brief Prints all options to the terminal.
*
* This function prints all options to the terminal. This is used to generate
* the output for a "--help" option.
* This function prints all options to the terminal. This can be used to
* generate the output for a "--help" option.
*
* @param options The options which will be printed.
* @param option_count The option count which will be printed.
Expand Down

0 comments on commit a6bd857

Please sign in to comment.