int main(int argc, char **argv, char **envp) { t_tabnfo *tabnfo; t_maxsquare *maxsquare; argc = argc; if (load_termcaps(envp) == -1) return (-1); if ((tabnfo = malloc(sizeof(t_tabnfo))) == NULL) return (-1); if ((maxsquare = malloc(sizeof(t_maxsquare))) == NULL) return (-1); if (make_tab(argv[1], tabnfo) == -1) return (-1); if (check_tab(tabnfo) == -1) return (-1); if (find_maxsquare(tabnfo, maxsquare) == -1) { my_printf("no possible square"); return (-1); } my_printf("FOUND:\n"); make_maxsquare(tabnfo, maxsquare); display_tab(tabnfo); free_tabnfo(tabnfo); return (0); }
int main(int argc, char**argv){; tm_topology_t *topology; int nb_cores; double **arch; if(argc<2){ fprintf(stderr,"Usage: %s <Architecture tgt>\n",argv[0]); return -1; } topology=tgt_to_tm(argv[1],&arch); nb_cores=nb_nodes(topology); display_tab(arch,nb_cores); FREE_topology(topology); FREE(arch); return 0; }
int main(int ac, char **av) { int i; i = 0; if (ac != 10 || count_chars(av) == 0) fprintf(stderr, "%s\n", usage); else { while (++i < 10) { if (!check_chars(av[i])) { fprintf(stderr, "%s\n", "sudoku need 10 row"); return (0); } } if (resolve(av, 0)) display_tab(av); else fprintf(stderr, "%s\n", "resolve failed"); } return (0); }