「🏗️」 wip: started the parsing of the args
This commit is contained in:
23
src/main.c
23
src/main.c
@ -1,5 +1,22 @@
|
||||
#include <stdio.h>
|
||||
#include "sysexits.h"
|
||||
#include <help.h>
|
||||
#include <opt_parse.h>
|
||||
#include <ping.h>
|
||||
|
||||
int main(void){
|
||||
printf("asdf asdfa");
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(int ac, char **av) {
|
||||
args_t args;
|
||||
if (ac > 1) {
|
||||
int ret = opt_parse(av, &args);
|
||||
if (ret != EXIT_SUCCESS)
|
||||
return ret;
|
||||
else
|
||||
return EXIT_SUCCESS;
|
||||
} else {
|
||||
print_no_host(*av);
|
||||
return EX_USAGE;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user