main.c~
795 Bytes
// --------------------------------------------------------
// Projet IMA3 2019 - Lecture d'une bibliothèque
// Décompte du nombre de fautes d'orthographe dans un texte
// Normand Quentin & Rouillé Guillaume
// --------------------------------------------------------
#include "tree.h"
int main(int argc, char *argv[])
{
Node tree = NULL;
int error = 0;
FILE* fp_lib;
FILE* fp_txt;
fp_lib = fopen(argv[argc-2], "r");
fp_txt = fopen(argv[argc-1], "r");
init_tree(&tree);
read_lib(fp_lib, &tree);
read_txt(fp_txt, &tree, &error);
// printf("%p\n", tree);
//print_first(tree);
//printf("\n");
//print_tree(tree, 0);
printf("erreurs : %d\n", error);
free_tree(&tree);
free(fp_lib);
free(fp_txt);
return EXIT_SUCCESS;
}