Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include "Codage_Decodage.h"
- #include "analyse_syntax.h"
- int main(int argc, char *argv[])
- {
- /* Test de codage
- char clef[]="chute";
- cript_decript(clef, "test.txt", "test2.txt");*/
- int pos;
- /*vérification si la balise -k a été saisie*/
- char baliseclef[]= "-k";
- pos = analyse(argc,argv,baliseclef);
- if (pos == -1)
- {
- printf("ERROR: command line\n");
- exit(EXIT_FAILURE) ;
- }
- char *clef = argv[pos+1];
- /*vérification si la balise -o a été saisie*/
- char baliseficho[]= "-o";
- pos = analyse(argc,argv,baliseficho);
- if (pos == -1)
- {
- printf("ERROR: command line\n");
- exit(EXIT_FAILURE) ;
- }
- char *fichierOUT = argv[pos+1];
- /*vérification si la balise -i a été saisie*/
- char balisefichi[]= "-i";
- pos = analyse(argc,argv,balisefichi);
- if (pos == -1)
- {
- printf("ERROR: command line\n");
- exit(EXIT_FAILURE) ;
- }
- char *fichierIN = argv[pos+1];
- /* criptage à partir du script*/
- cript_decript(clef,fichierIN,fichierOUT);
- return 0;
- }
Add Comment
Please, Sign In to add comment