Zappy - Year end project 2
This is a project that Epitech asked us to create in order to allow us to reveiw the notions of the current year.
Loading...
Searching...
No Matches
Functions
arg_parse.c File Reference
#include <string.h>
#include "utils.h"
#include "arg_parse.h"
Include dependency graph for arg_parse.c:

Go to the source code of this file.

Functions

int get_arg_value (int ac, const char **av, const struct option_s *param, struct arg_s **arg)
 Get the variables of a parameter and store it in arg_s structure.
 
struct arg_s ** get_zappy_args (int ac, const char **av, const struct option_list_s *opt_l)
 The principal function to get every arguments.
 

Function Documentation

◆ get_arg_value()

int get_arg_value ( int ac,
const char ** av,
const struct option_s * param,
struct arg_s ** arg )

Get the variables of a parameter and store it in arg_s structure.

Parameters
acNumber of arguments
avVariables passed as parameter to the program
paramA intermediaire structure (option_s) before store it in arg_s structure
argThe structure where parameters and parameters value are stored
Returns
(0) if values are stored successfully, (-1) if not

Definition at line 50 of file arg_parse.c.

◆ get_zappy_args()

struct arg_s ** get_zappy_args ( int ac,
const char ** av,
const struct option_list_s * opt_l )

The principal function to get every arguments.

Parameters
acNumber of arguments
avVariables passed as parameter to the program
paramA intermediaire structure (option_s) before store it in arg_s structure
Returns
arg_s the structure where parameters and parameters value are stored

Definition at line 89 of file arg_parse.c.