Commit 3e91baad authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

provide sign on sample index

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: 1912
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 6e9044c9
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* *
* ---------------------------------------------------------------------------- * ----------------------------------------------------------------------------
* *
* $Id: wid2isample.cc,v 1.3 2004-09-17 15:35:00 tforb Exp $ * $Id: wid2isample.cc,v 1.4 2005-07-28 13:48:26 tforb Exp $
* \author Thomas Forbriger * \author Thomas Forbriger
* \date 06/02/2004 * \date 06/02/2004
* *
...@@ -14,13 +14,14 @@ ...@@ -14,13 +14,14 @@
* REVISIONS and CHANGES * REVISIONS and CHANGES
* - 06/02/2004 V1.0 Thomas Forbriger * - 06/02/2004 V1.0 Thomas Forbriger
* - 17/09/2004 V1.1 used wrong operator for rest * - 17/09/2004 V1.1 used wrong operator for rest
* - 28/07/2005 V1.2 returned signed sample index
* *
* ============================================================================ * ============================================================================
*/ */
#define TF_WID2ISAMPLE_CC_VERSION \ #define TF_WID2ISAMPLE_CC_VERSION \
"TF_WID2ISAMPLE_CC V1.1 " "TF_WID2ISAMPLE_CC V1.2"
#define TF_WID2ISAMPLE_CC_CVSID \ #define TF_WID2ISAMPLE_CC_CVSID \
"$Id: wid2isample.cc,v 1.3 2004-09-17 15:35:00 tforb Exp $" "$Id: wid2isample.cc,v 1.4 2005-07-28 13:48:26 tforb Exp $"
#include <sffxx.h> #include <sffxx.h>
...@@ -32,6 +33,7 @@ namespace sff { ...@@ -32,6 +33,7 @@ namespace sff {
{ {
libtime::TRelativeTime dt=libtime::double2time(wid2.dt); libtime::TRelativeTime dt=libtime::double2time(wid2.dt);
long int retval=(idate-wid2.date)/dt; long int retval=(idate-wid2.date)/dt;
if (idate<wid2.date) retval *= -1;
return(retval); return(retval);
} }
......
Supports Markdown
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