#include #include #define SIZE 5000 int main(int argc, char **argv) { char s[SIZE], dn[SIZE], cmd[SIZE], do_diff[SIZE] ; FILE *fd, *comp; int done; fd = fopen("Txt.all.theme","r"); while (1) { fgets(s, SIZE, fd); if (strncmp(s," ",10) == 0) { (void) strncpy(dn,&s[10], strlen(s)-11); comp = fopen("A","r+"); done = 0; while (!done) { fgets(s, SIZE, fd); if (strncmp(s," ",10) == 0) { done = 1; } else fprintf(comp,"%s",s); } sprintf(do_diff,"diff A %s/Txt",dn); printf("%s\n",do_diff); system(do_diff); fclose(comp); } } }