int no_blink = 0;
char input_filename[buffer_size], output_filename[buffer_size];
- strcpy(input_filename, "/dev/stdin");
+ strcpy(input_filename, "");
strcpy(output_filename, "/tmp/selector.out");
int i = 1;
}
else {
- cerr << argv[0] << " [-h] [-o <output filename>] [-b] [-l <max number of lines>] [-s <pattern separator>] [-v]" << endl;
+ cerr << argv[0]
+ << " [-h]"
+ << " [-b]"
+ << " [-v]"
+ << " [-o <output filename>]"
+ << " [-s <pattern separator>]"
+ << " [-l <max number of lines>]"
+ << " -f <input filename>"
+ << endl;
if(strcmp(argv[i], "-h") == 0) {
exit(0);
} else {
}
}
+ if(!input_filename[0]) {
+ cerr << "You must specify a input file with -f." << endl;
+ exit(1);
+ }
+
ifstream file(input_filename);
if(file.fail()) {