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
b8eb262e
Commit
b8eb262e
authored
Nov 20, 2009
by
Uwe Schulzweida
Browse files
added function vlistDefVarParam/vlistInqVarParam
parent
0165f41d
Changes
10
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
b8eb262e
2009-11-20 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* added function vlistDefVarParam/vlistInqVarParam
2009-11-17 Ralf Mueller <Ralf.Mueller@zmaw.de>
* Added ruby and python interfaces
...
...
src/cdi.h
View file @
b8eb262e
...
...
@@ -333,6 +333,12 @@ int vlistInqVarZtype(int vlistID, int varID);
void
vlistDefVarZlevel
(
int
vlistID
,
int
varID
,
int
zlevel
);
int
vlistInqVarZlevel
(
int
vlistID
,
int
varID
);
/* vlistDefVarParam: Define the parameter number of a Variable */
void
vlistDefVarParam
(
int
vlistID
,
int
varID
,
int
param
);
/* vlistInqVarParam: Get the parameter number of a Variable */
int
vlistInqVarParam
(
int
vlistID
,
int
varID
);
/* vlistDefVarCode: Define the code number of a Variable */
void
vlistDefVarCode
(
int
vlistID
,
int
varID
,
int
code
);
...
...
src/make_cdilib
View file @
b8eb262e
...
...
@@ -27,7 +27,7 @@ cat > ${PROG} << EOR
/* Automatically generated by
$USER
at
$DATE
, do not edit */
/* CDILIB_VERSION=
$CDILIBVERSION
*/
/* CDILIB_VERSION=
$
{
CDILIBVERSION
}
*/
#if defined (HAVE_CONFIG_H)
# include "config.h"
...
...
@@ -137,7 +137,6 @@ done
if
test
-f
config.h
;
then
cpp
-P
-DHAVE_CONFIG_H
-I
./
$srcdir
/version.c
>>
${
PROG
}
CDIVERSION
=
`
grep
PACKAGE_VERSION config.h |
cut
-f3
-d
" "
`
else
echo
"error: missing config.h"
fi
...
...
src/stream.c
View file @
b8eb262e
...
...
@@ -694,7 +694,7 @@ int streamOpen(const char *filename, const char *filemode, int filetype)
if
(
streamptr
->
filemode
==
'r'
)
{
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
streamptr
->
vlistID
=
vlistCreate
();
/* cdiReadByteorder(streamID); */
status
=
cdiInqContents
(
streamID
);
...
...
@@ -795,7 +795,7 @@ int streamOpenA(const char *filename, const char *filemode, int filetype)
}
else
{
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
streamptr
=
stream_new_entry
();
streamID
=
streamptr
->
self
;
...
...
src/stream_cdf.c
View file @
b8eb262e
...
...
@@ -6148,7 +6148,7 @@ void cdfDefGlobalAtts(int streamID)
{
#if defined (HAVE_LIBNETCDF)
int
fileID
,
vlistID
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
stream_t
*
streamptr
;
int
natts
;
...
...
src/varscan.c
View file @
b8eb262e
...
...
@@ -546,7 +546,7 @@ int varDefGrid(int vlistID, grid_t grid, int mode)
int
ngrids
;
int
gridID
=
UNDEFID
;
int
index
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -662,7 +662,7 @@ int varDefZaxis(int vlistID, int zaxistype, int nlevels, double *levels, int lbo
int
zaxisID
=
UNDEFID
;
int
index
;
int
zaxisglobdefined
=
0
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
src/vlist.c
View file @
b8eb262e
...
...
@@ -40,7 +40,7 @@ static pthread_mutex_t _vlist_mutex;
typedef
struct
_vlistPtrToIdx
{
int
idx
;
VLIST
*
ptr
;
vlist_t
*
ptr
;
struct
_vlistPtrToIdx
*
next
;
}
vlistPtrToIdx
;
...
...
@@ -84,10 +84,10 @@ static void vlist_init_pointer(void)
}
VLIST
*
vlist_to_pointer
(
int
idx
)
vlist_t
*
vlist_to_pointer
(
int
idx
)
{
static
char
func
[]
=
"vlist_to_pointer"
;
VLIST
*
vlistptr
=
NULL
;
vlist_t
*
vlistptr
=
NULL
;
VLIST_INIT
...
...
@@ -107,7 +107,7 @@ VLIST *vlist_to_pointer(int idx)
/* Create an index from a pointer */
static
int
vlist_from_pointer
(
VLIST
*
ptr
)
static
int
vlist_from_pointer
(
vlist_t
*
ptr
)
{
static
char
func
[]
=
"vlist_from_pointer"
;
int
idx
=
-
1
;
...
...
@@ -140,7 +140,7 @@ static int vlist_from_pointer(VLIST *ptr)
}
static
void
vlist_init_entry
(
VLIST
*
vlistptr
)
static
void
vlist_init_entry
(
vlist_t
*
vlistptr
)
{
vlistptr
->
self
=
vlist_from_pointer
(
vlistptr
);
...
...
@@ -160,12 +160,12 @@ static void vlist_init_entry(VLIST *vlistptr)
}
static
VLIST
*
vlist_new_entry
(
void
)
static
vlist_t
*
vlist_new_entry
(
void
)
{
static
char
func
[]
=
"vlist_new_entry"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
(
VLIST
*
)
malloc
(
sizeof
(
VLIST
));
vlistptr
=
(
vlist_t
*
)
malloc
(
sizeof
(
vlist_t
));
if
(
vlistptr
)
vlist_init_entry
(
vlistptr
);
...
...
@@ -173,7 +173,7 @@ static VLIST *vlist_new_entry(void)
}
static
void
vlist_delete_entry
(
VLIST
*
vlistptr
)
static
void
vlist_delete_entry
(
vlist_t
*
vlistptr
)
{
static
char
func
[]
=
"vlist_delete_entry"
;
int
idx
;
...
...
@@ -220,18 +220,18 @@ static void vlist_initialize(void)
}
static
void
vlist_copy
(
VLIST
*
vlistptr2
,
VLIST
*
vlistptr1
)
static
void
vlist_copy
(
vlist_t
*
vlistptr2
,
vlist_t
*
vlistptr1
)
{
int
vlistID2
;
vlistID2
=
vlistptr2
->
self
;
memcpy
(
vlistptr2
,
vlistptr1
,
sizeof
(
VLIST
));
memcpy
(
vlistptr2
,
vlistptr1
,
sizeof
(
vlist_t
));
vlistptr2
->
atts
.
nelems
=
0
;
vlistptr2
->
self
=
vlistID2
;
}
static
void
vlist_check_ptr
(
const
char
*
func
,
VLIST
*
vlistptr
)
static
void
vlist_check_ptr
(
const
char
*
func
,
vlist_t
*
vlistptr
)
{
if
(
vlistptr
==
NULL
)
Error
(
func
,
"vlist undefined!"
);
...
...
@@ -267,7 +267,7 @@ int vlistCreate(void)
{
static
char
func
[]
=
"vlistCreate"
;
int
vlistID
=
0
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
VLIST_INIT
...
...
@@ -295,7 +295,7 @@ int vlistCreate(void)
void
vlistDestroy
(
int
vlistID
)
{
static
char
func
[]
=
"vlistDestroy"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -330,7 +330,7 @@ void vlistDestroy(int vlistID)
int
vlistNlock
(
int
vlistID
)
{
static
char
func
[]
=
"vlistNlock"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -342,7 +342,7 @@ int vlistNlock(int vlistID)
void
vlistLock
(
int
vlistID
)
{
static
char
func
[]
=
"vlistLock"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -355,7 +355,7 @@ void vlistLock(int vlistID)
void
vlistUnlock
(
int
vlistID
)
{
static
char
func
[]
=
"vlistUnlock"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -383,7 +383,7 @@ The function @func{vlistCopy} copies all entries from vlistID1 to vlistID2.
void
vlistCopy
(
int
vlistID2
,
int
vlistID1
)
{
static
char
func
[]
=
"vlistCopy"
;
VLIST
*
vlistptr1
,
*
vlistptr2
;
vlist_t
*
vlistptr1
,
*
vlistptr2
;
vlistptr1
=
vlist_to_pointer
(
vlistID1
);
vlistptr2
=
vlist_to_pointer
(
vlistID2
);
...
...
@@ -451,7 +451,7 @@ int vlistDuplicate(int vlistID)
{
static
char
func
[]
=
"vlistDuplicate"
;
int
vlistIDnew
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -468,7 +468,7 @@ int vlistDuplicate(int vlistID)
void
vlistClearFlag
(
int
vlistID
)
{
int
varID
,
levID
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -492,7 +492,7 @@ int vlistInqZaxis(int vlistID, int zaxistype, int nlevels, double *levels, int l
int
zaxisID
=
CDI_UNDEFID
;
int
index
;
int
zaxisglobdefined
=
0
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -570,7 +570,7 @@ The function @func{vlistCopyFlag} copies all entries with a flag from vlistID1 t
void
vlistCopyFlag
(
int
vlistID2
,
int
vlistID1
)
{
static
char
func
[]
=
"vlistCopyFlag"
;
VLIST
*
vlistptr1
,
*
vlistptr2
;
vlist_t
*
vlistptr1
,
*
vlistptr2
;
vlistptr1
=
vlist_to_pointer
(
vlistID1
);
vlistptr2
=
vlist_to_pointer
(
vlistID2
);
...
...
@@ -738,7 +738,7 @@ void vlistCat(int vlistID2, int vlistID1)
int
nvars
,
nvars1
,
nvars2
;
int
varID
,
varID2
,
nlevs
;
int
index
,
gridID
,
zaxisID
;
VLIST
*
vlistptr1
,
*
vlistptr2
;
vlist_t
*
vlistptr1
,
*
vlistptr2
;
vlistptr1
=
vlist_to_pointer
(
vlistID1
);
vlistptr2
=
vlist_to_pointer
(
vlistID2
);
...
...
@@ -830,7 +830,7 @@ void vlistMerge(int vlistID2, int vlistID1)
int
zaxisID1
,
zaxisID2
;
int
*
lvar
;
double
*
levels
;
VLIST
*
vlistptr1
,
*
vlistptr2
;
vlist_t
*
vlistptr1
,
*
vlistptr2
;
vlistptr1
=
vlist_to_pointer
(
vlistID1
);
vlistptr2
=
vlist_to_pointer
(
vlistID2
);
...
...
@@ -960,7 +960,7 @@ The function @func{vlistNvars} returns the number of variables in the variable l
int
vlistNvars
(
int
vlistID
)
{
static
char
func
[]
=
"vlistNvars"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -973,7 +973,7 @@ int vlistNrecs(int vlistID)
{
static
char
func
[]
=
"vlistNrecs"
;
int
varID
,
nrecs
=
0
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1005,7 +1005,7 @@ The function @func{vlistNgrids} returns the number of grids in the variable list
int
vlistNgrids
(
int
vlistID
)
{
static
char
func
[]
=
"vlistNgrids"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1034,7 +1034,7 @@ The function @func{vlistNzaxis} returns the number of zaxis in the variable list
int
vlistNzaxis
(
int
vlistID
)
{
static
char
func
[]
=
"vlistNzaxis"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1047,7 +1047,7 @@ int vlistNzaxis(int vlistID)
void
vlistDefNtsteps
(
int
vlistID
,
int
nts
)
{
static
char
func
[]
=
"vlistDefNtsteps"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1060,7 +1060,7 @@ void vlistDefNtsteps(int vlistID, int nts)
int
vlistNtsteps
(
int
vlistID
)
{
static
char
func
[]
=
"vlistNtsteps"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1079,7 +1079,7 @@ void vlistPrint(int vlistID)
int
dtype
;
char
*
name
,
*
longname
,
*
units
;
double
level
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1161,7 +1161,7 @@ The function @func{vlistDefTaxis} defines the time axis of a variable list.
void
vlistDefTaxis
(
int
vlistID
,
int
taxisID
)
{
static
char
func
[]
=
"vlistDefTaxis"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1190,7 +1190,7 @@ The function @func{vlistInqTaxis} returns the time axis of a variable list.
int
vlistInqTaxis
(
int
vlistID
)
{
static
char
func
[]
=
"vlistInqTaxis"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1202,7 +1202,7 @@ int vlistInqTaxis(int vlistID)
void
vlistDefTable
(
int
vlistID
,
int
tableID
)
{
static
char
func
[]
=
"vlistDefTable"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1214,7 +1214,7 @@ void vlistDefTable(int vlistID, int tableID)
int
vlistInqTable
(
int
vlistID
)
{
static
char
func
[]
=
"vlistInqTable"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1226,7 +1226,7 @@ int vlistInqTable(int vlistID)
void
vlistDefInstitut
(
int
vlistID
,
int
instID
)
{
static
char
func
[]
=
"vlistDefInstitut"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1239,7 +1239,7 @@ int vlistInqInstitut(int vlistID)
{
static
char
func
[]
=
"vlistInqInstitut"
;
int
varID
,
instID
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1267,7 +1267,7 @@ int vlistInqInstitut(int vlistID)
void
vlistDefModel
(
int
vlistID
,
int
modelID
)
{
static
char
func
[]
=
"vlistDefModel"
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1280,7 +1280,7 @@ int vlistInqModel(int vlistID)
{
static
char
func
[]
=
"vlistInqModel"
;
int
varID
,
modelID
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1310,7 +1310,7 @@ int vlistGridsizeMax(int vlistID)
static
char
func
[]
=
"vlistGridsizeMax"
;
int
gridsize
,
gridsizemax
=
0
;
int
gridID
,
index
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1330,7 +1330,7 @@ int vlistGrid(int vlistID, int index)
{
static
char
func
[]
=
"vlistGrid"
;
int
gridID
=
CDI_UNDEFID
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1347,7 +1347,7 @@ int vlistGridIndex(int vlistID, int gridID)
{
static
char
func
[]
=
"vlistGridIndex"
;
int
index
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1367,7 +1367,7 @@ void vlistChangeGridIndex(int vlistID, int index, int gridID)
static
char
func
[]
=
"vlistChangeGridIndex"
;
int
gridIDold
;
int
varID
,
nvars
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1388,7 +1388,7 @@ void vlistChangeGrid(int vlistID, int gridID1, int gridID2)
static
char
func
[]
=
"vlistChangeGrid"
;
int
varID
,
nvars
;
int
index
,
ngrids
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1415,7 +1415,7 @@ int vlistZaxis(int vlistID, int index)
{
static
char
func
[]
=
"vlistZaxis"
;
int
zaxisID
=
CDI_UNDEFID
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1431,7 +1431,7 @@ int vlistZaxisIndex(int vlistID, int zaxisID)
{
static
char
func
[]
=
"vlistZaxisIndex"
;
int
index
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1451,7 +1451,7 @@ void vlistChangeZaxisIndex(int vlistID, int index, int zaxisID)
int
zaxisIDold
;
int
varID
,
nvars
;
int
nlevs
,
levID
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1490,7 +1490,7 @@ void vlistChangeZaxis(int vlistID, int zaxisID1, int zaxisID2)
int
varID
,
nvars
;
int
index
,
nzaxis
;
int
nlevs
,
levID
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -1536,7 +1536,7 @@ int vlistHasTime(int vlistID)
static
char
func
[]
=
"vlistHasTime"
;
int
varID
;
int
hastime
=
FALSE
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
src/vlist.h
View file @
b8eb262e
...
...
@@ -46,6 +46,7 @@ typedef struct
int
isUsed
;
int
mvarID
;
int
fvarID
;
int
param
;
int
code
;
int
gridID
;
int
zaxisID
;
...
...
@@ -92,26 +93,26 @@ typedef struct
VARINFO
*
vars
;
CDI_atts
atts
;
}
VLIST
;
VLIST
*
vlist_to_pointer
(
int
vlistID
);
void
vlistCheckVarID
(
char
*
func
,
int
vlistID
,
int
varID
);
int
vlistNlock
(
int
vlistID
);
void
vlistLock
(
int
vlistID
);
void
vlistUnlock
(
int
vlistID
);
char
*
vlistInqVarNamePtr
(
int
vlistID
,
int
varID
);
char
*
vlistInqVarLongnamePtr
(
int
vlistID
,
int
varID
);
char
*
vlistInqVarStdnamePtr
(
int
vlistID
,
int
varID
);
char
*
vlistInqVarUnitsPtr
(
int
vlistID
,
int
varID
);
void
vlistDestroyVarName
(
int
vlistID
,
int
varID
);
void
vlistDestroyVarLongname
(
int
vlistID
,
int
varID
);
void
vlistDestroyVarUnits
(
int
vlistID
,
int
varID
);
void
vlistDefVarTime
(
int
vlistID
,
int
varID
,
int
timeID
);
int
vlistInqVarMissvalUsed
(
int
vlistID
,
int
varID
);
int
vlistHasTime
(
int
vlistID
);
int
vlistDelAtts
(
int
vlistID
,
int
varID
);
int
vlistCopyVarAtts
(
int
vlistID1
,
int
varID_1
,
int
vlistID2
,
int
varID_2
);
vlist_t
;
vlist_t
*
vlist_to_pointer
(
int
vlistID
);
void
vlistCheckVarID
(
char
*
func
,
int
vlistID
,
int
varID
);
int
vlistNlock
(
int
vlistID
);
void
vlistLock
(
int
vlistID
);
void
vlistUnlock
(
int
vlistID
);
char
*
vlistInqVarNamePtr
(
int
vlistID
,
int
varID
);
char
*
vlistInqVarLongnamePtr
(
int
vlistID
,
int
varID
);
char
*
vlistInqVarStdnamePtr
(
int
vlistID
,
int
varID
);
char
*
vlistInqVarUnitsPtr
(
int
vlistID
,
int
varID
);
void
vlistDestroyVarName
(
int
vlistID
,
int
varID
);
void
vlistDestroyVarLongname
(
int
vlistID
,
int
varID
);
void
vlistDestroyVarUnits
(
int
vlistID
,
int
varID
);
void
vlistDefVarTime
(
int
vlistID
,
int
varID
,
int
timeID
);
int
vlistInqVarMissvalUsed
(
int
vlistID
,
int
varID
);
int
vlistHasTime
(
int
vlistID
);
int
vlistDelAtts
(
int
vlistID
,
int
varID
);
int
vlistCopyVarAtts
(
int
vlistID1
,
int
varID_1
,
int
vlistID2
,
int
varID_2
);
#endif
/* _VLIST_H */
src/vlist_att.c
View file @
b8eb262e
...
...
@@ -10,7 +10,7 @@
static
CDI_atts
*
get_attsp
(
VLIST
*
vlistptr
,
int
varID
)
CDI_atts
*
get_attsp
(
vlist_t
*
vlistptr
,
int
varID
)
{
static
char
func
[]
=
"get_attsp"
;
CDI_atts
*
attsp
=
NULL
;
...
...
@@ -120,7 +120,7 @@ int vlistInqNatts(int vlistID, int varID, int *nattsp)
{
static
char
func
[]
=
"vlistInqNatts"
;
int
status
=
CDI_NOERR
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
CDI_atts
*
attsp
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -156,7 +156,7 @@ int vlistInqAtt(int vlistID, int varID, int attnum, char *name, int *typep, int
{
static
char
func
[]
=
"vlistInqAtt"
;
int
status
=
CDI_NOERR
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
CDI_att
*
attp
=
NULL
;
CDI_atts
*
attsp
;
...
...
@@ -191,7 +191,7 @@ int vlistDelAtts(int vlistID, int varID)
{
static
char
func
[]
=
"vlistDelAtts"
;
int
status
=
CDI_NOERR
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
CDI_att
*
attp
=
NULL
;
CDI_atts
*
attsp
;
int
attid
;
...
...
@@ -229,7 +229,7 @@ int vlist_def_att(int type, int vlistID, int varID, const char *name, size_t len
{
static
char
func
[]
=
"vlist_def_att"
;
int
status
=
CDI_NOERR
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
CDI_att
*
attp
;
CDI_atts
*
attsp
;
...
...
@@ -259,7 +259,7 @@ int vlist_inq_att(int type, int vlistID, int varID, const char *name, size_t mxs
{
static
char
func
[]
=
"vlist_inq_att"
;
int
status
=
CDI_NOERR
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
CDI_att
*
attp
;
CDI_atts
*
attsp
;
size_t
xsz
;
...
...
@@ -295,7 +295,7 @@ int vlistCopyVarAtts(int vlistID1, int varID_1, int vlistID2, int varID_2)
{
static
char
func
[]
=
"vlistCopyVarAtts"
;
int
status
=
CDI_NOERR
;
VLIST
*
vlistptr1
;
vlist_t
*
vlistptr1
;
CDI_att
*
attp
=
NULL
;
CDI_atts
*
attsp1
;
int
attid
;
...
...
src/vlist_var.c
View file @
b8eb262e
...
...
@@ -12,13 +12,14 @@
static
void
vlistvarInitEntry
(
int
vlistID
,
int
varID
)
{
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
vlistptr
->
vars
[
varID
].
fvarID
=
varID
;
vlistptr
->
vars
[
varID
].
mvarID
=
varID
;
vlistptr
->
vars
[
varID
].
flag
=
0
;
vlistptr
->
vars
[
varID
].
param
=
CDI_UNDEFID
;
vlistptr
->
vars
[
varID
].
code
=
0
;
vlistptr
->
vars
[
varID
].
timeID
=
CDI_UNDEFID
;
vlistptr
->
vars
[
varID
].
datatype
=
CDI_UNDEFID
;
...
...
@@ -51,7 +52,7 @@ static int vlistvarNewEntry(int vlistID)
int
varID
=
0
;
int
vlistvarSize
;
VARINFO
*
vlistvar
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -116,7 +117,7 @@ static int vlistvarNewEntry(int vlistID)
void
vlistCheckVarID
(
char
*
func
,
int
vlistID
,
int
varID
)
{
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -175,7 +176,7 @@ int vlistDefVar(int vlistID, int gridID, int zaxisID, int timeID)
int
nlevs
;
int
levID
;
int
index
;
VLIST
*
vlistptr
;
vlist_t
*
vlistptr
;
vlistptr
=
vlist_to_pointer
(
vlistID
);
...
...
@@ -240,6 +241,34 @@ int vlistDefVar(int vlistID, int gridID, int zaxisID, int timeID)
}