Read filenames from stdin

This commit is contained in:
Bert
2011-02-14 17:51:04 +01:00
parent ea65610747
commit 26cc5aff69
6 changed files with 64 additions and 12 deletions

View File

@ -19,6 +19,7 @@
#define _XOPEN_SOURCE
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
@ -106,4 +107,6 @@ void parse_options(int argc, char **argv) {
_options.filenames = (const char**) argv + optind;
_options.filecnt = argc - optind;
_options.from_stdin = _options.filecnt == 1 &&
strcmp(_options.filenames[0], "-") == 0;
}