Commit 63dc52a4 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

make_fint.c: changed CBUF to PPSTRING

parent 5f73504d
...@@ -188,7 +188,6 @@ src/cdf_int.h -text ...@@ -188,7 +188,6 @@ src/cdf_int.h -text
src/cdi.h -text src/cdi.h -text
src/cdi.inc -text src/cdi.inc -text
src/cdiFortran.c -text src/cdiFortran.c -text
src/cdiFortran.h -text
src/cdi_cksum.c -text src/cdi_cksum.c -text
src/cdi_cksum.h -text src/cdi_cksum.h -text
src/cdi_error.c -text src/cdi_error.c -text
......
...@@ -27,7 +27,6 @@ libcdi_la_SOURCES = \ ...@@ -27,7 +27,6 @@ libcdi_la_SOURCES = \
cdi_limits.h \ cdi_limits.h \
cdi_util.c \ cdi_util.c \
cdiFortran.c \ cdiFortran.c \
cdiFortran.h \
cfortran.h \ cfortran.h \
cgribex.h \ cgribex.h \
cgribexlib.c \ cgribexlib.c \
......
...@@ -375,7 +375,6 @@ libcdi_la_SOURCES = \ ...@@ -375,7 +375,6 @@ libcdi_la_SOURCES = \
cdi_limits.h \ cdi_limits.h \
cdi_util.c \ cdi_util.c \
cdiFortran.c \ cdiFortran.c \
cdiFortran.h \
cfortran.h \ cfortran.h \
cgribex.h \ cgribex.h \
cgribexlib.c \ cgribexlib.c \
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
! !
! Author: ! Author:
! ------- ! -------
! Uwe Schulzweida, MPI-MET, Hamburg, January 2014 ! Uwe Schulzweida, MPI-MET, Hamburg, February 2014
! !
INTEGER CDI_MAX_NAME INTEGER CDI_MAX_NAME
......
...@@ -14,10 +14,6 @@ ...@@ -14,10 +14,6 @@
# include "cfortran.h" # include "cfortran.h"
#endif #endif
#if ! defined (_CDIFORTRAN_H)
# include "cdiFortran.h"
#endif
/* Byte order */ /* Byte order */
...@@ -264,10 +260,10 @@ FCALLSCFUN6 (INT, vlistInqAtt, VLISTINQATT, vlistinqatt, INT, INT, INT, PSTRING, ...@@ -264,10 +260,10 @@ FCALLSCFUN6 (INT, vlistInqAtt, VLISTINQATT, vlistinqatt, INT, INT, INT, PSTRING,
FCALLSCFUN3 (INT, vlistDelAtt, VLISTDELATT, vlistdelatt, INT, INT, STRING) FCALLSCFUN3 (INT, vlistDelAtt, VLISTDELATT, vlistdelatt, INT, INT, STRING)
FCALLSCFUN6 (INT, vlistDefAttInt, VLISTDEFATTINT, vlistdefattint, INT, INT, STRING, INT, INT, PINT) FCALLSCFUN6 (INT, vlistDefAttInt, VLISTDEFATTINT, vlistdefattint, INT, INT, STRING, INT, INT, PINT)
FCALLSCFUN6 (INT, vlistDefAttFlt, VLISTDEFATTFLT, vlistdefattflt, INT, INT, STRING, INT, INT, PDOUBLE) FCALLSCFUN6 (INT, vlistDefAttFlt, VLISTDEFATTFLT, vlistdefattflt, INT, INT, STRING, INT, INT, PDOUBLE)
FCALLSCFUN5 (INT, vlistDefAttTxt, VLISTDEFATTTXT, vlistdefatttxt, INT, INT, STRING, INT, CBUF) FCALLSCFUN5 (INT, vlistDefAttTxt, VLISTDEFATTTXT, vlistdefatttxt, INT, INT, STRING, INT, PPSTRING)
FCALLSCFUN5 (INT, vlistInqAttInt, VLISTINQATTINT, vlistinqattint, INT, INT, STRING, INT, PINT) FCALLSCFUN5 (INT, vlistInqAttInt, VLISTINQATTINT, vlistinqattint, INT, INT, STRING, INT, PINT)
FCALLSCFUN5 (INT, vlistInqAttFlt, VLISTINQATTFLT, vlistinqattflt, INT, INT, STRING, INT, PDOUBLE) FCALLSCFUN5 (INT, vlistInqAttFlt, VLISTINQATTFLT, vlistinqattflt, INT, INT, STRING, INT, PDOUBLE)
FCALLSCFUN5 (INT, vlistInqAttTxt, VLISTINQATTTXT, vlistinqatttxt, INT, INT, STRING, INT, CBUF) FCALLSCFUN5 (INT, vlistInqAttTxt, VLISTINQATTTXT, vlistinqatttxt, INT, INT, STRING, INT, PPSTRING)
/* GRID routines */ /* GRID routines */
...@@ -344,8 +340,8 @@ FCALLSCSUB2 (gridDefPosition, GRIDDEFPOSITION, griddefposition, INT, INT) ...@@ -344,8 +340,8 @@ FCALLSCSUB2 (gridDefPosition, GRIDDEFPOSITION, griddefposition, INT, INT)
FCALLSCFUN1 (INT, gridInqPosition, GRIDINQPOSITION, gridinqposition, INT) FCALLSCFUN1 (INT, gridInqPosition, GRIDINQPOSITION, gridinqposition, INT)
FCALLSCSUB2 (gridDefReference, GRIDDEFREFERENCE, griddefreference, INT, STRING) FCALLSCSUB2 (gridDefReference, GRIDDEFREFERENCE, griddefreference, INT, STRING)
FCALLSCFUN2 (INT, gridInqReference, GRIDINQREFERENCE, gridinqreference, INT, PSTRING) FCALLSCFUN2 (INT, gridInqReference, GRIDINQREFERENCE, gridinqreference, INT, PSTRING)
FCALLSCSUB2 (gridDefUUID, GRIDDEFUUID, griddefuuid, INT, CBUF) FCALLSCSUB2 (gridDefUUID, GRIDDEFUUID, griddefuuid, INT, PPSTRING)
FCALLSCFUN2 (STRING, gridInqUUID, GRIDINQUUID, gridinquuid, INT, CBUF) FCALLSCFUN2 (STRING, gridInqUUID, GRIDINQUUID, gridinquuid, INT, PPSTRING)
/* Lambert Conformal Conic grid (GRIB version) */ /* Lambert Conformal Conic grid (GRIB version) */
...@@ -394,8 +390,8 @@ FCALLSCSUB2 (zaxisDefNlevRef, ZAXISDEFNLEVREF, zaxisdefnlevref, INT, INT) ...@@ -394,8 +390,8 @@ FCALLSCSUB2 (zaxisDefNlevRef, ZAXISDEFNLEVREF, zaxisdefnlevref, INT, INT)
FCALLSCFUN1 (INT, zaxisInqNlevRef, ZAXISINQNLEVREF, zaxisinqnlevref, INT) FCALLSCFUN1 (INT, zaxisInqNlevRef, ZAXISINQNLEVREF, zaxisinqnlevref, INT)
FCALLSCSUB2 (zaxisDefNumber, ZAXISDEFNUMBER, zaxisdefnumber, INT, INT) FCALLSCSUB2 (zaxisDefNumber, ZAXISDEFNUMBER, zaxisdefnumber, INT, INT)
FCALLSCFUN1 (INT, zaxisInqNumber, ZAXISINQNUMBER, zaxisinqnumber, INT) FCALLSCFUN1 (INT, zaxisInqNumber, ZAXISINQNUMBER, zaxisinqnumber, INT)
FCALLSCSUB2 (zaxisDefUUID, ZAXISDEFUUID, zaxisdefuuid, INT, CBUF) FCALLSCSUB2 (zaxisDefUUID, ZAXISDEFUUID, zaxisdefuuid, INT, PPSTRING)
FCALLSCFUN2 (STRING, zaxisInqUUID, ZAXISINQUUID, zaxisinquuid, INT, CBUF) FCALLSCFUN2 (STRING, zaxisInqUUID, ZAXISINQUUID, zaxisinquuid, INT, PPSTRING)
FCALLSCSUB2 (zaxisDefName, ZAXISDEFNAME, zaxisdefname, INT, STRING) FCALLSCSUB2 (zaxisDefName, ZAXISDEFNAME, zaxisdefname, INT, STRING)
FCALLSCSUB2 (zaxisDefLongname, ZAXISDEFLONGNAME, zaxisdeflongname, INT, STRING) FCALLSCSUB2 (zaxisDefLongname, ZAXISDEFLONGNAME, zaxisdeflongname, INT, STRING)
FCALLSCSUB2 (zaxisDefUnits, ZAXISDEFUNITS, zaxisdefunits, INT, STRING) FCALLSCSUB2 (zaxisDefUnits, ZAXISDEFUNITS, zaxisdefunits, INT, STRING)
......
#ifndef _CDIFORTRAN_H
#define _CDIFORTRAN_H
/*******************************************************************************
* Character buffer:
*/
#define CBUF_cfINT(N,A,B,X,Y,Z) STRING_cfINT(N,A,B,X,Y,Z)
#define CBUF_cfSEP(T, B) STRING_cfSEP(T,B)
#define CBUF_cfN( T,A) STRING_cfN(T,A)
#define CBUF_cfSTR(N,T,A,B,C,D,E) STRING_cfSTR(N,T,A,B,C,D,E)
#if defined(vmsFortran)
# define CBUF_cfT(M,I,A,B,D) A->dsc$a_pointer
#elif defined(CRAYFortran)
# define CBUF_cfT(M,I,A,B,D) _fcdtocp(A)
#else
# define CBUF_cfT(M,I,A,B,D) A
#endif
#endif
...@@ -172,7 +172,6 @@ echo "#undef calloc" >> ${PROG} ...@@ -172,7 +172,6 @@ echo "#undef calloc" >> ${PROG}
echo "#undef free" >> ${PROG} echo "#undef free" >> ${PROG}
echo "#undef DOUBLE_PRECISION" >> ${PROG} echo "#undef DOUBLE_PRECISION" >> ${PROG}
cat $srcdir/cfortran.h >> ${PROG} cat $srcdir/cfortran.h >> ${PROG}
cat $srcdir/cdiFortran.h >> ${PROG}
echo "#endif" >> ${PROG} echo "#endif" >> ${PROG}
cat $srcdir/cdiFortran.c >> ${PROG} cat $srcdir/cdiFortran.c >> ${PROG}
......
...@@ -154,7 +154,7 @@ static struct symbol funArgSym[] ...@@ -154,7 +154,7 @@ static struct symbol funArgSym[]
"^"WS"*(const"WS"+)?float"WS"+\\*"SYMRE"?"WS"*[,\\)]", 2, 0, 0 }, "^"WS"*(const"WS"+)?float"WS"+\\*"SYMRE"?"WS"*[,\\)]", 2, 0, 0 },
{ "DOUBLEPRECISION", "PDOUBLE", "double *%.*s", { "DOUBLEPRECISION", "PDOUBLE", "double *%.*s",
"^"WS"*(const"WS"+)?double"WS"+\\*"SYMRE"?"WS"*[,\\)]", 2, 0, 0 }, "^"WS"*(const"WS"+)?double"WS"+\\*"SYMRE"?"WS"*[,\\)]", 2, 0, 0 },
{ "CHARACTER*(*)", "CBUF", "char *%.*s", { "CHARACTER*(*)", "PPSTRING", "char *%.*s",
"^"WS"*(const"WS"+)?char"WS"+\\*""([A-Za-z_][A-Za-z_0-9]*_cbuf)" "^"WS"*(const"WS"+)?char"WS"+\\*""([A-Za-z_][A-Za-z_0-9]*_cbuf)"
WS"*[,\\)]", 2, 0, 0 }, WS"*[,\\)]", 2, 0, 0 },
{ "CHARACTER*(*)", "STRING", "char *%.*s", { "CHARACTER*(*)", "STRING", "char *%.*s",
...@@ -322,10 +322,6 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint, ...@@ -322,10 +322,6 @@ static void fortran_interface(char *fname, char *fnameinc, char *fnameint,
fprintf(fpint, "# include \"cfortran.h\"\n"); fprintf(fpint, "# include \"cfortran.h\"\n");
fprintf(fpint, "#endif\n"); fprintf(fpint, "#endif\n");
fprintf(fpint, "\n"); fprintf(fpint, "\n");
fprintf(fpint, "#if ! defined (_CDIFORTRAN_H)\n");
fprintf(fpint, "# include \"cdiFortran.h\"\n");
fprintf(fpint, "#endif\n");
fprintf(fpint, "\n");
ssize_t lineLen; ssize_t lineLen;
while ((lineLen = getline(&line, &lineBufSize, fpin)) >= 0) while ((lineLen = getline(&line, &lineBufSize, fpin)) >= 0)
......
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