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

Remove unused function tableWriteC.

parent 659abd3c
......@@ -22,13 +22,13 @@ static void usage(void)
" -version display version number\n", stderr);
}
int main(int argc, char *argv[])
{
int c;
char *cstring;
char *ifile = NULL, *ofile = NULL;
int debug = 0;
int tableID;
Progname = argv[0];
......@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
/*
if ( debug ) cdiDebug(debug);
*/
tableID = tableRead(ifile);
int tableID = tableRead(ifile);
if ( CDI_Debug )
Message("write parameter table %d to %s", tableID, ofile);
FILE *ptfp = (ofile[0] == '-' && ofile[1] == '\0')?stdout:fopen(ofile, "w");
......
......@@ -813,15 +813,6 @@ read table of parameters from file in tabular format.
write table of parameters to file in tabular format.
\section*{\tt \htmlref{tableWriteC}{tableWriteC}}
\begin{verbatim}
void tableWriteC (const char *filename, int tableID);
\end{verbatim}
write table of parameters to file in C language format.
\section*{\tt \htmlref{taxisCreate}{taxisCreate}}
\begin{verbatim}
......@@ -1444,6 +1435,15 @@ Destroy a vertical Z-axis.
Duplicate a Z-axis.
\section*{\tt \htmlref{zaxisInqCLen}{zaxisInqCLen}}
\begin{verbatim}
int zaxisInqCLen (int zaxisID);
\end{verbatim}
Get maximal string length of character Z-axis.
\section*{\tt \htmlref{zaxisInqLevel}{zaxisInqLevel}}
\begin{verbatim}
......
......@@ -818,15 +818,6 @@ read table of parameters from file in tabular format.
write table of parameters to file in tabular format.
\section*{\tt \htmlref{tableWriteC}{tableWriteC}}
\begin{verbatim}
SUBROUTINE tableWriteC (CHARACTER*(*) filename, INTEGER tableID)
\end{verbatim}
write table of parameters to file in C language format.
\section*{\tt \htmlref{taxisCreate}{taxisCreate}}
\begin{verbatim}
......@@ -1462,6 +1453,15 @@ Destroy a vertical Z-axis.
Duplicate a Z-axis.
\section*{\tt \htmlref{zaxisInqCLen}{zaxisInqCLen}}
\begin{verbatim}
INTEGER FUNCTION zaxisInqCLen (INTEGER zaxisID)
\end{verbatim}
Get maximal string length of character Z-axis.
\section*{\tt \htmlref{zaxisInqLevel}{zaxisInqLevel}}
\begin{verbatim}
......
......@@ -1207,8 +1207,6 @@ const char *modelInqNamePtr(int modelID);
/* Table routines */
/* tableWriteC: write table of parameters to file in C language format */
void tableWriteC(const char *filename, int tableID);
/* tableFWriteC: write table of parameters to FILE* in C language format */
void tableFWriteC(FILE *ptfp, int tableID);
/* tableWrite: write table of parameters to file in tabular format */
......
......@@ -4,7 +4,7 @@
!
! Author:
! -------
! Uwe Schulzweida, MPI-MET, Hamburg, May 2017
! Uwe Schulzweida, MPI-MET, Hamburg, June 2017
!
INTEGER CDI_MAX_NAME
......@@ -39,16 +39,20 @@
PARAMETER (CDI_ESYSTEM = -10)
INTEGER CDI_EINVAL
PARAMETER (CDI_EINVAL = -20)
INTEGER CDI_EISDIR
PARAMETER (CDI_EISDIR = -21)
INTEGER CDI_EISEMPTY
PARAMETER (CDI_EISEMPTY = -22)
INTEGER CDI_EUFTYPE
PARAMETER (CDI_EUFTYPE = -21)
PARAMETER (CDI_EUFTYPE = -23)
INTEGER CDI_ELIBNAVAIL
PARAMETER (CDI_ELIBNAVAIL = -22)
PARAMETER (CDI_ELIBNAVAIL = -24)
INTEGER CDI_EUFSTRUCT
PARAMETER (CDI_EUFSTRUCT = -23)
PARAMETER (CDI_EUFSTRUCT = -25)
INTEGER CDI_EUNC4
PARAMETER (CDI_EUNC4 = -24)
PARAMETER (CDI_EUNC4 = -26)
INTEGER CDI_EDIMSIZE
PARAMETER (CDI_EDIMSIZE = -25)
PARAMETER (CDI_EDIMSIZE = -27)
INTEGER CDI_ELIMIT
PARAMETER (CDI_ELIMIT = -99)
!
......@@ -2021,6 +2025,10 @@
! DOUBLEPRECISION levels(*))
EXTERNAL zaxisInqLevels
INTEGER zaxisInqCLen
! (INTEGER zaxisID)
EXTERNAL zaxisInqCLen
! zaxisDefLevel
! (INTEGER zaxisID,
! INTEGER levelID,
......@@ -2434,11 +2442,6 @@
!
! Table routines
!
! tableWriteC
! (CHARACTER*(*) filename,
! INTEGER tableID)
EXTERNAL tableWriteC
! tableWrite
! (CHARACTER*(*) filename,
! INTEGER tableID)
......
......@@ -432,6 +432,7 @@ FCALLSCFUN1 (INT, zaxisDuplicate, ZAXISDUPLICATE, zaxisduplicate, INT)
FCALLSCSUB1 (zaxisPrint, ZAXISPRINT, zaxisprint, INT)
FCALLSCSUB2 (zaxisDefLevels, ZAXISDEFLEVELS, zaxisdeflevels, INT, DOUBLEV)
FCALLSCFUN2 (INT, zaxisInqLevels, ZAXISINQLEVELS, zaxisinqlevels, INT, DOUBLEV)
FCALLSCFUN1 (INT, zaxisInqCLen, ZAXISINQCLEN, zaxisinqclen, INT)
FCALLSCSUB3 (zaxisDefLevel, ZAXISDEFLEVEL, zaxisdeflevel, INT, INT, DOUBLE)
FCALLSCFUN2 (DOUBLE, zaxisInqLevel, ZAXISINQLEVEL, zaxisinqlevel, INT, INT)
FCALLSCSUB2 (zaxisDefNlevRef, ZAXISDEFNLEVREF, zaxisdefnlevref, INT, INT)
......@@ -528,7 +529,6 @@ FCALLSCFUN1 (STRING, modelInqNamePtr, MODELINQNAMEPTR, modelinqnameptr, INT)
/* Table routines */
FCALLSCSUB2 (tableWriteC, TABLEWRITEC, tablewritec, STRING, INT)
FCALLSCSUB2 (tableWrite, TABLEWRITE, tablewrite, STRING, INT)
FCALLSCFUN1 (INT, tableRead, TABLEREAD, tableread, STRING)
FCALLSCFUN3 (INT, tableDef, TABLEDEF, tabledef, INT, INT, STRING)
......
......@@ -704,17 +704,6 @@ void tableWrite(const char *ptfile, int tableID)
}
void tableWriteC(const char *filename, int tableID)
{
FILE *ptfp = fopen(filename, "w");
if (!ptfp)
Error("failed to open file \"%s\"!", filename);
if ( CDI_Debug )
Message("write parameter table %d to %s", tableID, filename);
tableFWriteC(ptfp, tableID);
fclose(ptfp);
}
void tableFWriteC(FILE *ptfp, int tableID)
{
const char chelp[] = "";
......
......@@ -6,6 +6,7 @@
set -e
DEFTABLES=@abs_top_srcdir@/tables/default_tables
OFILE=@abs_top_srcdir@/src/table.h
OFILE=table.h
PTFILES=""
#
#########################################
......@@ -31,8 +32,8 @@ unset PTFILE[item]
#
cat >&4 <<EOF
/* Automatically generated, do not edit! */
#ifndef _TABLE_H
#define _TABLE_H
#ifndef TABLE_H
#define TABLE_H
EOF
#
......@@ -47,8 +48,6 @@ cat >&4 <<EOF
static
void tableDefault(void)
{
int tableID, instID, modelID;
EOF
#
settabvar() {
......@@ -78,21 +77,20 @@ TABLENAME=`echo ${TFBASENAME} | sed -e "s/\./_/g" `
#
cat >&4 <<EOF
/*
* define table : ${TFBASENAME}
*/
instID = institutInq(${TABLE_CE}, ${TABLE_SU}, "${TABLE_IN}", NULL);
if ( instID == -1 )
instID = institutDef(${TABLE_CE}, ${TABLE_SU}, "${TABLE_IN}", NULL);
// define table : ${TFBASENAME}
{
int instID = institutInq(${TABLE_CE}, ${TABLE_SU}, "${TABLE_IN}", NULL);
if ( instID == -1 )
instID = institutDef(${TABLE_CE}, ${TABLE_SU}, "${TABLE_IN}", NULL);
modelID = modelInq(instID, 0, "${TABLE_MO}");
if ( modelID == -1 )
modelID = modelDef(instID, 0, "${TABLE_MO}");
int modelID = modelInq(instID, 0, "${TABLE_MO}");
if ( modelID == -1 )
modelID = modelDef(instID, 0, "${TABLE_MO}");
tableID = tableDef(modelID, ${TABLE_ID}, "${TABLE_NA}");
int tableID = tableDef(modelID, ${TABLE_ID}, "${TABLE_NA}");
tableLink(tableID, ${TABLENAME}, sizeof(${TABLENAME}) / sizeof(PAR));
tableLink(tableID, ${TABLENAME}, sizeof(${TABLENAME}) / sizeof(PAR));
}
EOF
#
done
......@@ -100,7 +98,7 @@ done
cat >&4 <<EOF
}
#endif /* _TABLE_H */
#endif /* TABLE_H */
EOF
#
rm -f ptfile
......
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