--- a/commandline.cpp +++ b/commandline.cpp @@ -537,21 +537,18 @@ bool CommandLine::Parse(int argc, char *argv[]) else { list *filenames; + filenames = new list; - // If the argument includes wildcard characters, - // search the disk for matching files - if (strchr(argv[0], '*') || strchr(argv[0], '?')) + if (argv[0][0] == '-') { - string path; - string name; - DiskFile::SplitFilename(argv[0], path, name); - - filenames = DiskFile::FindFiles(path, name); - } - else - { - filenames = new list; - filenames->push_back(argv[0]); + while(true) + { + string filename; + if (std::getline(cin, filename)) + filenames->push_back(filename); + else + break; + } } list::iterator fn = filenames->begin();