Commit 0382d96c authored by thomas.forbriger's avatar thomas.forbriger
Browse files

ts/wf/cross [FIX][!!!][API]: make output file name last on command line

In order to be compatible with the previous version, the output file is again
defined to be last on the command line.
parent 6a1dbde4
......@@ -75,7 +75,7 @@ int main(int iargc, char* argv[])
"usage: cross [-v] [-o] [-D] [-convolve] [--itype t] [--otype f]\n"
" outfile file [f:F] [t:T] [file [f:F] [t:T] [...]]\n"
" file [f:F] [t:T] [file [f:F] [t:T] [...]] outfile\n"
" or: cross --help|-h" "\n"
" or: cross --xhelp" "\n"
......@@ -90,12 +90,12 @@ int main(int iargc, char* argv[])
"-itype t file format for input files\n"
"-otype t file format for output files\n"
"outfile output file" "\n"
"file ... input file(s)" "\n"
" t:T select traces T, where T may be any range\n"
" specification like '3-4' or '5,6,7-12,20'\n"
" f:F specifies an input file format differing from\n"
" the format selected by \"--itype\"\n"
"outfile output file" "\n"
"--xhelp print details on supported I/O formats\n"
......@@ -181,9 +181,12 @@ int main(int iargc, char* argv[])
if (opt.verbose) { cout << CROSS_VERSION << endl; }
TFXX_assert(cmdline.extra(), "missing input file!");
TFXX_assert(cmdline.extra(), "missing output file!");
tfxx::cmdline::Tparsed arguments=parse_cmdline(cmdline, cmdlinekeys);
TFXX_assert(arguments.size()>1, "missing output file!");
// extract output file name and remove from list
std::string outfile=arguments.back().name;
if ((arguments.size()>1) && opt.verbose)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment