}
if (fp) {
if (need_headers) {
- fprintf(stdout, "==> %s <==\n", argv[optind]);
+ printf("==> %s <==\n", argv[optind]);
}
head(len, fp);
if (errno) {
- error_msg("%s: %s\n", argv[optind], strerror(errno));
+ perror_msg("%s", argv[optind]);
status = EXIT_FAILURE;
errno = 0;
}
if (optind < argc - 1)
- fprintf(stdout, "\n");
+ putchar('\n');
if (fp != stdin)
fclose(fp);
}