Commit 6cd0d9d2 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

started new projects

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1853
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent ebc922fd
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.29 2005-07-11 17:14:56 tforb Exp $
# $Id: Makefile,v 1.30 2005-07-13 14:44:11 tforb Exp $
#
# Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
#
......@@ -40,7 +40,7 @@ all:
.PHONY: clean
clean: ;
-find . -name \*.bak | xargs --no-run-if-empty /bin/rm -v
-/bin/rm -vf flist *.o *.xxx.*
-/bin/rm -vf flist *.o *.xxx.* *.ps *~
flist: $(wildcard *.f *.inc Makefile *.cc)
echo $^ | tr ' ' '\n' | sort > $@
......@@ -144,7 +144,10 @@ fbl.s.xxx.fil: ; echo -e "DBG 0\nfbl 200,20,600\nend" > $@
FILTERS=lp2 hp2 lp1 hp1 fac add rev dif int avg tre hpb lpb han bp2 he2 le2 \
he1 le1 tid first fbl
ifdef filters
include $(addsuffix .xxx.rules,$(FILTERS))
endif
REF=sig.xxx.sff
cmp.%.ps: %.s.xxx.sff %.t.xxx.sff $(REF)
......
/*! \file resaseda.cc
* \brief resample seismic data
*
* ----------------------------------------------------------------------------
*
* $Id: resaseda.cc,v 1.1 2005-07-13 14:44:11 tforb Exp $
* \author Thomas Forbriger
* \date 13/07/2005
*
* resample seismic data
*
* Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 13/07/2005 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define RESASEDA_VERSION \
"RESASEDA V1.0 resample seismic data"
#define RESASEDA_CVSID \
"$Id: resaseda.cc,v 1.1 2005-07-13 14:44:11 tforb Exp $"
#include <iostream>
#include <tfxx/commandline.h>
using std::cout;
using std::cerr;
using std::endl;
int main(int iargc, char* argv[])
{
// define usage information
char usage_text[]=
{
RESASEDA_VERSION "\n"
"usage: resaseda" "\n"
" or: resaseda --help|-h" "\n"
};
// define full help text
char help_text[]=
{
RESASEDA_CVSID
};
// define commandline options
using namespace tfxx::cmdline;
static Declare options[]=
{
// 0: print help
{"help",arg_no,"-"},
// 1: verbose mode
{"v",arg_no,"-"},
{NULL}
};
// no arguments? print usage...
if (iargc<2)
{
cerr << usage_text << endl;
exit(0);
}
// collect options from commandline
Commandline cmdline(iargc, argv, options);
// help requested? print full help text...
if (cmdline.optset(0))
{
cerr << usage_text << endl;
cerr << help_text << endl;
exit(0);
}
// dummy operation: print option settings
for (int iopt=0; iopt<2; iopt++)
{
cout << "option: '" << options[iopt].opt_string << "'" << endl;
if (cmdline.optset(iopt)) { cout << " option was set"; }
else { cout << "option was not set"; }
cout << endl;
cout << " argument (string): '" << cmdline.string_arg(iopt) << "'" << endl;
cout << " argument (int): '" << cmdline.int_arg(iopt) << "'" << endl;
cout << " argument (long): '" << cmdline.long_arg(iopt) << "'" << endl;
cout << " argument (float): '" << cmdline.float_arg(iopt) << "'" << endl;
cout << " argument (double): '" << cmdline.double_arg(iopt) << "'" << endl;
cout << " argument (bool): '";
if (cmdline.bool_arg(iopt))
{ cout << "true"; } else { cout << "false"; }
cout << "'" << endl;
}
while (cmdline.extra()) { cout << cmdline.next() << endl; }
// dummy operation: print rest of command line
while (cmdline.extra()) { cout << cmdline.next() << endl; }
}
/* ----- END OF resaseda.cc ----- */
/*! \file teseco.cc
* \brief time series corrections
*
* ----------------------------------------------------------------------------
*
* $Id: teseco.cc,v 1.1 2005-07-13 14:44:11 tforb Exp $
* \author Thomas Forbriger
* \date 13/07/2005
*
* time series corrections
*
* Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 13/07/2005 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define TESECO_VERSION \
"TESECO V1.0 time series corrections"
#define TESECO_CVSID \
"$Id: teseco.cc,v 1.1 2005-07-13 14:44:11 tforb Exp $"
#include <iostream>
#include <tfxx/commandline.h>
using std::cout;
using std::cerr;
using std::endl;
int main(int iargc, char* argv[])
{
// define usage information
char usage_text[]=
{
TESECO_VERSION "\n"
"usage: teseco" "\n"
" or: teseco --help|-h" "\n"
};
// define full help text
char help_text[]=
{
TESECO_CVSID
};
// define commandline options
using namespace tfxx::cmdline;
static Declare options[]=
{
// 0: print help
{"help",arg_no,"-"},
// 1: verbose mode
{"v",arg_no,"-"},
{NULL}
};
// no arguments? print usage...
if (iargc<2)
{
cerr << usage_text << endl;
exit(0);
}
// collect options from commandline
Commandline cmdline(iargc, argv, options);
// help requested? print full help text...
if (cmdline.optset(0))
{
cerr << usage_text << endl;
cerr << help_text << endl;
exit(0);
}
// dummy operation: print option settings
for (int iopt=0; iopt<2; iopt++)
{
cout << "option: '" << options[iopt].opt_string << "'" << endl;
if (cmdline.optset(iopt)) { cout << " option was set"; }
else { cout << "option was not set"; }
cout << endl;
cout << " argument (string): '" << cmdline.string_arg(iopt) << "'" << endl;
cout << " argument (int): '" << cmdline.int_arg(iopt) << "'" << endl;
cout << " argument (long): '" << cmdline.long_arg(iopt) << "'" << endl;
cout << " argument (float): '" << cmdline.float_arg(iopt) << "'" << endl;
cout << " argument (double): '" << cmdline.double_arg(iopt) << "'" << endl;
cout << " argument (bool): '";
if (cmdline.bool_arg(iopt))
{ cout << "true"; } else { cout << "false"; }
cout << "'" << endl;
}
while (cmdline.extra()) { cout << cmdline.next() << endl; }
// dummy operation: print rest of command line
while (cmdline.extra()) { cout << cmdline.next() << endl; }
}
/* ----- END OF teseco.cc ----- */
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