main.c 663 Bytes
#include "fonctions.h"

#define A 256

int main(int argc, char* argv[]) {

 
  setlocale(LC_ALL, "");
  FILE* dico = NULL;
  FILE* txt = NULL;
  struct node tab_arbre[A];
  
  if(argc>2) {
    dico = fopen(argv[1], "r");
    txt = fopen(argv[2], "r");
  }
  else {
    dico = NULL;
    txt = NULL;
  }
  if ((dico == NULL) || (txt == NULL)) {
        wprintf(L"Erreur : il manque un ou plusieurs fichiers !\n");
        return 1;
    }
  initialisation_tab_arbre(tab_arbre);
  remplir_dico(dico, tab_arbre);

  correction_txt(txt, tab_arbre);
  correction_mot(tab_arbre);
  desallocationTableauArbre(tab_arbre); 

  wprintf(L"Fin du programme\n");

  return 0;
}