Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
e29c60ad
Commit
e29c60ad
authored
Jun 30, 2017
by
Uwe Schulzweida
Browse files
Remove unused function tableWriteC.
parent
659abd3c
Changes
8
Hide whitespace changes
Inline
Side-by-side
app/createtable.c
View file @
e29c60ad
...
...
@@ -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"
);
...
...
doc/tex/c_quick_ref.tex
View file @
e29c60ad
...
...
@@ -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}
...
...
doc/tex/f_quick_ref.tex
View file @
e29c60ad
...
...
@@ -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}
...
...
src/cdi.h
View file @
e29c60ad
...
...
@@ -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 */
...
...
src/cdi.inc
View file @
e29c60ad
...
...
@@ -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
=
-
2
1
)
PARAMETER
(
CDI_EUFTYPE
=
-
2
3
)
INTEGER
CDI_ELIBNAVAIL
PARAMETER
(
CDI_ELIBNAVAIL
=
-
2
2
)
PARAMETER
(
CDI_ELIBNAVAIL
=
-
2
4
)
INTEGER
CDI_EUFSTRUCT
PARAMETER
(
CDI_EUFSTRUCT
=
-
2
3
)
PARAMETER
(
CDI_EUFSTRUCT
=
-
2
5
)
INTEGER
CDI_EUNC4
PARAMETER
(
CDI_EUNC4
=
-
2
4
)
PARAMETER
(
CDI_EUNC4
=
-
2
6
)
INTEGER
CDI_EDIMSIZE
PARAMETER
(
CDI_EDIMSIZE
=
-
2
5
)
PARAMETER
(
CDI_EDIMSIZE
=
-
2
7
)
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
)
...
...
src/cdiFortran.c
View file @
e29c60ad
...
...
@@ -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
)
...
...
src/table.c
View file @
e29c60ad
...
...
@@ -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
[]
=
""
;
...
...
tables/gen_tableheaderfile.in
View file @
e29c60ad
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment