int main(int argc, char **argv) { t_list *l; int a = 4; int b = 3; int c = 2; l = ft_list_push_params(argc, argv); printf("inainte:"); ft_putlist(l, 2, 1); ft_list_reverse(&l); printf("dupa:"); ft_putlist(l, 2, 1); return (0); }
int ft_processkey(t_key key, t_term term, t_ldcd lst, t_ldcd_cell *cur) { int status; struct winsize wins; status = 2; if (key[0] == '\254' && isatty(1)) { signal(SIGTSTP, SIG_DFL); ft_sigh_treat(term, term->term_p.c_cc[VSUSP], 0); } if (key[0] == '\254' && isatty(1)) ft_termrest(term, lst); else if (key[0] == '\253') return (ft_sigh_treat(term, term->term_p.c_cc[VKILL], 1)); else if (key[0] == '\252') return (ft_sigh_treat(term, term->term_p.c_cc[VQUIT], 1)); else if (key[0] == '\251') { ioctl(0, TIOCGWINSZ, &wins); term->li = wins.ws_row; term->co = wins.ws_col; ft_termclear(term); ft_putlist(lst, term); return (1); } else if (key[1] == 0 && key[2] == 0 && key[3] == 0) return (ft_classickeypress(lst, key, cur)); else if (key[0] == 27 && key[1] == 91) return (ft_specialkeypress(lst, key, cur)); return (2); }
void normal_execution(t_list *map, t_room *room, t_chain *network) { t_list *begin; begin = map; network = ft_find_way(room); if (network) { while (!ft_isnumber(begin->data)) begin = begin->next; ft_putlist(map); ft_putchar('\n'); ft_resolver(&network, ft_atoi(begin->data), room); } }