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
check_arg_mandatory.c File Reference
#include <stdio.h>
#include <string.h>
#include "utils.h"
#include "arg_parse.h"
Include dependency graph for check_arg_mandatory.c:

Go to the source code of this file.

Functions

int get_nb_mandatory_option (const struct option_list_s *opt_list)
 Get the number of mandatory options needed for the server.
 
int check_mandatory_set (int ac, const char **av, int nb_param, const struct option_list_s *opt_list)
 Check if there's every mandatory options in the arguments passed to the program.
 

Function Documentation

◆ check_mandatory_set()

int check_mandatory_set ( int ac,
const char ** av,
int nb_param,
const struct option_list_s * opt_list )

Check if there's every mandatory options in the arguments passed to the program.

Parameters
acNumber of arguments
avVariables passed as parameter to the program
nb_paramNumber of parameter
opt_listThe constant defined with every known command
Returns
(0) if there's enough parameter, (-1) if not

Definition at line 54 of file check_arg_mandatory.c.

◆ get_nb_mandatory_option()

int get_nb_mandatory_option ( const struct option_list_s * opt_list)

Get the number of mandatory options needed for the server.

Parameters
opt_listThe constant defined with every known command
Returns
5 because the zappy server has 5 mandatory function

Definition at line 14 of file check_arg_mandatory.c.