#include <stdio.h>
void showfile_(FILE *f)
{
char line[65536];
int i = 1;
while (fgets(line
, 65536, f
) != NULL
) {
i++;
}
}
void showfile(char* filename)
{
FILE
*f
= fopen(filename
, "r"); if (f != NULL)
{
showfile_(f);
}
}
int main(void)
{
char filename[256];
printf("Please input filename..."); showfile(filename);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Cgp2b2lkIHNob3dmaWxlXyhGSUxFICpmKQp7CiAgICBjaGFyIGxpbmVbNjU1MzZdOwogICAgaW50IGkgPSAxOwogICAgd2hpbGUgKGZnZXRzKGxpbmUsIDY1NTM2LCBmKSAhPSBOVUxMKQogICAgewogICAgICAgIHByaW50ZigiJTNkOiVzIiwgaSwgbGluZSk7CiAgICAgICAgaSsrOwogICAgfQp9Cgp2b2lkIHNob3dmaWxlKGNoYXIqIGZpbGVuYW1lKQp7CiAgICBGSUxFICpmID0gZm9wZW4oZmlsZW5hbWUsICJyIik7CiAgICBpZiAoZiAhPSBOVUxMKQogICAgewogICAgICAgIHNob3dmaWxlXyhmKTsKICAgICAgICBmY2xvc2UoZik7CiAgICB9Cn0KCmludCBtYWluKHZvaWQpCnsKICAgIGNoYXIgZmlsZW5hbWVbMjU2XTsKICAgIHByaW50ZigiUGxlYXNlIGlucHV0IGZpbGVuYW1lLi4uIik7CiAgICBzY2FuZigiJXMiLCBmaWxlbmFtZSk7CiAgICBzaG93ZmlsZShmaWxlbmFtZSk7CiAgICAKICAgIHJldHVybiAwOwp9Cg==