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
701bf9c1
Commit
701bf9c1
authored
Apr 12, 2006
by
Uwe Schulzweida
Browse files
update dmemory.c
parent
2b256d10
Changes
9
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
701bf9c1
2006-05-?? Uwe Schulzweida <schulzweida@dkrz.de>
* Version 0.9.7 released
2006-03-08 Uwe Schulzweida <schulzweida@dkrz.de>
* using GRIB library version 0.6.5
* vlist_var: Add function vlistChangeVarGrid
* program cdi: add option -s for short info
* cdfInqContents: improve GRID_CELL support
* cdfDefTime: attr text bounds for time axis (bug
fix [
Veronika
]
)
* cdfDefTime: attr text bounds for time axis (bug
report:
Veronika)
* gridToZonal: add support for GRID_GENERIC if ny > 1
* Version 0.9.6 released
...
...
configure
View file @
701bf9c1
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for cdi 0.9.
6
.
# Generated by GNU Autoconf 2.59 for cdi 0.9.
7
.
#
# Report bugs to <schulzweida@dkrz.de>.
#
...
...
@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME
=
'cdi'
PACKAGE_TARNAME
=
'cdi'
PACKAGE_VERSION
=
'0.9.
6
'
PACKAGE_STRING
=
'cdi 0.9.
6
'
PACKAGE_VERSION
=
'0.9.
7
'
PACKAGE_STRING
=
'cdi 0.9.
7
'
PACKAGE_BUGREPORT
=
'schulzweida@dkrz.de'
# Factoring default headers for most tests.
...
...
@@ -795,7 +795,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat
<<
_ACEOF
\`
configure' configures cdi 0.9.
6
to adapt to many kinds of systems.
\`
configure' configures cdi 0.9.
7
to adapt to many kinds of systems.
Usage:
$0
[OPTION]... [VAR=VALUE]...
...
...
@@ -862,7 +862,7 @@ fi
if
test
-n
"
$ac_init_help
"
;
then
case
$ac_init_help
in
short
|
recursive
)
echo
"Configuration of cdi 0.9.
6
:"
;;
short
|
recursive
)
echo
"Configuration of cdi 0.9.
7
:"
;;
esac
cat
<<
\
_ACEOF
...
...
@@ -1006,7 +1006,7 @@ fi
test
-n
"
$ac_init_help
"
&&
exit
0
if
$ac_init_version
;
then
cat
<<
\
_ACEOF
cdi configure 0.9.
6
cdi configure 0.9.
7
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
...
...
@@ -1020,7 +1020,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by cdi
$as_me
0.9.
6
, which was
It was created by cdi
$as_me
0.9.
7
, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0
$@
...
...
@@ -1707,7 +1707,7 @@ fi
# Define the identity of the package.
PACKAGE
=
cdi
VERSION
=
0.9.
6
VERSION
=
0.9.
7
cat
>>
confdefs.h
<<
_ACEOF
...
...
@@ -6400,7 +6400,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by cdi
$as_me
0.9.
6
, which was
This file was extended by cdi
$as_me
0.9.
7
, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES =
$CONFIG_FILES
...
...
@@ -6463,7 +6463,7 @@ _ACEOF
cat
>>
$CONFIG_STATUS
<<
_ACEOF
ac_cs_version="
\\
cdi config.status 0.9.
6
cdi config.status 0.9.
7
configured by
$0
, generated by GNU Autoconf 2.59,
with options
\\
"`echo "
$ac_configure_args
" | sed 's/[
\\
""
\`\$
]/
\\\\
&/g'`
\\
"
...
...
configure.ac
View file @
701bf9c1
# Process this file with autoconf to produce a configure script.
AC_INIT(cdi, 0.9.
6
, schulzweida@dkrz.de)
AC_INIT(cdi, 0.9.
7
, schulzweida@dkrz.de)
CONFIG_ABORT=yes
...
...
src/dmemory.c
View file @
701bf9c1
...
...
@@ -10,11 +10,13 @@
#include
<errno.h>
#if ! defined (HAVE_CONFIG_H)
#if ! defined (HAVE_MALLOC_H)
# if defined (__sun) || defined (__i386) || defined (__ia64) || defined (SX)
# define HAVE_MALLOC_H
# endif
#endif
#endif
#if defined (HAVE_MALLOC_H)
# define HAVE_MALLINFO
...
...
@@ -82,6 +84,7 @@ static void memInternalProblem(const char *caller, const char *fmt, ...)
exit
(
EXIT_FAILURE
);
}
static
void
memError
(
const
char
*
caller
,
const
char
*
file
,
int
line
,
size_t
size
)
{
printf
(
"
\n
"
);
...
...
@@ -94,6 +97,7 @@ static void memError(const char *caller, const char *file, int line, size_t size
exit
(
EXIT_FAILURE
);
}
static
void
memListPrintEntry
(
int
mtype
,
int
item
,
size_t
size
,
void
*
ptr
,
const
char
*
caller
,
const
char
*
file
,
int
line
)
{
...
...
@@ -126,6 +130,7 @@ static void memListPrintEntry(int mtype, int item, size_t size, void *ptr,
fprintf
(
stderr
,
"]
\n
"
);
}
static
void
memListPrintTable
(
void
)
{
int
memID
,
item
,
item1
,
item2
=
0
;
...
...
@@ -184,6 +189,7 @@ static void memListPrintTable(void)
}
}
static
void
memGetDebugLevel
(
void
)
{
char
*
debugLevel
;
...
...
@@ -200,6 +206,7 @@ static void memGetDebugLevel(void)
}
}
static
void
memInit
(
void
)
{
static
int
initDebugLevel
=
0
;
...
...
@@ -211,6 +218,7 @@ static void memInit(void)
}
}
static
int
memListDeleteEntry
(
void
*
ptr
,
size_t
*
size
)
{
int
memID
=
0
;
...
...
@@ -234,6 +242,7 @@ static int memListDeleteEntry(void *ptr, size_t *size)
return
(
item
);
}
static
void
memTableInitEntry
(
int
memID
)
{
static
char
func
[]
=
"memTableInitEntry"
;
...
...
@@ -249,6 +258,7 @@ static void memTableInitEntry(int memID)
memTable
[
memID
].
line
=
UNDEFID
;
}
static
int
memListNewEntry
(
int
mtype
,
void
*
ptr
,
size_t
size
,
size_t
nobj
,
const
char
*
caller
,
const
char
*
file
,
int
line
)
{
...
...
@@ -336,6 +346,7 @@ static int memListNewEntry(int mtype, void *ptr, size_t size, size_t nobj,
return
(
item
++
);
}
static
int
memListChangeEntry
(
void
*
ptrold
,
void
*
ptr
,
size_t
size
,
const
char
*
caller
,
const
char
*
file
,
int
line
)
{
...
...
@@ -403,6 +414,7 @@ static int memListChangeEntry(void *ptrold, void *ptr, size_t size,
return
(
item
);
}
void
*
Calloc
(
const
char
*
caller
,
const
char
*
file
,
int
line
,
size_t
nobjs
,
size_t
size
)
{
void
*
ptr
=
NULL
;
...
...
@@ -433,6 +445,7 @@ void *Calloc(const char *caller, const char *file, int line, size_t nobjs, size_
return
(
ptr
);
}
void
*
Malloc
(
const
char
*
caller
,
const
char
*
file
,
int
line
,
size_t
size
)
{
void
*
ptr
=
NULL
;
...
...
@@ -463,6 +476,7 @@ void *Malloc(const char *caller, const char *file, int line, size_t size)
return
(
ptr
);
}
void
*
Realloc
(
const
char
*
caller
,
const
char
*
file
,
int
line
,
void
*
ptrold
,
size_t
size
)
{
void
*
ptr
=
NULL
;
...
...
@@ -498,6 +512,7 @@ void *Realloc(const char *caller, const char *file, int line, void *ptrold, size
return
(
ptr
);
}
void
Free
(
const
char
*
caller
,
const
char
*
file
,
int
line
,
void
*
ptr
)
{
static
char
func
[]
=
"Free"
;
...
...
@@ -523,6 +538,7 @@ void Free(const char *caller, const char *file, int line, void *ptr)
free
(
ptr
);
}
size_t
memTotal
(
void
)
{
size_t
memtotal
=
0
;
...
...
@@ -545,6 +561,7 @@ size_t memTotal(void)
return
(
memtotal
);
}
void
memExitOnError
(
void
)
{
dmemory_ExitOnError
=
1
;
...
...
src/file.c
View file @
701bf9c1
...
...
@@ -243,7 +243,7 @@ static int file_from_pointer(F_I_L_E *ptr)
Message
(
func
,
"Pointer %p has idx %d from file list"
,
ptr
,
idx
);
}
else
Warning
(
func
,
"Too m
uch
open files (limit is %d)!"
,
_file_max
);
Warning
(
func
,
"Too m
any
open files (limit is %d)!"
,
_file_max
);
FILE_UNLOCK
}
...
...
src/grid.c
View file @
701bf9c1
...
...
@@ -153,7 +153,7 @@ static int grid_from_pointer(GRID *ptr)
Message
(
func
,
"Pointer %p has idx %d from grid list"
,
ptr
,
idx
);
}
else
Warning
(
func
,
"Too m
uch
open grids (limit is %d)!"
,
_grid_max
);
Warning
(
func
,
"Too m
any
open grids (limit is %d)!"
,
_grid_max
);
GRID_UNLOCK
}
...
...
src/stream_int.h
View file @
701bf9c1
...
...
@@ -11,6 +11,11 @@
#include
<sys/types.h>
#ifndef strdupx
#ifndef strdup
char
*
strdup
(
const
char
*
s
);
#endif
#define strdupx strdup
/*
#define strdupx(s) \
({ \
const char *__old = (s); \
...
...
@@ -18,6 +23,7 @@
char *__new = (char *) malloc(__len); \
(char *) memcpy(__new, __old, __len); \
})
*/
#endif
#ifndef M_PI
...
...
src/stream_record.c
View file @
701bf9c1
...
...
@@ -496,7 +496,11 @@ void cdiCreateRecords(int streamID, int tsID)
else
nrecords
=
streams
[
streamID
].
tsteps
[
1
].
nallrecs
;
records
=
(
RECORD
*
)
malloc
(
maxrecords
*
sizeof
(
RECORD
));
if
(
maxrecords
>
0
)
records
=
(
RECORD
*
)
malloc
(
maxrecords
*
sizeof
(
RECORD
));
else
records
=
NULL
;
streams
[
streamID
].
tsteps
[
tsID
].
records
=
records
;
streams
[
streamID
].
tsteps
[
tsID
].
recordSize
=
maxrecords
;
streams
[
streamID
].
tsteps
[
tsID
].
nallrecs
=
nrecords
;
...
...
src/vlist.c
View file @
701bf9c1
...
...
@@ -127,7 +127,7 @@ static int vlist_from_pointer(VLIST *ptr)
Message
(
func
,
"Pointer %p has idx %d from vlist list"
,
ptr
,
idx
);
}
else
Warning
(
func
,
"Too m
uch
open vlists (limit is %d)!"
,
_vlist_max
);
Warning
(
func
,
"Too m
any
open vlists (limit is %d)!"
,
_vlist_max
);
VLIST_UNLOCK
}
...
...
@@ -589,7 +589,10 @@ void vlistCopyFlag(int vlistID2, int vlistID1)
if
(
vlistptr1
->
vars
[
varID
].
flag
)
nvars2
++
;
vlistptr2
->
nvars
=
nvars2
;
vlistptr2
->
vars
=
(
VARINFO
*
)
malloc
(
nvars2
*
sizeof
(
VARINFO
));
if
(
nvars2
>
0
)
vlistptr2
->
vars
=
(
VARINFO
*
)
malloc
(
nvars2
*
sizeof
(
VARINFO
));
else
vlistptr2
->
vars
=
NULL
;
varID2
=
0
;
for
(
varID
=
0
;
varID
<
nvars
;
varID
++
)
...
...
@@ -1275,6 +1278,7 @@ int vlistGrid(int vlistID, int index)
return
(
gridID
);
}
int
vlistGridIndex
(
int
vlistID
,
int
gridID
)
{
static
char
func
[]
=
"vlistGridIndex"
;
...
...
@@ -1293,6 +1297,7 @@ int vlistGridIndex(int vlistID, int gridID)
return
(
index
);
}
void
vlistChangeGridIndex
(
int
vlistID
,
int
index
,
int
gridID
)
{
static
char
func
[]
=
"vlistChangeGridIndex"
;
...
...
@@ -1313,6 +1318,7 @@ void vlistChangeGridIndex(int vlistID, int index, int gridID)
vlistptr
->
vars
[
varID
].
gridID
=
gridID
;
}
void
vlistChangeGrid
(
int
vlistID
,
int
gridID1
,
int
gridID2
)
{
static
char
func
[]
=
"vlistChangeGrid"
;
...
...
@@ -1340,6 +1346,7 @@ void vlistChangeGrid(int vlistID, int gridID1, int gridID2)
vlistptr
->
vars
[
varID
].
gridID
=
gridID2
;
}
int
vlistZaxis
(
int
vlistID
,
int
index
)
{
static
char
func
[]
=
"vlistZaxis"
;
...
...
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