Welcome to little lamb

Code » limb » release » tree

[release] / src / doc / command.h / dienocommand.3.md

% limb manual
% dienocommand(3)
% limb 0.1.0
% 2023-07-24

# NAME

dienocommand - terminate a process execution showing the application's help
screen, or the usage line

# SYNOPSIS

    #include <limb/command.h>

```pre hl
void dienocommand(int <em>exit</em>, const char *<em>usage</em>, const char *<em>help</em>)
```

# DESCRIPTION

The `dienocommand`() function will show the application's help screen if `help`
is not NULL, else a simple usage line.

In the later case, [dieusage](3) is called with the given `exit` and `usage`
arguments.

In the former case, [errhelp](3) is used to show the given `usage` and `help`,
after which the list of all available commands - name and description - is
shown. It then terminate process execution with a return code of 0.
Said list is established using the `commands` array as described in
[command.h](0).

This function never returns.