Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
libcdi
Commits
26d58960
Commit
26d58960
authored
Nov 12, 2014
by
Thomas Jahns
🤸
Browse files
Change return type of getter institutInqNamePtr.
parent
faa0c900
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/cdi.h
View file @
26d58960
...
...
@@ -983,7 +983,7 @@ int institutInq(int center, int subcenter, const char *name, const char *lon
int
institutInqNumber
(
void
);
int
institutInqCenter
(
int
instID
);
int
institutInqSubcenter
(
int
instID
);
char
*
institutInqNamePtr
(
int
instID
);
const
char
*
institutInqNamePtr
(
int
instID
);
char
*
institutInqLongnamePtr
(
int
instID
);
/* Model routines */
...
...
src/institution.c
View file @
26d58960
...
...
@@ -227,7 +227,7 @@ int institutInqSubcenter(int instID)
}
char
*
institutInqNamePtr
(
int
instID
)
const
char
*
institutInqNamePtr
(
int
instID
)
{
institute_t
*
instituteptr
=
NULL
;
...
...
src/stream_cdf.c
View file @
26d58960
...
...
@@ -8225,7 +8225,6 @@ static void cdfDefGlobalAtts(stream_t *streamptr)
static
void
cdfDefLocalAtts
(
stream_t
*
streamptr
)
{
int
varID
,
instID
,
fileID
;
char
*
name
;
size_t
len
;
int
ncvarid
;
int
vlistID
;
...
...
@@ -8246,7 +8245,7 @@ static void cdfDefLocalAtts(stream_t *streamptr)
if
(
instID
!=
UNDEFID
)
{
ncvarid
=
streamptr
->
vars
[
varID
].
ncvarid
;
name
=
institutInqNamePtr
(
instID
);
const
char
*
name
=
institutInqNamePtr
(
instID
);
if
(
name
)
{
len
=
strlen
(
name
);
...
...
src/table.c
View file @
26d58960
...
...
@@ -394,9 +394,10 @@ static int tableFromEnv(int modelID, int tablenum)
int
instID
=
modelInqInstitut
(
modelID
);
if
(
instID
!=
UNDEFID
)
{
if
(
institutInqNamePtr
(
instID
)
)
const
char
*
instName
;
if
(
(
instName
=
institutInqNamePtr
(
instID
))
)
{
strcpy
(
tablename
,
inst
itutInqNamePtr
(
instID
)
);
strcpy
(
tablename
,
inst
Name
);
if
(
tablenum
)
{
size_t
len
=
strlen
(
tablename
);
...
...
@@ -607,8 +608,7 @@ void tableWrite(const char *ptfile, int tableID)
FILE
*
ptfp
;
int
tablenum
,
modelID
,
instID
=
CDI_UNDEFID
;
int
center
=
0
,
subcenter
=
0
;
char
*
instnameptr
=
NULL
;
const
char
*
modelnameptr
=
NULL
;
const
char
*
instnameptr
=
NULL
,
*
modelnameptr
=
NULL
;
if
(
CDI_Debug
)
Message
(
"write parameter table %d to %s"
,
tableID
,
ptfile
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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