#include <stdio.h>
#include <stdlib.h>
void task_main(FILE *fp1, FILE *fp2) {
int c1, c2;
while ((c1
= fgetc(fp1
)) != EOF
) { if ((c2
= fgetc(fp2
)) == EOF
) break;
if (c1 == c2)
else
}
}
int main(int argc, char *argv[]) {
FILE *fp1, *fp2;
if (argc != 3) {
fprintf(stderr
, "usage: %s <file1> <file2>\n", argv
[0]); }
if ((fp1
= fopen(argv
[1], "r")) != 0) { if ((fp2
= fopen(argv
[2], "r")) != 0) { task_main(fp1, fp2);
} else {
fprintf(stderr
, "cannot open the file '%s'.\n", argv
[2]); }
} else {
fprintf(stderr
, "cannot open the file '%s'.\n", argv
[1]); }
return 0;
}
/* end */
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KCnZvaWQgdGFza19tYWluKEZJTEUgKmZwMSwgRklMRSAqZnAyKSB7CiAgaW50IGMxLCBjMjsKICB3aGlsZSAoKGMxID0gZmdldGMoZnAxKSkgIT0gRU9GKSB7CiAgICBpZiAoKGMyID0gZmdldGMoZnAyKSkgPT0gRU9GKQogICAgICBicmVhazsKICAgIGlmIChjMSA9PSBjMikKICAgICAgZnB1dGMoJzEnLCBzdGRvdXQpOwogICAgZWxzZQogICAgICBmcHV0YygnMCcsIHN0ZG91dCk7CiAgfQp9CgppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqYXJndltdKSB7CiAgRklMRSAqZnAxLCAqZnAyOwogIGlmIChhcmdjICE9IDMpIHsKICAgIGZwcmludGYoc3RkZXJyLCAidXNhZ2U6ICVzIDxmaWxlMT4gPGZpbGUyPlxuIiwgYXJndlswXSk7CiAgICBleGl0KDEpOwogIH0KICBpZiAoKGZwMSA9IGZvcGVuKGFyZ3ZbMV0sICJyIikpICE9IDApIHsKICAgIGlmICgoZnAyID0gZm9wZW4oYXJndlsyXSwgInIiKSkgIT0gMCkgewogICAgICB0YXNrX21haW4oZnAxLCBmcDIpOwogICAgICBmY2xvc2UoZnAyKTsKICAgIH0gZWxzZSB7CiAgICAgIGZwcmludGYoc3RkZXJyLCAiY2Fubm90IG9wZW4gdGhlIGZpbGUgJyVzJy5cbiIsIGFyZ3ZbMl0pOwogICAgfQogICAgZmNsb3NlKGZwMSk7CiAgfSBlbHNlIHsKICAgIGZwcmludGYoc3RkZXJyLCAiY2Fubm90IG9wZW4gdGhlIGZpbGUgJyVzJy5cbiIsIGFyZ3ZbMV0pOwogIH0KICByZXR1cm4gMDsKfQovKiBlbmQgKi8K