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

reading mixed formats works

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/branches/libdatrwxx.su
SVN Revision: 3495
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent cc97c24e
......@@ -121,9 +121,9 @@ c no offset shift
offshift=0.
c read extra flags values
moreflags=.true.
fileformat=opt_Fformat
do while ((i.lt.iargc()).and.(moreflags))
call getarg(i+1, selection)
fileformat=opt_Fformat
if (selection(1:2).eq.'t:') then
i=i+1
useselect=.true.
......@@ -136,6 +136,7 @@ c eval selection
& infile(1:(index(infile,' ')-1)),'?'
c set file format
elseif (selection(1:2).eq.'f:') then
i=i+1
fileformat=selection(3:)
c set style
elseif (selection(1:2).eq.'s:') then
......@@ -169,8 +170,10 @@ c set legend string
c
c go and open file
print *,' '
print *,'open ',infile(1:index(infile,' '))
call sff_select_format(fileformat)
print *,'open ',infile(1:index(infile,' ')),
& 'with file format ',fileformat(1:index(fileformat,' '))
call sff_select_format(fileformat, ierr)
if (ierr.ne.0) stop 'ERROR (readdata): selecting file type'
call sff_ROpenS(lu, infile, sffversion, timestamp, code,
& source(nfiles), scs, sc1, sc2, sc3, date, time, ierr)
if (ierr.ne.0) stop 'ERROR (readdata): opening data file'
......@@ -248,6 +251,7 @@ c some final settings
& ' - stopped reading'
hot=.false.
last=.true.
c to me this appears to be a close which should not be here
call sff_close(lu, ierr)
if (ierr.ne.0) stop 'ERROR (readdata): closing data file'
endif
......@@ -257,6 +261,8 @@ c some final settings
tifcount=tifcount+1
endif
enddo
call sff_close(lu, ierr)
if (ierr.ne.0) stop 'ERROR (readdata): closing data file'
else
print *,'WARNING (readdata): exceeded file data space',
& ' - stopped reading'
......
......@@ -111,6 +111,7 @@ c
print *,'-d dev output device'
print *,'-v verbose'
print *,'-p interactive mode'
print *,'-ty formatID format ID of data file type to be used'
print *,' '
print *,'Titles, labels, legends'
print *,'-----------------------'
......
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