// Copyright 2008 Crip5 Dominique Pastre #include #include main(argc,argv) int argc; char *argv[]; { char cmd[256]; // pour construire la commande (chaine de caractères) strcpy(cmd,"pl -f muscadet-fr -g true "); if (argc <= 0) { //printf("commande generee : \n%s",cmd); system(cmd); // pour exécuter la commande return; } if (argc >= 2 ) { strcat(cmd," < /dev/null \n tptp('"); // tptp(' strcat(cmd, argv[1]); // ChouNom strcat(cmd,"'"); // ' if (argc >= 3) { strcat(cmd,","); // , strcat(cmd, argv[2]); // i ou temps } if (argc >= 4) { strcat(cmd,","); // , strcat(cmd, argv[3]); // j } if (argc >= 5) { strcat(cmd,","); // , strcat(cmd, argv[4]); // temps printf("temps=%s",argv[4]); } if (argc > 6) printf("il y a trop de paramètres"); strcat(cmd, "). \n halt. \n ! "); // a quoi sert le ! ? // ). printf("\ncommande generee : \n%s\n",cmd); // halt. } // else strcpy(cmd, "more menu-tptp"); system(cmd); // pour exécuter la commande // !. return; }