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

cdiInqContents: read global text attributes only when len > 0

parent 41711f33
2006-09-?? Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.0.1
* Version 1.0.1 released
2006-08-01 Uwe Schulzweida <Uwe.Schulzweida@zmaw.de>
* using GRIB library version 1.0.1
......
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for cdi 1.0.1.
# Generated by GNU Autoconf 2.59 for cdi 1.0.2.
#
# Report bugs to <Uwe.Schulzweida@zmaw.de>.
#
......@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='cdi'
PACKAGE_TARNAME='cdi'
PACKAGE_VERSION='1.0.1'
PACKAGE_STRING='cdi 1.0.1'
PACKAGE_VERSION='1.0.2'
PACKAGE_STRING='cdi 1.0.2'
PACKAGE_BUGREPORT='Uwe.Schulzweida@zmaw.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 1.0.1 to adapt to many kinds of systems.
\`configure' configures cdi 1.0.2 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 1.0.1:";;
short | recursive ) echo "Configuration of cdi 1.0.2:";;
esac
cat <<\_ACEOF
......@@ -1006,7 +1006,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
cdi configure 1.0.1
cdi configure 1.0.2
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 1.0.1, which was
It was created by cdi $as_me 1.0.2, 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=1.0.1
VERSION=1.0.2
cat >>confdefs.h <<_ACEOF
......@@ -6400,7 +6400,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by cdi $as_me 1.0.1, which was
This file was extended by cdi $as_me 1.0.2, 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 1.0.1
cdi config.status 1.0.2
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
......
# Process this file with autoconf to produce a configure script.
AC_INIT(cdi, 1.0.1, Uwe.Schulzweida@zmaw.de)
AC_INIT(cdi, 1.0.2, Uwe.Schulzweida@zmaw.de)
CONFIG_ABORT=yes
......
/* Generated automatically from m214003 on Tue Aug 1 14:58:09 CEST 2006 */
/* Generated automatically from m214003 on Fri Aug 25 08:58:12 CEST 2006 */
#if defined (HAVE_CONFIG_H)
# include "config.h"
......@@ -3993,10 +3993,14 @@ static int decodeGDS(unsigned char *gds, int *isec0, int *isec2, double *fsec2,
*/
}
else
Message(func, "Gridtype %d unsupported", ISEC2_GridType);
{
ISEC2_NumLon = GDS_NumLon;
ISEC2_NumLat = GDS_NumLat;
Message(func, "Gridtype %d unsupported", ISEC2_GridType);
}
/* vertical coordinate parameters for hybrid levels. */
/* get number of vertical coordinate parameters, if any. */
/* vertical coordinate parameters for hybrid levels. */
/* get number of vertical coordinate parameters, if any. */
ISEC2_NumVCP = 0;
......@@ -7948,7 +7952,7 @@ int gribUnzip(unsigned char *dbuf, long dbufsize, unsigned char *sbuf, long sbu
return (gribLen);
}
static const char grb_libvers[] = "1.0.1" " of ""Aug 1 2006"" ""14:58:09";
static const char grb_libvers[] = "1.0.2" " of ""Aug 25 2006"" ""08:58:12";
......
......@@ -256,7 +256,7 @@ static void cdfGetAttText(int fileID, int ncvarid, char *attname, char *atttext,
cdf_inq_attlen(fileID, ncvarid, attname, &attlen);
if ( (int) attlen < 65636 )
if ( (int) attlen < sizeof(attbuf) )
{
cdf_get_att_text(fileID, ncvarid, attname, attbuf);
......@@ -3130,38 +3130,44 @@ int cdfInqContents(int streamID)
{
cdf_inq_attname(fileID, NC_GLOBAL, iatt, attname);
cdf_inq_atttype(fileID, NC_GLOBAL, attname, &xtype);
cdf_inq_attlen(fileID, NC_GLOBAL, attname, &attlen);
if ( xtype == NC_CHAR )
{
if ( strcmp(attname, "history") == 0 )
{
streams[streamID].historyID = iatt;
}
else if ( strcmp(attname, "institution") == 0 )
{
cdfGetAttText(fileID, NC_GLOBAL, attname, attstring, attstringlen);
instID = institutInq(0, 0, NULL, attstring);
if ( instID == UNDEFID )
instID = institutDef(0, 0, NULL, attstring);
}
else if ( strcmp(attname, "source") == 0 )
{
cdfGetAttText(fileID, NC_GLOBAL, attname, attstring, attstringlen);
modelID = modelInq(-1, 0, attstring);
}
else if ( strcmp(attname, "Conventions") == 0 )
{
}
else if ( strcmp(attname, "CDI") == 0 )
{
}
else if ( strcmp(attname, "CDO") == 0 )
{
}
else
cdfGetAttText(fileID, NC_GLOBAL, attname, attstring, attstringlen);
if ( attlen > 0 && attstring[0] != 0 )
{
cdfGetAttText(fileID, NC_GLOBAL, attname, attstring, attstringlen);
vlistDefAttribute(vlistID, attname, attstring);
if ( strcmp(attname, "history") == 0 )
{
streams[streamID].historyID = iatt;
}
else if ( strcmp(attname, "institution") == 0 )
{
cdfGetAttText(fileID, NC_GLOBAL, attname, attstring, attstringlen);
instID = institutInq(0, 0, NULL, attstring);
if ( instID == UNDEFID )
instID = institutDef(0, 0, NULL, attstring);
}
else if ( strcmp(attname, "source") == 0 )
{
cdfGetAttText(fileID, NC_GLOBAL, attname, attstring, attstringlen);
modelID = modelInq(-1, 0, attstring);
}
else if ( strcmp(attname, "Conventions") == 0 )
{
}
else if ( strcmp(attname, "CDI") == 0 )
{
}
else if ( strcmp(attname, "CDO") == 0 )
{
}
else
{
cdfGetAttText(fileID, NC_GLOBAL, attname, attstring, attstringlen);
vlistDefAttribute(vlistID, attname, attstring);
}
}
}
else if ( xtype == NC_INT )
......
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