Commit 056385c0 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

Fortran part is tested

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: 2465
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent a7127075
# this is <Makefile>
# ----------------------------------------------------------------------------
# Makefile for work/src/libs/libtime
# ($Id: Makefile,v 2.31 2007-12-07 08:14:45 tforb Exp $)
# ($Id: Makefile,v 2.32 2007-12-07 10:20:14 tforb Exp $)
#
# how to build all flavours of libtime
#
......@@ -37,6 +37,10 @@
# and new Fortan compilation default: g77
#
# ============================================================================
#
# NOTICE: fallback solution (f2c is default) can be activated by the
# environment variable TF_FALLBACK
# This option will disappear somewhere in the future!
FC=g77
CC=gcc
......
......@@ -26,12 +26,12 @@ c
program testlibtime
c
integer date1(7), date2(7), iargc, day, month, year
integer date1(7), date2(7), date3(7), iargc, day, month, year
character*40 string, filename
character*40 date, time
character*200 line
character*132 wid2line
real sffu_seconds
real sffu_seconds, seconds
real time_libversion
date1(1)=97
......@@ -309,9 +309,11 @@ c
call head('sffu_timesrce and sffu_timewid2 and sffu_setwid2time')
call getarg(1, filename)
print *,'evaluate sff file ',filename
open(10, file=filename)
1 read(10, '(a200)', end=2) line
open(10, file=filename, status='old', err=99)
1 read(10, '(a200)', end=2, err=98) line
if (line(1:5).eq.'SRCE ') then
print *,'found SRCE line:'
print *,line(1:78)
date(1:6)=line(75:80)
time(1:10)=line(82:91)
call sffu_timesrce(date, time, date1)
......@@ -325,6 +327,7 @@ c
endif
goto 1
2 close(10)
print *,'closed file'
date1(1)=1997
date1(2)=150
date1(3)=12
......@@ -343,11 +346,25 @@ c
print *,'set WID2 to ',string
print *,wid2line
call sffu_setwid2time(wid2line, date1)
call time_copy(date1, date2)
date2(7)=0
date2(6)=0
date2(5)=0
date2(4)=0
date2(3)=0
print *,wid2line
print *,'seconds: ',sffu_seconds(date1)
call time_sprint(date2, string)
call time_sub(date1, date2, date3)
print *,'time span from ',string
seconds=sffu_seconds(date3)
print *,'to first sample is ',seconds,' seconds:'
call time_sprint(date3, string)
print *,string
endif
stop
99 stop 'ERROR: opening file'
98 stop 'ERROR: reading from file'
end
c======================================================================
......
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