Commit f3d7311f authored by thomas.forbriger's avatar thomas.forbriger

ts/croposp [FEATURE]: report default arguments in usage

parent 2c2951f7
......@@ -37,6 +37,7 @@
* existence of these value shall not be checked in
* these cases; check for frequency array being smaller
* than 2 (rather than 1); add verbosity output
* - 24/06/2020 V1.4 report default arguments
*
* ============================================================================
*/
......@@ -44,7 +45,7 @@
* version string is set in croposp.h
*
#define CROPOSP_VERSION \
"CROPOSP V1.3 Cross power spectral density"
"CROPOSP V1.4 Cross power spectral density"
*/
#include "croposp.h"
......@@ -70,6 +71,14 @@ char reference_sleeman_et_al_2006[]=
" doi: 10.1785/0120050032\n"
" http://www.geo.uu.nl/~seismain/pdf/bssa06-inst.pdf (accessed 2019-01-25)\n" };
/* ---------------------------------------------------------------------- */
// report default value of command line argument
void reportdefault(std::ostream& os, const tfxx::cmdline::Declare& o)
{
os << "default argument to option \'-" << o.opt_string << "\':";
os << " \'" << o.arg_default << "\'" << endl;
} // void reportdefault(std::ostream& os, const tfxx::cmdline::Declare& o)
/* ====================================================================== */
int main(int iargc, char* argv[])
......@@ -272,6 +281,14 @@ int main(int iargc, char* argv[])
{
cerr << l << ": " << npsd_mode_label[l] << endl;
}
cerr << endl;
reportdefault(cerr, options[24]);
reportdefault(cerr, options[6]);
reportdefault(cerr, options[18]);
reportdefault(cerr, options[19]);
reportdefault(cerr, options[20]);
reportdefault(cerr, options[21]);
reportdefault(cerr, options[22]);
cerr << endl << endl;
cerr << "References" << endl
<< "----------" << endl;
......
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