/*Source Code From Bernard Carré and Laure Gonnord */ #include #include #include #include #include "trees.h" #define MAX_STRING 255 // Main -- Do not modify ! // iterate the process: load, print (Part 1) and then generate_dot (Part 2) on the n files_names void handle(int n, char *file_names[]); // main - usage: main ... int main (int argc, char *argv[]) { if (argc < 2) { fprintf(stderr, "usage: main \n"); } else { handle(argc-1, &argv[1]); // handle the files } return 0; } // utility: build a new file name dest from src whose extension is replaced by the parameter ext // for example : file.txt -> file.dot void build_name(char *src, char *dest, char *ext); // iterate the process: load, print (Part 1) and then generate_dot (Part 2) on the n files_names void handle(int n, char *file_names[]) { Tree t; FILE *fp; int i; for (i=0; i file.dot void build_name(char *src, char *dest, char *ext) { strcpy(dest, src); strcpy(&dest[strlen(src)-4], ext); }