#include #include "sb.h" FILE* getfile(int argc, char** argv){ if (argc >= 2) return fopen(argv[1], "r"); else return stdin; } FILE* in; int main(int argc, char** argv){ int c; in = getfile(argc, argv); if (in == NULL){ perror(argv[1]); return 1; } while ( (c = fgetc(in)) != EOF){ } }