Commit b2675aa3 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

make_fint: added key FINT_OFF to stop generation if the fortran interface from cdi.h.

parent 18eaa51a
......@@ -1273,6 +1273,7 @@ int vlistInqVarSubtype(int vlistID, int varID);
void gribapiLibraryVersion(int *major_version, int *minor_version, int *revision_version);
//FINT_OFF
void gaussianLatitudes(double *latitudes, double *weights, size_t nlat);
#ifdef __cplusplus
......
......@@ -519,7 +519,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint, const
fprintf(fpint, "/* Automatically generated by make_fint.c, don't edit! */\n");
fprintf(fpint, "\n");
fprintf(fpint, "#ifdef HAVE_CONFIG_H\n");
fprintf(fpint, "# include \"config.h\"\n");
fprintf(fpint, "#include \"config.h\"\n");
fprintf(fpint, "#endif\n");
fprintf(fpint, "\n");
char *cppHeaderSentinelMacro;
......@@ -579,8 +579,8 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint, const
{
static const char cplusplus_macro[] = "__cplusplus";
lineno++;
if (line[0] == '\n')
continue;
if (line[0] == '\n') continue;
if (strncmp(line, "//FINT_OFF", 10) == 0) break;
functype = ISVOID;
pline = line;
int needsExtraWrapper = 0, needsPrologue = 0;
......@@ -592,8 +592,7 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint, const
{
functype = retType;
declType = FUNC_DECL;
needsExtraWrapper
= needsExtraWrapper || funRet[retType].needsExtraWrapper;
needsExtraWrapper = needsExtraWrapper || funRet[retType].needsExtraWrapper;
break;
}
if (declType == UNKNOWN_DECL)
......
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