「🏗️」 wip: added the print message
This commit is contained in:
@ -1,5 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct {
|
||||
char *name;
|
||||
char opt;
|
||||
char *doc;
|
||||
} options_t;
|
||||
|
||||
static options_t options[] = {
|
||||
{
|
||||
"help",
|
||||
'?',
|
||||
"give this help list"
|
||||
},
|
||||
{
|
||||
"verbose",
|
||||
'v',
|
||||
"verbose output"
|
||||
}
|
||||
};
|
||||
|
||||
#define OPT_NB 2
|
||||
|
||||
#define FT_PING_V 0.1
|
||||
|
||||
/**
|
||||
* @brief Can be used to print the help message if no host (or addr) are
|
||||
* provided
|
||||
|
@ -1,11 +1,13 @@
|
||||
#pragma once
|
||||
|
||||
typedef struct {
|
||||
#include <stdbool.h>
|
||||
|
||||
typedef struct {
|
||||
bool verbose;
|
||||
} args_t;
|
||||
|
||||
/**
|
||||
* @brief Can be used to parse the command line options
|
||||
* @param av The argv of the program
|
||||
*/
|
||||
int opt_parse(char **av, args_t *args);
|
||||
int opt_parse(char **av, args_t *args);
|
||||
|
Reference in New Issue
Block a user