Commit 0d8f8361 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

resolved type mismatch wrrors (timeint and long int)

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: 4558
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 812c81fb
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
* 14/11/2010 appropriate Fortran variable types are provided by libtime.h * 14/11/2010 appropriate Fortran variable types are provided by libtime.h
* include sff.h * include sff.h
* 15/11/2010 do no longer use tfmacros.h * 15/11/2010 do no longer use tfmacros.h
* 16/02/2012 resolved type issues with timeint and long int parameters
*/ */
/* libtime.h also provides Fortran variable types like integer, real, etc */ /* libtime.h also provides Fortran variable types like integer, real, etc */
...@@ -196,7 +197,7 @@ void sff_WSource(lu, source) ...@@ -196,7 +197,7 @@ void sff_WSource(lu, source)
integer lu; integer lu;
sff_Tsource source; sff_Tsource source;
{ {
long int year, month, day, milsec; timeint year, month, day, milsec;
/* Fortran */ /* Fortran */
static char typh[21]; static char typh[21];
static char cs[1]; static char cs[1];
...@@ -212,11 +213,12 @@ sff_Tsource source; ...@@ -212,11 +213,12 @@ sff_Tsource source;
year=year-(100*((long int)(year/100))); year=year-(100*((long int)(year/100)));
strncpy(typh, source.type, 20); strncpy(typh, source.type, 20);
time_getdate(&day, &month, source.date); time_getdate(&day, &month, source.date);
sprintf(date, "%2.2ld%2.2ld%2.2ld", year, month, day); sprintf(date, "%2.2ld%2.2ld%2.2ld", (long int)(year),
(long int)(month), (long int)(day));
milsec=source.date.milsec; milsec=source.date.milsec;
if (source.date.micsec>=500) milsec=milsec+1; if (source.date.micsec>=500) milsec=milsec+1;
sprintf(time, "%2.2ld%2.2ld%6.3f", sprintf(time, "%2.2ld%2.2ld%6.3f",
source.date.hour, source.date.minute, (long int)(source.date.hour), (long int)(source.date.minute),
source.date.second+1.e-3*milsec); source.date.second+1.e-3*milsec);
sff_cstring_fortran(date, 6); sff_cstring_fortran(date, 6);
...@@ -234,7 +236,7 @@ void sff_PrepWid2(wid2) ...@@ -234,7 +236,7 @@ void sff_PrepWid2(wid2)
sff_Twid2line *wid2; sff_Twid2line *wid2;
{ {
char extra[21]; char extra[21];
long int ismonth, isday; timeint ismonth, isday;
/* Fortran */ /* Fortran */
static char station[11], comp[11], auxid[11], instyp[11]; static char station[11], comp[11], auxid[11], instyp[11];
static integer nsamp, year, month, day, hour, minute, ierr; static integer nsamp, year, month, day, hour, minute, ierr;
......
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