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