/* See LICENSE file for copyright and license details. */ #include #include #include #include "text.h" #include "util.h" int main(int argc, char *argv[]) { FILE *fp; if(getopt(argc, argv, "") != -1) exit(EXIT_FAILURE); if(optind == argc) concat(stdin, "", stdout, ""); else for(; optind < argc; optind++) { if(!(fp = fopen(argv[optind], "r"))) eprintf("fopen %s:", argv[optind]); concat(fp, argv[optind], stdout, ""); fclose(fp); } return EXIT_SUCCESS; }