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

do not use tfmacros.h

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: 3379
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 01f7581c
......@@ -43,6 +43,7 @@
* for libsff.a routines
* 14/11/2010 appropriate Fortran variable types are provided by libtime.h
* include sff.h
* 15/11/2010 do no longer use tfmacros.h
*/
/* libtime.h also provides Fortran variable types like integer, real, etc */
......@@ -52,7 +53,11 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <tfmacros.h>
#define SFFU_EXIT_FAILURE 1
#define SFFU_CHECKERROR( EXPR , SUB, STR )\
if ( EXPR ) { fprintf(stderr, "ERROR (%s):\n %s\n", SUB, STR );\
exit(SFFU_EXIT_FAILURE); }
/*
* convert C-type string to fortran
......@@ -92,7 +97,7 @@ char *filename;
lu=20;
sff_new__(&lu, name, &ierr, 200L);
CHECKERROR((ierr!=0), "sff_New", "deleting file")
SFFU_CHECKERROR((ierr!=0), "sff_New", "deleting file")
} /* sff_New */
/*
......@@ -112,7 +117,7 @@ char *filename;
lu=20;
sff_filewopen__(&lu, name, &ierr, 200L);
CHECKERROR((ierr!=0), "sff_WOpen", "opening file")
SFFU_CHECKERROR((ierr!=0), "sff_WOpen", "opening file")
} /* sff_WOpen */
/*
......@@ -311,7 +316,7 @@ integer lu;
integer ierr;
extern int sff_fileclose__();
sff_fileclose__(&lu, &ierr);
CHECKERROR((ierr!=0), "sff_Close", "closing file")
SFFU_CHECKERROR((ierr!=0), "sff_Close", "closing file")
} /* sff_Close */
/*
......@@ -327,7 +332,7 @@ char *newtext;
/* get memory for new chainline */
newline=(sff_Tchainedfree *)malloc(sizeof(sff_Tchainedfree));
CHECKERROR((newline==NULL), "sff_wcfree", \
SFFU_CHECKERROR((newline==NULL), "sff_wcfree", \
"could not allocate memory")
newline->next=NULL;
......
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