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

provide multi format compatibility interface

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: 3482
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 11f4484e
......@@ -38,7 +38,7 @@
all: doc install
LIBS=libsff.a
LIBS=libsff.a
TESTS=tfullwrite tservice tskipdata teststuff tfullread
install: $(LIBS) install-include
......@@ -78,7 +78,7 @@ CFLAGS += -O2 -I${SERVERINCLUDEDIR} $(FLAGS)
#----------------------------------------------------------------------
# documentation
doc: stuff.f
libsff.doc sff.doc doc: stuff.f fapidxx.f
awk 'BEGIN { flagsff=0; flaglib=0; } \
/^cA/ { flaglib=1; flagsff=0; next; } \
/^cB/ { flaglib=0; flagsff=1; next; } \
......@@ -88,7 +88,7 @@ doc: stuff.f
{ if (flagsff) { print > "sff.doc" ; } \
if (flaglib) { print > "libsff.doc" ; } } \
END { print "c ---- END OF sff.doc ----" > "sff.doc" ; \
print "c ---- END OF libsff.doc ----" > "libsff.doc" ;}' $<
print "c ---- END OF libsff.doc ----" > "libsff.doc" ;}' $^
#----------------------------------------------------------------------
# C prototypes
......@@ -107,9 +107,10 @@ install-include: $(LOCINCLUDEDIR)/sff.h
gse20.o: gse20.f
stuff.o: stuff.f
fapidxx.o: fapidxx.f
sunfortran.o: sunfortran.c
libsff.a: gse20.o stuff.o sunfortran.o
libsff.a: gse20.o stuff.o sunfortran.o fapidxx.o
%.o: %.f
$(FC) $(FFLAGS) $< -c -o $@
......
c this is <fapidxx.f>
c ----------------------------------------------------------------------------
c ($Id$)
c
c Copyright (c) 2010 by Thomas Forbriger (BFO Schiltach)
c
c some functions/subroutines for compatibility with libfapidxx
c
c REVISIONS and CHANGES
c 26/11/2010 V1.0 Thomas Forbriger
c
c ============================================================================
c
cD
c----------------------------------------------------------------------
subroutine sff_select_format(formatid, ierr)
c
c Select a file format for the next data file to be opened
c
c input:
c filename name of file
c output:
c ierr error status (ok: ierr=0)
c
integer ierr
character formatid*(*)
cE
if (formatid.ne.'sff') then
print *,'ERROR (libsff, sff_select_format):',
& ' only SFF is supported'
ierr=1
else
ierr=0
endif
return
end
cD
c----------------------------------------------------------------------
subroutine sff_help_formats()
c
c Print online help
c
cE
print *,'This is the Fortran version of libsff'
return
end
cD
c----------------------------------------------------------------------
subroutine sff_help_details()
c
c Print online help
c
cE
real sff_encode_libversion, sff_libversion
print *,'The Fortran version of libsff can only handle ',
& 'generic SFF data'
print *,'The library is able to read data of SFF version ',
& sff_libversion()
print *,'The library is encodes data for SFF version ',
& sff_encode_libversion()
return
end
c
c ----- END OF fapidxx.f -----
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