#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+Cgp2b2lkIHNob3dmaWxlXyhGSUxFICpmKQp7CiAgICBjaGFyIGxpbmVbNjU1MzZdOwogICAgaW50IGkgPSAxOwogICAgd2hpbGUgKGZnZXRzKGxpbmUsIDY1NTM2LCBmKSAhPSBOVUxMKQogICAgewogICAgICAgIHByaW50ZigiJWQ6JXMiLCBpLCBsaW5lKTsKICAgICAgICBpKys7CiAgICB9Cn0KCnZvaWQgc2hvd2ZpbGUoY2hhciogZmlsZW5hbWUpCnsKICAgIEZJTEUgKmYgPSBmb3BlbihmaWxlbmFtZSwgInIiKTsKICAgIGlmIChmICE9IE5VTEwpCiAgICB7CiAgICAgICAgc2hvd2ZpbGVfKGYpOwogICAgICAgIGZjbG9zZShmKTsKICAgIH0KfQoKaW50IG1haW4odm9pZCkKewogICAgY2hhciBmaWxlbmFtZVsyNTZdOwogICAgcHJpbnRmKCJQbGVhc2UgaW5wdXQgZmlsZW5hbWUuLi4iKTsKICAgIHNjYW5mKCIlcyIsIGZpbGVuYW1lKTsKICAgIHNob3dmaWxlKGZpbGVuYW1lKTsKICAgIAogICAgcmV0dXJuIDA7Cn0K