int main(int ac, char **av) { struct termios term; t_data d; t_list *list; if (ac <= 1) return (0); list = NULL; d.max_row = --ac; d.pos_init = d.max_row; d.pos = d.pos_init; list = ft_make_list(av, &d); if (ft_set_stage(ac, &term)) ft_get_size(&d); make_header(&d); get_col_nb(&d); ft_signals(); print_multi_tab(list, &d); tputs(tgetstr("vi", NULL), 1, tputs_putchar); d.us = 1; ft_while(&d, &term, list); tputs(tgetstr("ve", NULL), 1, tputs_putchar); return (0); }
int main(int ac, char **av) { if (ac < 2) ft_exit("Usage : ./lemipc <team>\n"); ft_signals(); lemipc(ac, av); return (0); }
int main(int ac, char **av) { ft_memset(&e, 0, sizeof(e)); e.prog = ft_strrchr(av[0], '/'); e.prog = (e.prog == NULL) ? av[0] : e.prog + 1; if (setuid(getuid())) { fprintf(stderr, "%s: setuid\n", e.prog); exit(-1); } e.outpack = e.outpackhdr + sizeof(struct ip); e.datalen = DEFDATALEN; e.interval = 1; e.ttl = 64; ac = ft_options(av); if (!av[ac]) ft_usage(0); ft_memcpy(e.hostname, av[ac], sizeof(e.hostname)); ft_init(); ft_signals(); ft_setup(); return (0); }