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

calculate nchar from characters read

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: 1428
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent f3160498
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.4 2003-12-23 15:39:49 tforb Exp $
#
# Copyright (c) 2003 by Thomas Forbriger (BFO Schiltach)
#
# libsff
#
# REVISIONS and CHANGES
# 23/12/2003 V1.0 Thomas Forbriger
#
# ============================================================================
#
# Makefile for work/src/libs/libsff
#
all:
flist: Makefile $(wildcard *.f *c)
echo $^ | tr ' ' '\n' | sort > $@
.PHONY: edit
edit: flist; vim $<
# check for cross compiler
ifdef CROSS_BASE
BINPREFIX=$(CROSS_BASE)/bin/dos-
......@@ -30,7 +49,7 @@ tests: $(TESTS) $(TESTS77)
.PHONY: tests clean
clean:
-/bin/rm *.o *.bak *.o77
-/bin/rm *.o *.bak *.o77 flist
-/bin/rm $(TESTS) $(TESTS22)
%.o: %.f
......@@ -68,3 +87,5 @@ libsff77.a: gse20.o77 stuff.o77
$(TESTS): %: %.o; $(CC) -o $@ $< -lsff $(F2CLIB)
$(TESTS77): %77: %.o77; $(FC) -o $@ $< -lsff77
# ----- END OF Makefile -----
......@@ -2289,7 +2289,12 @@ c read DAT2 block
read(line(5:), *) ichecksum
c The C++ library cannot know the number of characters when writing the DAST
c line and will write '-1'. Thus we allow for a sloppy mode here.
if (nchar.ne.-1) then
if (nchar.eq.-1) then
nchar=0
do while(cbuf(nchar+1).ne.' ')
nchar=nchar+1
enddo
else
if (nchar.ne.(iline*80)) then
print *,'RWData: ERROR number of data =! expected number'
ierr=1
......
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