mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Merged with latest trunk.
This commit is contained in:
commit
98675a8047
@ -668,7 +668,7 @@ if test "x$enable_netcdf_4" = xyes; then
|
||||
AC_SEARCH_LIBS([H5DSis_scale], [hdf5_hldll hdf5_hl], [],
|
||||
[AC_MSG_ERROR([Can't find or link to the hdf5 high-level. Use --disable-netcdf-4, or see config.log for errors.])])
|
||||
|
||||
AC_CHECK_HEADERS([hdf5.h], [], [AC_MSG_ERROR([NetCDF-4 requires HDF5, but hdf5.h cannot be found.])])
|
||||
AC_CHECK_HEADERS([hdf5.h], [], [AC_MSG_ERROR([Compiling a test with HDF5 failed. Either hdf5.h cannot be found, or config.log should be checked for other reason.])])
|
||||
AC_CHECK_FUNCS([H5Pget_fapl_mpiposix H5Pget_fapl_mpio H5Pset_deflate H5Z_SZIP])
|
||||
|
||||
# The user may have parallel HDF5 based on MPI POSIX.
|
||||
|
@ -388,3 +388,4 @@ computefieldinfo(struct NCAUX_CMPD* cmpd)
|
||||
done:
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -3900,8 +3900,11 @@ nc4_rec_match_dimscales(NC_GRP_INFO_T *grp)
|
||||
{
|
||||
if (!(h5dimlen = malloc(var->ndims * sizeof(hsize_t))))
|
||||
return NC_ENOMEM;
|
||||
if (!(h5dimlenmax = malloc(var->ndims * sizeof(hsize_t))))
|
||||
if (!(h5dimlenmax = malloc(var->ndims * sizeof(hsize_t))))
|
||||
{
|
||||
free(h5dimlen);
|
||||
return NC_ENOMEM;
|
||||
}
|
||||
if ((dataset_ndims = H5Sget_simple_extent_dims(spaceid, h5dimlen,
|
||||
h5dimlenmax)) < 0)
|
||||
return NC_EHDFERR;
|
||||
|
@ -435,19 +435,16 @@ processvars(void)
|
||||
int i,j;
|
||||
for(i=0;i<listlength(vardefs);i++) {
|
||||
Symbol* vsym = (Symbol*)listget(vardefs,i);
|
||||
Symbol* tsym = vsym->typ.basetype;
|
||||
Symbol* basetype = vsym->typ.basetype;
|
||||
/* fill in the typecode*/
|
||||
vsym->typ.typecode = tsym->typ.typecode;
|
||||
for(j=0;j<tsym->typ.dimset.ndims;j++) {
|
||||
/* deref the dimensions*/
|
||||
tsym->typ.dimset.dimsyms[j] = tsym->typ.dimset.dimsyms[j];
|
||||
#ifndef USE_NETCDF4
|
||||
/* UNLIMITED must only be in first place*/
|
||||
if(tsym->typ.dimset.dimsyms[j]->dim.declsize == NC_UNLIMITED) {
|
||||
if(j != 0)
|
||||
vsym->typ.typecode = basetype->typ.typecode;
|
||||
for(j=0;j<vsym->typ.dimset.ndims;j++) {
|
||||
/* validate the dimensions*/
|
||||
/* UNLIMITED must only be in first place if using classic */
|
||||
if(vsym->typ.dimset.dimsyms[j]->dim.declsize == NC_UNLIMITED) {
|
||||
if(usingclassic && j != 0)
|
||||
semerror(vsym->lineno,"Variable: %s: UNLIMITED must be in first dimension only",fullname(vsym));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -934,8 +931,10 @@ processunlimiteddims(void)
|
||||
} else {
|
||||
for(i=0;i<var->data->length;i++) {
|
||||
Constant* con = var->data->data+i;
|
||||
ASSERT(con->nctype == NC_COMPOUND);
|
||||
computeunlimitedsizes(dimset,first,con->value.compoundv,ischar);
|
||||
if(con->nctype != NC_COMPOUND)
|
||||
semerror(con->lineno,"UNLIMITED dimension (other than first) must be enclosed in {}");
|
||||
else
|
||||
computeunlimitedsizes(dimset,first,con->value.compoundv,ischar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,9 +1,8 @@
|
||||
/* A Bison parser, made by GNU Bison 2.4.2. */
|
||||
/* A Bison parser, made by GNU Bison 2.6.2. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2006, 2009-2010 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -31,6 +30,15 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef NCG_NCGEN_TAB_H
|
||||
# define NCG_NCGEN_TAB_H
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int ncgdebug;
|
||||
#endif
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
@ -62,7 +70,6 @@
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef int YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
@ -72,4 +79,18 @@ typedef int YYSTYPE;
|
||||
|
||||
extern YYSTYPE ncglval;
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int ncgparse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int ncgparse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int ncgparse (void);
|
||||
#else
|
||||
int ncgparse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
#endif /* !NCG_NCGEN_TAB_H */
|
||||
|
Loading…
Reference in New Issue
Block a user