Merging latest from trunk. There are a substantial

number of changes.
This commit is contained in:
Ward Fisher 2013-05-22 16:59:41 +00:00
commit a4695c6b46
64 changed files with 3110 additions and 2080 deletions

View File

@ -543,7 +543,7 @@ ENDIF()
# Options to enable parallel IO, tests.
SET(STATUS_PNETCDF "OFF")
OPTION(ENABLE_PNETCDF "Build netCDF-4 with parallel I/O for classic and 64-bit offset files using parallel-netcdf." OFF)
OPTION(ENABLE_PNETCDF "Build with parallel I/O for classic and 64-bit offset files using parallel-netcdf." OFF)
IF(ENABLE_PNETCDF)
# Check for ncmpi_create in libpnetcdf, define USE_PNETCDF
# Does the user want to turn on PNETCDF read ability?
@ -557,6 +557,8 @@ IF(ENABLE_PNETCDF)
SET(STATUS_PNETCDF "ON")
INCLUDE_DIRECTORIES(${PNETCDF_INCLUDE_DIR})
SET(HAVE_LIBPNETCDF ON)
# pnetcdf => parallel
SET(STATUS_PARALLEL "ON")
ENDIF()
@ -719,6 +721,10 @@ add_subdirectory("include")
add_subdirectory(libdispatch)
add_subdirectory(libsrc)
IF (USE_PNETCDF)
add_subdirectory(libsrc5)
ENDIF (USE_PNETCDF)
IF (USE_HDF5)
add_subdirectory(libsrc4)
ENDIF (USE_HDF5)

View File

@ -64,9 +64,9 @@ if BUILD_CDMREMOTE
LIBCDMR = libcdmr
endif
# Build librpc
if BUILD_RPC
LIBRPC = librpc
# Build pnetcdf
if USE_PNETCDF
LIBSRC5 = libsrc5
endif
# Build UDUNITS?
@ -88,7 +88,7 @@ endif
# and run. ncgen must come before ncdump, because their tests
# depend on it.
SUBDIRS = include $(OCLIB) $(H5_TEST_DIR) libdispatch libsrc \
$(LIBSRC4_DIR) $(DAP2) $(LIBCDMR) $(LIBRPC) liblib \
$(LIBSRC4_DIR) $(DAP2) $(LIBCDMR) $(LIBSRC5) liblib \
$(NCGEN3) $(NCGEN) $(NCDUMP) \
$(TESTDIRS) \
man4 $(EXAMPLES) \

3
cf
View File

@ -6,10 +6,11 @@ if test $# != 0 ; then
cmds=$@
fi
HDF5=1
#HDF5=1
DAP=1
#PNETCDF=1
#HDF4=1
#HDF4=1
#RPC=1
#PGI=1
#M32=1

View File

@ -94,7 +94,7 @@
#cmakedefine HAVE_DECL_SIGNBIT 1
#cmakedefine HAVE_DOPRNT
#cmakedefine HAVE_ALLOCA
#cmakedefine HAVE_SSIZE_T 1
#cmakedefine HAVE_LIBPNETCDF
/* Define to 1 if you have the <alloca.h> header file. */

View File

@ -133,7 +133,7 @@ AC_MSG_RESULT($enable_hdf4_file_tests)
# Does the user want to turn on PNETCDF read ability?
AC_MSG_CHECKING([whether parallel I/O for classic and 64-bit offset files using parallel-netcdf is to be enabled])
AC_ARG_ENABLE([pnetcdf], [AS_HELP_STRING([--enable-pnetcdf],
[build netcdf-4 with parallel I/O for classic and 64-bit offset files using parallel-netcdf])])
[build with parallel I/O for classic and 64-bit offset files using parallel-netcdf])])
test "x$enable_pnetcdf" = xyes || enable_pnetcdf=no
AC_MSG_RESULT($enable_pnetcdf)
@ -687,18 +687,6 @@ if test "x$enable_netcdf_4" = xyes; then
if test "x$ac_cv_func_H5Pget_fapl_mpio" = xyes -o "x$ac_cv_func_H5Pget_fapl_mpiposix" = xyes; then
enable_parallel=yes
AC_DEFINE([USE_PARALLEL], [1], [if true, parallel netCDF-4 is in use])
# Using pnetcdf for classic parallel I/O?
if test "x$enable_pnetcdf" = xyes; then
AC_CHECK_LIB([pnetcdf], [ncmpi_create], [],
[AC_MSG_ERROR([Cannot link to pnetcdf library, yet --enable-pnetcdf was used.])])
dnl AC_CHECK_HEADERS([pnetcdf.h], [], [nc4_pnetcdf_h_missing=yes)
dnl if test ! "x$HAVE_PNETCDF" = x1; then
dnl AC_MSG_ERROR([Cannot find pnetcdf header, yet --enable-pnetcdf was used.])
dnl fi
AC_DEFINE([USE_PNETCDF], [1], [if true, parallel netCDF is used])
fi
fi
AC_MSG_CHECKING([whether parallel I/O features are to be included])
@ -739,6 +727,19 @@ if test "x$enable_logging" = xyes; then
AC_DEFINE([LOGGING], 1, [If true, turn on logging.])
fi
# Using pnetcdf for classic parallel I/O?
if test "x$enable_pnetcdf" = xyes; then
AC_CHECK_LIB([pnetcdf], [ncmpi_create], [],
[AC_MSG_ERROR([Cannot link to pnetcdf library, yet --enable-pnetcdf was used.])])
AC_DEFINE([USE_PNETCDF], [1], [if true, parallel netCDF is used])
# pnetcdf => parallel
# If parallel is in use, enable it in the C code. Also add some stuff to netcdf.h.
enable_parallel=yes
AC_DEFINE([USE_PARALLEL], [1], [if true, pnetcdf or parallel netcdf-4 is in use])
fi
# Like other libraries, udunits and libcf
# are no long part of the netcdf distribution.
@ -886,6 +887,7 @@ AC_CONFIG_FILES([Makefile
man4/images/Makefile
libsrc/Makefile
libsrc4/Makefile
libsrc5/Makefile
nctest/Makefile
nc_test4/Makefile
nc_test/Makefile
@ -898,7 +900,6 @@ AC_CONFIG_FILES([Makefile
oc2/Makefile
libdap2/Makefile
libcdmr/Makefile
librpc/Makefile
libdispatch/Makefile
liblib/Makefile
ncdump/cdl4/Makefile

View File

@ -12,10 +12,10 @@
#endif
typedef enum CEops {
CEO_NIL=0,CEO_EQ=1,CEO_NEQ=2,CEO_GE=3,CEO_GT=4,CEO_LT=5,CEO_LE=6,CEO_RE=7
CEO_NIL=0,CEO_EQ=1,CEO_NEQ=2,CEO_GE=3,CEO_GT=4,CEO_LE=5,CEO_LT=6,CEO_RE=7
} CEops;
/* Must match NCCops */
/* Must match CEops */
#define OPSTRINGS {"?","=","!=",">=",">","<=","<","=~"}
typedef enum CEsort {

View File

@ -273,21 +273,6 @@ typedef struct NC_HDF5_FILE_INFO
int ignore_creationorder;
int hdf4;
int sdid;
#ifdef USE_PNETCDF
/* pnetcdf_file will be true if the file is created/opened with the
* parallel-netcdf library. pnetcdf_access_mode keeps track of
* whether independpent or collective mode is
* desired. pnetcdf_ndims keeps track of how many dims each var
* has, which I need to know to convert start, count, and stride
* arrays from size_t to MPI_Offset. (I can't use an inq function
* to find out the number of dims, because these are collective in
* pnetcdf.) */
int pnetcdf_file;
int pnetcdf_access_mode;
int pnetcdf_ndims[NC_MAX_VARS];
#endif /* USE_PNETCDF */
} NC_HDF5_FILE_INFO_T;
/* These functions only use the netcdf API calls, so they will work on

View File

@ -85,6 +85,8 @@ extern int nc_put_vara_ulonglong(int ncid, int varid,
#define NC_DISPATCH_NC4 2
#define NC_DISPATCH_NCD 4
#define NC_DISPATCH_NCR 8
#define NC_DISPATCH_NC5 16
/* Define a type for use when doing e.g. nc_get_vara_long, etc. */
/* Should matche values in libsrc4/netcdf.h */
@ -107,15 +109,27 @@ extern int nc_put_vara_ulonglong(int ncid, int varid,
/* Define an alias for int to indicate an error return */
typedef int NCerror;
/* WARNING: this must match libsrc4/netcdf.h */
#ifndef MPI_Comm
#define MPI_Comm int
#endif
#ifndef MPI_Info
#define MPI_Info int
#endif
#ifndef MPI_COMM_WORLD
#define MPI_COMM_WORLD 0
#endif
#ifndef MPI_INFO_NULL
#define MPI_INFO_NULL 0
#endif
/* Define a struct to hold the MPI info so it can be passed down the
* call stack. This is used internally by the netCDF library. It
* should not be used by netcdf users. */
#ifdef USE_PARALLEL
typedef struct NC_MPI_INFO {
MPI_Comm comm;
MPI_Info info;
} NC_MPI_INFO;
#endif
/* Define known dispatch tables and initializers */
@ -133,6 +147,11 @@ extern NC_Dispatch* NCD3_dispatch_table;
extern int NCD3_initialize(void);
#endif
#ifdef USE_PNETCDF
extern NC_Dispatch* NC5_dispatch_table;
extern int NC5_initialize(void);
#endif
#ifdef USE_NETCDF4
extern NC_Dispatch* NC4_dispatch_table;
@ -172,17 +191,6 @@ struct nc_vlen_t;
struct NC;
/* WARNING: this must match libsrc4/netcdf.h */
#ifndef USE_PARALLEL
#ifndef MPI_Comm
#define MPI_Comm int
#define MPI_Info int
#define MPI_COMM_WORLD 0
#ifndef MPI_INFO_NULL
#define MPI_INFO_NULL 0
#endif
#endif
#endif
int NC_create(const char *path, int cmode,
size_t initialsz, int basepe, size_t *chunksizehintp,
@ -271,13 +279,14 @@ int (*inq_var_all)(int ncid, int varid, char *name, nc_type *xtypep,
int *no_fill, void *fill_valuep, int *endiannessp,
int *options_maskp, int *pixels_per_blockp);
int (*var_par_access)(int, int, int);
/* Note the following may still be invoked by netcdf client code
even when the file is a classic file
*/
#ifdef USE_NETCDF4
int (*show_metadata)(int);
int (*inq_unlimdims)(int, int*, int*);
int (*var_par_access)(int, int, int);
int (*inq_ncid)(int, const char*, int*);
int (*inq_grps)(int, int*, int*);
int (*inq_grpname)(int, char*);
@ -313,7 +322,6 @@ int (*def_var_endian)(int, int, int);
int (*set_var_chunk_cache)(int, int, size_t, size_t, float);
int (*get_var_chunk_cache)(int ncid, int varid, size_t *sizep, size_t *nelemsp, float *preemptionp);
#endif /*USE_NETCDF4*/
};
/* Following functions must be handled as non-dispatch */

View File

@ -176,7 +176,8 @@ nccf_parse_coords(int ncid, int varid, char *att_name, int *naxes,
size_t len;
char *coords_str;
char axis_name[NC_MAX_NAME + 1], *p, *a;
int num_axes = 0, axes[NC_MAX_DIMS];
int num_axes = 0;
int *axes;
int a1, ret;
/* Check reasonableness of name. */
@ -196,6 +197,9 @@ nccf_parse_coords(int ncid, int varid, char *att_name, int *naxes,
/* If we got the coord axes string, parse it to find the names of
* the coordinate vars which make up this system. */
axes = (int*)malloc(sizeof(int)*NC_MAX_DIMS);
if(axes == null) return NC_ENOMEM;
for (p = coords_str; !ret && (p - coords_str) < strlen(coords_str);)
{
for (a = axis_name; *p && *p != ' '; )
@ -215,7 +219,7 @@ nccf_parse_coords(int ncid, int varid, char *att_name, int *naxes,
if (axis_varids)
for (a1 = 0; a1 < num_axes; a1++)
axis_varids[a1] = axes[a1];
free(axes)
return CF_NOERR;
}

View File

@ -258,7 +258,7 @@ fix::
done
##################################################
T=test_nstride2
T=junk
v::
cc -g -c ${T}.c ${INCL}

View File

@ -378,34 +378,19 @@ matchsuffix3(NClist* matchpath, NClist* segments)
char*
buildprojectionstring3(NClist* projections)
{
char* pstring;
NCbytes* buf = ncbytesnew();
dcelisttobuffer(projections,buf,",");
pstring = ncbytesdup(buf);
ncbytesfree(buf);
return pstring;
return dcebuildprojectionstring(projections);
}
char*
buildselectionstring3(NClist* selections)
{
NCbytes* buf = ncbytesnew();
char* sstring;
dcelisttobuffer(selections,buf,"&");
sstring = ncbytesdup(buf);
ncbytesfree(buf);
return sstring;
return dcebuildselectionstring(selections);
}
char*
buildconstraintstring3(DCEconstraint* constraints)
{
NCbytes* buf = ncbytesnew();
char* result = NULL;
dcetobuffer((DCEnode*)constraints,buf);
result = ncbytesdup(buf);
ncbytesfree(buf);
return result;
return dcebuildconstraintstring(constraints);
}

View File

@ -19,7 +19,9 @@ typedef struct Dapodometer {
size_t declsize[NC_MAX_VAR_DIMS];
} Dapodometer;
#ifndef TESTING
extern Dapodometer* dapodom_fromsegment(DCEsegment* segment, size_t start, size_t stop);
#endif
extern Dapodometer* dapodom_new(size_t rank,
const size_t* start, const size_t* count,

View File

@ -309,7 +309,7 @@ dcemergeprojections(DCEprojection* merged, DCEprojection* addition)
*/
char*
buildprojectionstring(NClist* projections)
dcebuildprojectionstring(NClist* projections)
{
char* pstring;
NCbytes* buf = ncbytesnew();
@ -320,7 +320,7 @@ buildprojectionstring(NClist* projections)
}
char*
buildselectionstring(NClist* selections)
dcebuildselectionstring(NClist* selections)
{
NCbytes* buf = ncbytesnew();
char* sstring;
@ -331,7 +331,7 @@ buildselectionstring(NClist* selections)
}
char*
buildconstraintstring(DCEconstraint* constraints)
dcebuildconstraintstring(DCEconstraint* constraints)
{
NCbytes* buf = ncbytesnew();
char* result = NULL;

View File

@ -142,9 +142,9 @@ extern size_t dcesegmentsize(DCEsegment*, size_t start, size_t stop);
that can be used with a url. Caller must free returned string.
*/
extern char* buildprojectionstring(NClist* projections);
extern char* buildselectionstring(NClist* selections);
extern char* buildconstraintstring(DCEconstraint* constraints);
extern char* dcebuildprojectionstring(NClist* projections);
extern char* dcebuildselectionstring(NClist* selections);
extern char* dcebuildconstraintstring(DCEconstraint* constraints);
extern int dceverbose;

View File

@ -1,6 +1,8 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */
#define URLDECODE
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
@ -11,6 +13,7 @@
#include "nclist.h"
#include "ncbytes.h"
#include "ncuri.h"
#include "dceconstraints.h"
#include "dceparselex.h"
@ -48,6 +51,7 @@ dcelex(YYSTYPE* lvalp, DCEparsestate* state)
if(c <= ' ' || c >= '\177') {p++; continue;}
if(c == '"') {
int more = 1;
ceaddyytext(lexstate,c);
/* We have a SCAN_STRINGCONST */
while(more && (c=*(++p))) {
switch (c) {
@ -190,7 +194,11 @@ dcelexinit(char* input, DCElexstate** lexstatep)
if(lexstatep) *lexstatep = lexstate;
if(lexstate == NULL) return;
memset((void*)lexstate,0,sizeof(DCElexstate));
#ifdef URLDECODE
lexstate->input = ncuridecode(input);
#else
lexstate->input = strdup(input);
#endif
lexstate->next = lexstate->input;
lexstate->yytext = ncbytesnew();
lexstate->reclaim = nclistnew();

View File

@ -1,8 +1,8 @@
PARMS=""; ARGS=""; CON="" ; CE=""; OCON="" ; VAR=""
PARMS=""; ARGS=""; CON="" ; CE=""; OCON="" ; VAR=""; SHARP='#'
alias q0=;alias qq=;alias qv=;alias q=;alias qh=;alias qqh=;alias qall=;alias qv=;alias qo=;
#TOP="/home/dmh/mach/trunk"
TOP="/cygdrive/f/svn/trunk"
TOP="/home/dmh/mach/trunk"
#TOP="/cygdrive/f/svn/trunk"
#TOP="/cygdrive/c/Users/dmh/svn/trunk"
#PROG=./ncd
@ -10,18 +10,20 @@ PROG="$TOP/ncdump/ncdump"
P=`pwd`
F=
F="http://coastwatch.pfeg.noaa.gov/erddap/tabledap/erdCinpKfmT"
CON='station&station="Anacapa_Landing_Cove"'
#CON="station,longitude,latitude,altitude,time,temperature&station=%22Anacapa_Landing_Cove%22&time>=2007-01-01&time<=2007-06-01"
PARMS="[log]"
#PARMS="${PARMS}[netcdf3]"
#PARMS="${PARMS}[fetch=disk]"
#PARMS="${PARMS}[cache]"
#PARMS="${PARMS}[nocache]"
#PARMS="${PARMS}[wholevar]"
PARMS="${PARMS}[show=fetch]"
#PARMS="${PARMS}[noprefetch]"
#PARMS="${PARMS}[prefetch]"
#PARMS="${PARMS}[prefetch=eager]"
PARMS="log"
#PARMS="${PARMS}&netcdf3"
#PARMS="${PARMS}&fetch=disk"
#PARMS="${PARMS}&cache"
#PARMS="${PARMS}&nocache"
#PARMS="${PARMS}&wholevar"
PARMS="${PARMS}&show=fetch"
#PARMS="${PARMS}&noprefetch"
#PARMS="${PARMS}&prefetch"
#PARMS="${PARMS}&prefetch=eager"
# Pick in order
if test "x$PROG" = x ; then
@ -37,9 +39,10 @@ if test "x$PROG" = x ; then
PROG="../ncdump/ncdump"
fi
U="${PARMS}$F"
if test "x$CON" != "x" ; then U="${PARMS}$F?$CON"; fi
UALL="${PARMS}$F"
if test "x$PARMS" != "x" ; then PARMS="\#$PARMS"; fi
U="$F"
if test "x$CON" != "x" ; then U="$U?$CON"; fi
UALL="$U${PARMS}"
#ARGS="-h $ARGS"
#ARGS="-w $ARGS"
#ARGS="-c $ARGS"
@ -48,13 +51,13 @@ VARGS="--leak-check=full"
alias qq="gdb --args $PROG $ARGS '$U'"
alias qv="valgrind $VARGS PROG $ARGS '$U'"
alias q0="$PROG $ARGS '$U'"
alias qh="$PROG -h $ARGS '$U'"
alias qk="$PROG -k $ARGS '$U'"
alias qvar="$PROG -v $VAR $ARGS '$U'"
alias qqh="gdb --args $PROG -h $ARGS '$U'"
alias q0="$PROG $ARGS '$UALL'"
alias qh="$PROG -h $ARGS '$UALL'"
alias qk="$PROG -k $ARGS '$UALL'"
alias qvar="$PROG -v $VAR $ARGS '$UALL'"
alias qqh="gdb --args $PROG -h $ARGS '$UALL'"
alias qall="$PROG -h $ARGS '${UALL}'"
alias qv="valgrind $VARGS $PROG $ARGS '$U'"
alias qv="valgrind $VARGS $PROG $ARGS '$UALL'"
if test "x$CON" = "x" ; then
alias qo="~/svn/oc/octest -p dds -p datadds -DN -DX1 $F"
else

View File

@ -88,10 +88,11 @@ NCDEFAULT_put_varm,
NULL, /*inq_var_all*/
NULL, /*var_par_access*/
#ifdef USE_NETCDF4
NULL, /*show_metadata*/
NULL, /*inq_unlimdims*/
NULL, /*var_par_access*/
NULL, /*inq_ncid*/
NULL, /*inq_grps*/
NULL, /*inq_grpname*/

View File

@ -24,6 +24,17 @@ Research/Unidata. See COPYRIGHT file for more info.
#endif
#include "ncdispatch.h"
/* Define an enum over the possible set of
File Types
*/
enum FileType {
FT_UNKNOWN,
FT_HDF,
FT_NC,
FT_PNETCDF
};
static int nc_initialized = 0;
/** \defgroup datasets NetCDF Files
@ -82,16 +93,15 @@ nc_local_initialize(void)
static int
NC_check_file_type(const char *path, int use_parallel, void *mpi_info,
int *cdf, int *hdf)
enum FileType* filetype, int* version)
{
char magic[MAGIC_NUMBER_LEN];
*hdf = 0; *cdf = 0;
*filetype = FT_UNKNOWN;
/* Get the 4-byte magic from the beginning of the file. Don't use posix
* for parallel, use the MPI functions instead. */
#ifdef USE_PARALLEL_MPIO
/* Note that this assumes netcdf-4 support is enabled */
if (use_parallel)
{
MPI_File fh;
@ -112,59 +122,47 @@ NC_check_file_type(const char *path, int use_parallel, void *mpi_info,
return NC_EPARINIT;
if((retval = MPI_File_close(&fh)) != MPI_SUCCESS)
return NC_EPARINIT;
/* Pretend this is an HDF5 file */
*hdf = 5;
} else
#endif /* USE_PARALLEL */
{
FILE *fp;
int i;
#ifdef HAVE_SYS_STAT_H
struct stat st;
#endif
if(path == NULL || strlen(path)==0)
return NC_EINVAL;
if (!(fp = fopen(path, "r")))
return errno;
#ifdef HAVE_SYS_STAT_H
/* The file must be at least MAGIC_NUMBER_LEN in size,
or otherwise the following fread will exhibit unexpected
behavior. */
if(!(fstat(fileno(fp),&st) == 0))
return errno;
if(st.st_size < MAGIC_NUMBER_LEN)
return NC_ENOTNC;
#endif
i = fread(magic, MAGIC_NUMBER_LEN, 1, fp);
fclose(fp);
if(i == 0)
return NC_ENOTNC;
if(i == 0 && errno == 22) //if file size < 4, Windows fread returns 0, errno 22.
return NC_ENOTNC;
if(i != 1)
return errno;
return errno;
}
/* Ignore the first byte for HDF */
if(magic[1] == 'H' && magic[2] == 'D' && magic[3] == 'F')
*hdf = 5;
else if(magic[0] == '\016' && magic[1] == '\003'
&& magic[2] == '\023' && magic[3] == '\001')
*hdf = 4;
else if(magic[0] == 'C' && magic[1] == 'D' && magic[2] == 'F')
{
if(magic[3] == '\001')
*cdf = 1; /* netcdf classic version 1 */
/* Look at the magic number */
/* Ignore the first byte for HDF */
if(magic[1] == 'H' && magic[2] == 'D' && magic[3] == 'F') {
*filetype = FT_HDF;
*version = 5;
} else if(magic[0] == '\016' && magic[1] == '\003'
&& magic[2] == '\023' && magic[3] == '\001') {
*filetype = FT_HDF;
*version = 4;
} else if(magic[0] == 'C' && magic[1] == 'D' && magic[2] == 'F') {
*filetype = FT_NC;
if(magic[3] == '\001')
*version = 1; /* netcdf classic version 1 */
else if(magic[3] == '\002')
*cdf = 2; /* netcdf classic version 2 */
else
*version = 2; /* netcdf classic version 2 */
else if(magic[3] == '\005') {
*filetype = FT_PNETCDF;
*version = 5; /* pnetcdf file */
} else
return NC_ENOTNC;
} else
} else
return NC_ENOTNC;
}
return NC_NOERR;
}
@ -1460,8 +1458,10 @@ NC_create(const char *path, int cmode, size_t initialsz,
/* Look to the incoming cmode for hints */
if(model == 0) {
if(cmode & NC_NETCDF4 || cmode & NC_PNETCDF)
if(cmode & NC_NETCDF4)
model = NC_DISPATCH_NC4;
else if(cmode & NC_PNETCDF)
model = NC_DISPATCH_NC5;
else if(cmode & NC_CLASSIC_MODEL)
model = NC_DISPATCH_NC3;
}
@ -1516,6 +1516,11 @@ NC_create(const char *path, int cmode, size_t initialsz,
if(model == (NC_DISPATCH_NC3 | NC_DISPATCH_NCD))
dispatcher = NCD3_dispatch_table;
else
#endif
#ifdef USE_PNETCDF
if(model == (NC_DISPATCH_NC5))
dispatcher = NC5_dispatch_table;
else
#endif
if(model == (NC_DISPATCH_NC3))
dispatcher = NC3_dispatch_table;
@ -1568,8 +1573,8 @@ NC_open(const char *path, int cmode,
/* Need two pieces of information for now */
int model = 0;
int isurl = 0;
int cdfversion = 0;
int hdfversion = 0;
int version;
enum FileType filetype;
if(!nc_initialized) {
stat = NC_initialize();
@ -1582,23 +1587,36 @@ NC_open(const char *path, int cmode,
isurl = NC_testurl(path);
if(isurl)
model = NC_urlmodel(path);
if(!isurl) {
else {
filetype = FT_UNKNOWN;
version = 0;
model = 0;
/* Look at the file if it exists */
stat = NC_check_file_type(path,useparallel,mpi_info,&cdfversion,&hdfversion);
stat = NC_check_file_type(path,useparallel,mpi_info,
&filetype,&version);
if(stat == NC_NOERR) {
if(hdfversion != 0) {
switch (filetype) {
case FT_NC:
if(version == 1 || version == 2)
model = NC_DISPATCH_NC3;
break;
case FT_HDF:
model = NC_DISPATCH_NC4;
} else if(cdfversion != 0) {
model = NC_DISPATCH_NC3;
}
break;
case FT_PNETCDF:
model = NC_DISPATCH_NC5;
break;
default:
return NC_ENOTNC;
}
} else /* presumably not a netcdf file */
return stat;
}
/* Look to the incoming cmode for hints */
if(model == 0) {
if(cmode & NC_NETCDF4 || cmode & NC_PNETCDF) model |= NC_DISPATCH_NC4;
if(cmode & NC_PNETCDF) model |= NC_DISPATCH_NC5;
else if(cmode & NC_NETCDF4) model |= NC_DISPATCH_NC4;
}
if(model == 0) model = NC_DISPATCH_NC3; /* final default */
@ -1608,7 +1626,10 @@ NC_open(const char *path, int cmode,
cmode |= NC_NETCDF4;
else if(model & NC_DISPATCH_NC3) {
cmode &= ~NC_NETCDF4; /* must be netcdf-3 */
if(cdfversion == 2) cmode |= NC_64BIT_OFFSET;
if(version == 2) cmode |= NC_64BIT_OFFSET;
} else if(model & NC_DISPATCH_NC5) {
cmode &= ~(NC_NETCDF4 | NC_64BIT_OFFSET); /* must be pnetcdf */
cmode |= NC_PNETCDF;
}
if((cmode & NC_MPIIO && cmode & NC_MPIPOSIX))
@ -1629,6 +1650,11 @@ NC_open(const char *path, int cmode,
dispatcher = NCD3_dispatch_table;
else
#endif
#if defined(USE_PNETCDF)
if(model == (NC_DISPATCH_NC5))
dispatcher = NC5_dispatch_table;
else
#endif
#if defined(USE_NETCDF4)
if(model == (NC_DISPATCH_NC4))
dispatcher = NC4_dispatch_table;

View File

@ -1,8 +1,18 @@
/** \substrate
Define the substrate dispatch table and functions
These functions end up calling functions in one of the dispatch layers
(netCDF-4, dap server, etc) using the substrate field of struct NC.
The idea of a substrate is that for some dispatch
tables, it is convenient to delegate many of its functions
of some other dispatch table, called the substrate.
For example, the libdap2 code needs to create
metadata. Rather than duplicate the code in libsrc,
it is convenient to create a temporary
netcdf-3 "file" (using in-memory data storage)
and delegate the creation and inquiries about
the metadata to that substrate netcdf-3 object.
So, these functions end up calling functions in another
dispatch table using the substrate field of struct NC.
Copyright 2010 University Corporation for Atmospheric
Research/Unidata. See COPYRIGHT file for more info.
@ -405,6 +415,17 @@ NCSUB_inq_var_all(int ncid, int varid, char* name, nc_type* xtypep,
options_maskp,pixels_per_blockp);
}
static int
NCSUB_var_par_access(int ncid, int a1, int a2)
{
NC *nc, *ncsub;
int ncstat = NC_check_id(ncid, &nc);
if(ncstat != NC_NOERR) return ncstat;
ncstat = NC_check_id(nc->substrate, &ncsub);
if(ncstat != NC_NOERR) return ncstat;
return ncsub->dispatch->var_par_access(nc->substrate,a1,a2);
}
#ifdef USE_NETCDF4
static int
@ -429,17 +450,6 @@ NCSUB_inq_unlimdims(int ncid, int* a1, int* a2)
return ncsub->dispatch->inq_unlimdims(nc->substrate,a1,a2);
}
static int
NCSUB_var_par_access(int ncid, int a1, int a2)
{
NC *nc, *ncsub;
int ncstat = NC_check_id(ncid, &nc);
if(ncstat != NC_NOERR) return ncstat;
ncstat = NC_check_id(nc->substrate, &ncsub);
if(ncstat != NC_NOERR) return ncstat;
return ncsub->dispatch->var_par_access(nc->substrate,a1,a2);
}
static int
NCSUB_inq_ncid(int ncid, const char* a1, int* a2)
{
@ -854,12 +864,12 @@ NCSUB_put_varm,
NCSUB_inq_var_all,
NCSUB_var_par_access,
#ifdef USE_NETCDF4
NCSUB_show_metadata,
NCSUB_inq_unlimdims,
NCSUB_var_par_access,
NCSUB_inq_ncid,
NCSUB_inq_grps,
NCSUB_inq_grpname,

View File

@ -1120,11 +1120,18 @@ ncrecinq(
)
{
size_t nrv = 0;
size_t rs[NC_MAX_VARS]; /* TODO */
const int status = nc_inq_rec(ncid, &nrv, recvarids, rs);
size_t *rs = NULL;
int status = NC_NOERR;
rs = (size_t*)malloc(sizeof(size_t)*NC_MAX_VARS);
if(rs == NULL)
return NC_ENOMEM;
status = nc_inq_rec(ncid, &nrv, recvarids, rs);
if(status != NC_NOERR)
{
nc_advise("ncrecinq", status, "ncid %d", ncid);
if(rs != NULL) free(rs);
return -1;
}
@ -1140,6 +1147,8 @@ ncrecinq(
}
}
if(rs != NULL) free(rs);
return (int) nrv;
}

View File

@ -133,10 +133,10 @@ ncuriparse(const char* uri0, NCURI** durip)
/* collect any prefix bracketed parameters */
if(*p == LBRACKET) {
prefixparams = p+1;
/* find end of the clientparams; convert LB,RB to ';' */
/* find end of the clientparams; convert LB,RB to '&' */
for(;*p;p++) {
if(p[0] == RBRACKET && p[1] == LBRACKET) {
p[0] = ';';
p[0] = '&';
nclshift1(p+1);
} else if(p[0] == RBRACKET && p[1] != LBRACKET)
break;
@ -277,16 +277,12 @@ ncuriparse(const char* uri0, NCURI** durip)
if(suffixparams != NULL) {
/* there really are suffix params; so rebuild the suffix params */
if(*suffixparams == LBRACKET) suffixparams++;
p = suffixparams;
/* There must be brackets */
if(*p != LBRACKET)
{THROW(14); goto fail;}
suffixparams++; /* skip leading LBRACKET */
p = suffixparams;
/* convert RBRACKET LBRACKET to ';' */
/* convert RBRACKET LBRACKET to '&' */
for(;*p;p++) {
if(p[0] == RBRACKET && p[1] == LBRACKET) {
p[0] = ';';
p[0] = '&';
nclshift1(p+1);
} else if(p[0] == RBRACKET && p[1] != LBRACKET) {
/* terminate suffixparams */
@ -322,14 +318,14 @@ ncuriparse(const char* uri0, NCURI** durip)
int plen = prefixparams ? strlen(prefixparams) : 0;
int slen = suffixparams ? strlen(suffixparams) : 0;
int space = plen + slen + 1;
/* add 1 for an extra comma if both are defined */
/* add 1 for an extra ampersand if both are defined */
space++;
duri->params = (char*)malloc(space);
duri->params[0] = EOFCHAR; /* so we can use strcat */
if(plen > 0) {
strcat(duri->params,prefixparams);
if(slen > 0)
strcat(duri->params,";");
strcat(duri->params,"&");
}
if(slen > 0)
strcat(duri->params,suffixparams);
@ -562,12 +558,12 @@ ncappendparams(char* newuri, char** p)
In the original url, client parameters are assumed to be one
or more instances of bracketed pairs: e.g "[...][...]...".
They may occur either at the front, or suffixed after
a trailing # character After processing, the list is
converted to a semicolon separated list of the combination
a trailing # character. After processing, the list is
converted to an ampersand separated list of the combination
of prefix and suffix parameters.
After the url is parsed, the parameter list
is converted to a semicolon separated list with all
is converted to an ampersand separated list with all
whitespace removed.
In any case, each parameter in turn is assumed to be a
of the form <name>=<value> or [<name>].
@ -592,11 +588,11 @@ ncuridecodeparams(NCURI* ncuri)
params = strdup(ncuri->params); /* so we can modify */
/* Pass 1 to break string into pieces at the semicolons
/* Pass 1 to break string into pieces at the ampersands
and count # of pairs */
nparams=0;
for(cp=params;(c=*cp);cp++) {
if(c == ';') {*cp = EOFCHAR; nparams++;}
if(c == '&') {*cp = EOFCHAR; nparams++;}
}
nparams++; /* for last one */
@ -804,7 +800,6 @@ ncuridecodeonly(char* s, char* only)
unsigned int c;
if (s == NULL) return NULL;
if(only == NULL) only = "";
slen = strlen(s);
decoded = (char*)malloc(slen+1); /* Should be max we need */
@ -812,7 +807,7 @@ ncuridecodeonly(char* s, char* only)
outptr = decoded;
inptr = s;
while((c = *inptr++)) {
if(c == '+' && strchr(only,'+') != NULL)
if(c == '+' && only != NULL && strchr(only,'+') != NULL)
*outptr++ = ' ';
else if(c == '%') {
/* try to pull two hex more characters */
@ -821,7 +816,7 @@ ncuridecodeonly(char* s, char* only)
&& strchr(hexchars,inptr[1]) != NULL) {
/* test conversion */
int xc = (fromHex(inptr[0]) << 4) | (fromHex(inptr[1]));
if(strchr(only,xc) != NULL) {
if(only == NULL || strchr(only,xc) != NULL) {
inptr += 2; /* decode it */
c = xc;
}

View File

@ -12,6 +12,10 @@ IF(USE_HDF5 OR USE_NETCDF4)
SET(liblib_LIBS ${liblib_LIBS} netcdf4)
ENDIF()
IF(USE_PNETCDF)
SET(liblib_LIBS ${liblib_LIBS} netcdf5)
ENDIF()
IF(USE_DAP)
SET(liblib_LIBS ${liblib_LIBS} oc2 dap2)
ENDIF()

View File

@ -33,9 +33,15 @@ endif # BUILD_V2
# The output library will always include netcdf3 and dispatch
# libraries
libnetcdf_la_LIBADD += ${top_builddir}/libdispatch/libdispatch.la \
${top_builddir}/libsrc/libnetcdf3.la
${top_builddir}/libsrc/libnetcdf3.la
# netcdf3 + dap
# + pnetcdf
if USE_PNETCDF
AM_CPPFLAGS += -I${top_srcdir}/libsrc5
libnetcdf_la_LIBADD += ${top_builddir}/libsrc5/libnetcdf5.la
endif # USE_PNETCDF
# + dap
if USE_DAP
AM_CPPFLAGS += -I${top_srcdir}/libdap2 -I${top_srcdir}/oc
libnetcdf_la_LIBADD += ${top_builddir}/libdap2/libdap2.la

View File

@ -8,6 +8,8 @@
extern int NC3_initialize(void);
extern int NCSUBSTRATE_initialize(void);
#ifdef USE_NETCDF4
extern int NC4_initialize(void);
#endif
@ -23,10 +25,18 @@ extern int NCD4_initialize(void);
extern int NCCR_initialize(void);
#endif
#ifdef BUILD_RPC
extern int NCRPC_initialize(void);
#ifdef USE_PNETCDF
extern int NC5_initialize(void);
#endif
/**
This procedure invokes all defined
initializers, and there is an initializer
for every known dispatch table.
So if you modify the format of NC_Dispatch,
then you need to fix it everywhere.
*/
int
NC_initialize(void)
{
@ -43,6 +53,10 @@ NC_initialize(void)
if((stat = NCD3_initialize())) return stat;
#endif
#ifdef USE_PNETCDF
if((stat = NC5_initialize())) return stat;
#endif
#ifdef USE_NETCDF4
if((stat = NC4_initialize())) return stat;
@ -58,12 +72,10 @@ NC_initialize(void)
if((stat = NCCR_initialize())) return stat;
#endif
#ifdef USE_RPC
if((stat = NCRPC_initialize())) return stat;
#endif
#endif /* USE_NETCDF4 */
/* Finally, initialize the SUBSTRATE table (dsubstrate.c) */
if((stat = NCSUBSTRATE_initialize())) return stat;
return NC_NOERR;
}

View File

@ -37,10 +37,11 @@ static int NC3_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
int *no_fill, void *fill_valuep, int *endiannessp,
int *options_maskp, int *pixels_per_blockp);
static int NC3_var_par_access(int,int,int);
#ifdef USE_NETCDF4
static int NC3_show_metadata(int);
static int NC3_inq_unlimdims(int,int*,int*);
static int NC3_var_par_access(int,int,int);
static int NC3_inq_ncid(int,const char*,int*);
static int NC3_inq_grps(int,int*,int*);
static int NC3_inq_grpname(int,char*);
@ -122,10 +123,11 @@ NCDEFAULT_put_varm,
NC3_inq_var_all,
NC3_var_par_access,
#ifdef USE_NETCDF4
NC3_show_metadata,
NC3_inq_unlimdims,
NC3_var_par_access,
NC3_inq_ncid,
NC3_inq_grps,
NC3_inq_grpname,
@ -194,6 +196,12 @@ NC3_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
return NC_NOERR;
}
static int
NC3_var_par_access(int ncid, int varid, int par_access)
{
return NC_NOERR; /* no-op for netcdf classic */
}
#ifdef USE_NETCDF4
static int
@ -488,11 +496,5 @@ NC3_def_var_endian(int ncid, int varid, int endianness)
return NC_ENOTNC4;
}
static int
NC3_var_par_access(int ncid, int varid, int par_access)
{
return NC_ENOTNC4;
}
#endif /*USE_NETCDF4*/

View File

@ -17,7 +17,7 @@ conditions.
#include "nc4dispatch.h"
#include "ncdispatch.h"
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
#include <pnetcdf.h>
#endif
@ -478,7 +478,7 @@ NC4_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp
h5 = NC4_DATA(nc);
assert(h5);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
{
@ -512,7 +512,7 @@ NC4_inq_attid(int ncid, int varid, const char *name, int *attnump)
h5 = NC4_DATA(nc);
assert(h5);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_inq_attid(nc->int_ncid, varid, name, attnump);
@ -544,7 +544,7 @@ NC4_inq_attname(int ncid, int varid, int attnum, char *name)
h5 = NC4_DATA(nc);
assert(h5);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_inq_attname(nc->int_ncid, varid, attnum, name);
@ -596,7 +596,7 @@ NC4_rename_att(int ncid, int varid, const char *name,
if (h5->no_write)
return NC_EPERM;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_rename_att(nc->int_ncid, varid, name, newname);
@ -702,7 +702,7 @@ NC4_del_att(int ncid, int varid, const char *name)
if (h5->no_write)
return NC_EPERM;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_del_att(nc->int_ncid, varid, name);
@ -797,12 +797,13 @@ nc4_put_att_tc(int ncid, int varid, const char *name, nc_type file_type,
h5 = NC4_DATA(nc);
assert(h5);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
{
if (mem_type == NC_UBYTE)
mem_type = NC_BYTE;
switch(mem_type)
{
case NC_BYTE:
@ -859,12 +860,13 @@ nc4_get_att_tc(int ncid, int varid, const char *name, nc_type mem_type,
h5 = NC4_DATA(nc);
assert(h5);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
{
if (mem_type == NC_UBYTE)
mem_type = NC_BYTE;
switch(mem_type)
{
case NC_BYTE:

View File

@ -14,7 +14,7 @@ $Id: nc4dim.c,v 1.41 2010/05/25 17:54:23 dmh Exp $
#include "nc4internal.h"
#include "nc4dispatch.h"
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
#include <pnetcdf.h>
#endif
@ -37,7 +37,7 @@ NC4_inq_unlimdim(int ncid, int *unlimdimidp)
return retval;
assert(h5);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_inq_unlimdim(nc->int_ncid, unlimdimidp);
@ -87,7 +87,7 @@ NC4_def_dim(int ncid, const char *name, size_t len, int *idp)
if (h5->no_write)
return NC_EPERM;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_def_dim(nc->int_ncid, name, len, idp);
@ -169,7 +169,7 @@ NC4_inq_dimid(int ncid, const char *name, int *idp)
assert(h5);
assert(nc && grp);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_inq_dimid(nc->int_ncid, name, idp);
@ -213,7 +213,7 @@ NC4_inq_dim(int ncid, int dimid, char *name, size_t *lenp)
assert(h5);
assert(nc && grp);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
{
@ -291,7 +291,7 @@ NC4_rename_dim(int ncid, int dimid, const char *name)
if (h5->no_write)
return NC_EPERM;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_rename_dim(nc->int_ncid, dimid, name);

View File

@ -56,11 +56,11 @@ NCDEFAULT_put_varm,
NC4_inq_var_all,
NC4_var_par_access,
NC4_show_metadata,
NC4_inq_unlimdims,
NC4_var_par_access,
NC4_inq_ncid,
NC4_inq_grps,
NC4_inq_grpname,

View File

@ -21,7 +21,7 @@ COPYRIGHT file for copying and redistribution conditions.
#include <mfhdf.h>
#endif
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
#include <pnetcdf.h>
#endif
@ -255,7 +255,7 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info,
nc4_info = NC4_DATA(nc);
assert(nc4_info && nc4_info->root_grp);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
if (cmode & NC_PNETCDF)
return NC_NOERR;
#endif
@ -358,7 +358,7 @@ exit: /*failure exit*/
#endif
if (fapl_id != H5P_DEFAULT) H5Pclose(fapl_id);
if(!nc4_info) return retval;
close_netcdf4_file(nc4_info,1); // treat like abort
close_netcdf4_file(nc4_info,1); /* treat like abort */
#if 0
if (nc4_info->hdfid > 0) H5Fclose(nc4_info->hdfid);
if (nc4_info->root_grp) {
@ -446,7 +446,7 @@ NC4_create(const char* path, int cmode, size_t initialsz, int basepe,
nc_file->int_ncid = nc_file->ext_ncid;
res = nc4_create_file(path, cmode, comm, info, nc_file);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
if (cmode & NC_PNETCDF)
{
NC_HDF5_FILE_INFO_T* nc4_info;
@ -1699,10 +1699,12 @@ read_dataset(NC_GRP_INFO_T *grp, const char *obj_name)
if ((ndims = H5Sget_simple_extent_ndims(spaceid)) < 0)
BAIL(NC_EHDFERR);
#if 0
/* Removed check to remove nc4 dependency on
maximum dimensions. */
//if (ndims > NC_MAX_DIMS)
// BAIL(NC_EMAXDIMS);
if (ndims > NC_MAX_DIMS)
BAIL(NC_EMAXDIMS);
#endif
if( (dims = (hsize_t*)malloc(sizeof(hsize_t)*ndims)) == NULL)
BAIL(errno);
@ -2389,7 +2391,7 @@ nc4_open_file(const char *path, int mode, MPI_Comm comm,
num_plists--;
#endif
if (!nc4_info) return retval;
close_netcdf4_file(nc4_info,1); // treat like abort
close_netcdf4_file(nc4_info,1); /* treat like abort*/
#if 0
if (nc4_info->hdfid > 0) H5Fclose(nc4_info->hdfid);
if (nc4_info->root_grp) {
@ -2808,7 +2810,7 @@ NC4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
/* Depending on the type of file, open it. */
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
if(mode & NC_PNETCDF) {
/* this is not really an hdf file */
int pnetcdf_nvars, i;
@ -2893,7 +2895,7 @@ NC4_set_fill(int ncid, int fillmode, int *old_modep)
nc4_info->fill_mode = fillmode;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (nc4_info->pnetcdf_file)
return ncmpi_set_fill(nc->int_ncid, fillmode, old_modep);
@ -2918,7 +2920,7 @@ NC4_redef(int ncid)
return NC_EBADID;
assert(nc4_info);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (nc4_info->pnetcdf_file)
return ncmpi_redef(nc->int_ncid);
@ -2967,7 +2969,7 @@ static int NC4_enddef(int ncid)
return NC_EBADID;
assert(nc4_info);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
if (nc4_info->pnetcdf_file)
{
int res;
@ -3050,7 +3052,7 @@ NC4_sync(int ncid)
return NC_EBADID;
assert(nc4_info);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (nc4_info->pnetcdf_file)
return ncmpi_sync(nc->int_ncid);
@ -3161,7 +3163,7 @@ NC4_abort(int ncid)
assert(nc4_info);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (nc4_info->pnetcdf_file)
return ncmpi_abort(nc->int_ncid);
@ -3207,7 +3209,7 @@ NC4_close(int ncid)
if (grp->parent)
return NC_EBADGRPID;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_close(nc->int_ncid);
@ -3241,7 +3243,7 @@ NC4_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp)
assert(h5 && grp && nc);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_inq(nc->int_ncid, ndimsp, nvarsp, nattsp, unlimdimidp);

View File

@ -19,7 +19,7 @@
#include <H5DSpublic.h>
#include <math.h>
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
#include <pnetcdf.h>
#endif

View File

@ -18,7 +18,7 @@ conditions.
#include "ncdispatch.h" /* from libdispatch */
#include <utf8proc.h>
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
#include <pnetcdf.h>
#endif
@ -267,7 +267,7 @@ nc4_find_nc_grp_h5(int ncid, NC **nc, NC_GRP_INFO_T **grpp,
*nc = f;
#if 0 /* I do not understand this code at all */
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
if (h5->pnetcdf_file) {
*h5p = NULL;
*grpp = NULL;

View File

@ -13,7 +13,7 @@ conditions.
#include "nc4dispatch.h"
#include <math.h>
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
#include <pnetcdf.h>
#endif
@ -571,7 +571,7 @@ NC4_def_var(int ncid, const char *name, nc_type xtype, int ndims,
if (!(nc = nc4_find_nc_file(ncid,&h5)))
return NC_EBADID;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
{
@ -618,7 +618,7 @@ NC4_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
assert(nc);
assert(grp && h5);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_inq_var(nc->int_ncid, varid, name, xtypep, ndimsp,
@ -1074,7 +1074,7 @@ NC4_inq_varid(int ncid, const char *name, int *varidp)
NC_VAR_INFO_T *var;
char norm_name[NC_MAX_NAME + 1];
int retval;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
NC_HDF5_FILE_INFO_T *h5;
#endif
@ -1089,7 +1089,7 @@ NC4_inq_varid(int ncid, const char *name, int *varidp)
if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, NULL)))
return retval;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
h5 = NC4_DATA(nc);
assert(h5);
/* Take care of files created/opened with parallel-netcdf library. */
@ -1136,7 +1136,7 @@ NC4_rename_var(int ncid, int varid, const char *name)
assert(h5);
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_rename_var(nc->int_ncid, varid, name);
@ -1214,7 +1214,7 @@ NC4_var_par_access(int ncid, int varid, int par_access)
if ((retval = nc4_find_nc_grp_h5(ncid, &nc, &grp, &h5)))
return retval;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Handle files opened/created with parallel-netcdf library. */
if (h5->pnetcdf_file)
{
@ -1254,7 +1254,7 @@ nc4_put_vara_tc(int ncid, int varid, nc_type mem_type, int mem_type_is_long,
{
NC *nc;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
NC_HDF5_FILE_INFO_T *h5;
#endif
@ -1264,7 +1264,7 @@ nc4_put_vara_tc(int ncid, int varid, nc_type mem_type, int mem_type_is_long,
if (!(nc = nc4_find_nc_file(ncid,NULL)))
return NC_EBADID;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
h5 = NC4_DATA(nc);
assert(h5);
@ -1394,7 +1394,7 @@ nc4_get_vara_tc(int ncid, int varid, nc_type mem_type, int mem_type_is_long,
if (!(nc = nc4_find_nc_file(ncid,&h5)))
return NC_EBADID;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Handle files opened/created with the parallel-netcdf library. */
if (h5->pnetcdf_file)
{

View File

@ -91,7 +91,7 @@ NC4_inq_format(int ncid, int *formatp)
if (!(nc = nc4_find_nc_file(ncid,&h5)))
return NC_EBADID;
#ifdef USE_PNETCDF
#if 0 /*def USE_PNETCDF*/
/* Take care of files created/opened with parallel-netcdf library. */
if (h5->pnetcdf_file)
return ncmpi_inq_format(nc->int_ncid, formatp);

10
libsrc5/CMakeLists.txt Normal file
View File

@ -0,0 +1,10 @@
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
INCLUDE_DIRECTORIES(".")
SET(libsrc5_SOURCES nc5dispatch.c)
add_library(netcdf5 OBJECT ${libsrc_SOURCES})

24
libsrc5/Makefile.am Normal file
View File

@ -0,0 +1,24 @@
## This is an automake file, part of Unidata's netCDF package.
# Copyright 2005, see the COPYRIGHT file for more information.
# This automake file is in charge of building the libsrc directory,
# which contains the classic library code.
include $(top_srcdir)/lib_flags.am
libnetcdf5_la_CPPFLAGS = ${AM_CPPFLAGS}
# This is the code for a dispatch table for pnetcdf
# (which has CDF5 as its magic number)
# Turn on a pre-processor flag when building a DLL for windows.
if BUILD_DLL
libnetcdf5_la_CPPFLAGS += -DDLL_EXPORT
endif # BUILD_DLL
# These files comprise the pnetcdf dispatch library code.
libnetcdf5_la_SOURCES = nc5dispatch.c
noinst_LTLIBRARIES = libnetcdf5.la
EXTRA_DIST = CMakeLists.txt

1136
libsrc5/nc5dispatch.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@ In addition to providing new build options for netCDF-C, we will also provide pr
The following packages are required to build netCDF-C using CMake.
* netCDF-C Source Code
* CMake version 2.9+
* CMake version 2.8.9 or greater.
* Optional Requirements:
* HDF5 Libraries for netCDF4/HDF5 support.
* libcurl for DAP support.

View File

@ -1859,13 +1859,16 @@ and then verify them in HDF5. (And vice versa).
Beginning with netCDF version 4.1, optional support is provided for
accessing data through OPeNDAP servers using the DAP protocol.
Currently, only DAP protocol version 2 is supported; DAP protocol
version 4 support is under development.
DAP support is automatically enabled if a usable curl library can be
located using the curl-config program.
DAP support can forcibly be enabled or disabled using the enable-dap
flag or the disable-dap flag, respectively. If enabled, then DAP
support requires access to the curl library. Refer to the installation
manual for details: The NetCDF Installation and Porting Guide.
set using the LDFLAGS environment variable (similar to the way
that the HDF5 libraries are referenced).
DAP support can forcibly be enabled or disabled using the --enable-dap
flag or the --disable-dap flag, respectively. If enabled,
then DAP2 support requires access to the curl library.
Refer to the installation manual for details
DAP uses a data model that is different from that supported by netCDF,
either classic or enhanced. Generically, the DAP data model is encoded
@ -1878,19 +1881,25 @@ DDS and DAS, refer to the OPeNDAP web site http://opendap.org.
In order to access an OPeNDAP data source through the netCDF API, the
file name normally used is replaced with a URL with a specific
format. The URL is composed of four parts.
- Client parameters - these are prefixed to the front of the URL and
are of the general form [{name}] or [{name}=value]. Examples
include [cache=1] and [netcdf3].
format. The URL is composed of three parts.
- URL - this is a standard form URL such as
http://motherlode.unidata.ucar.edu:8081/dts/test.01
http://thredds-test.ucar.edu/dts/test.01
- Constraints - these are suffixed to the URL and take the form
“?\<projections>&selections”. The meaning of the terms projection
“?\<projections>&\<selections>”. The meaning of the terms projection
and selection is somewhat complicated; and the OPeNDAP web site,
http://www.opendap.or, should be consulted. The interaction of DAP
http://www.opendap.org, should be consulted. The interaction of DAP
constraints with netCDF is complex and at the moment requires an
understanding of how DAP is translated to netCDF.
- Client parameters - these may be specified in either of
two ways. The older, deprecated form prefixes text to the
front of the url and is of the the general form [\<name>]
or [\<name>=value]. Examples include [show=fetch] and
[noprefetch]. The newer, preferred form prefixes the
parameters to the end of the url using the semi-standard '#'
format: e.g. http://....#show=fetch&noprefetch.
It is possible to see what the translation does to a particular DAP
data source in either of two ways. First, one can examine the DDS
source through a web browser and then examine the translation using
@ -1903,15 +1912,15 @@ will return the DDS for the specified dataset, and the second URL will
return the DAS for the specified dataset.
\code
http://test.opendap.org:8080/dods/dts/test.01.dds
http://test.opendap.org:8080/dods/dts/test.01.das
http://thredds-test.ucar.edu/dts/test.01.dds
http://thredds-test.ucar.edu/dts/test.01.das
\endcode
Then by using the following ncdump command, it is possible to see the
equivalent netCDF Classic translation.
\code
ncdump -h http://test.opendap.org:8080/dods/dts/test.01
ncdump -h http://thredds-test.ucar.edu/dts/test.01
\endcode
The DDS output from the web server should look like this.
@ -1986,11 +1995,11 @@ variable in the DDS.
Alternately, one can get the text of the DDS as a global attribute by
using the client parameters mechanism . In this case, the parameter
[show=dds]” can be prefixed to the URL and the data retrieved using
show=dds” can be used, and the data retrieved using
the following command
\code
ncdump -h [show=dds]http://test.opendap.org:8080/dods/dts/test.01.dds
ncdump -h http://thredds-test.ucar.edu/dts/test.01.dds#show=dds
\endcode
The ncdump -h command will then show both the translation and the
@ -2012,19 +2021,18 @@ variables:
\section dap_to_netcdf DAP to NetCDF Translation Rules
Two translations are currently available.
Currently only one translation available: DAP 2 Protocol to netCDF-3.
There used to be a DAP 2 Protocol to netCDF-4 translation
but that has been removed until the DAP4 protocol is available.
DAP 2 Protocol to netCDF-3
DAP 2 Protocol to netCDF-4
\subsection netCDF-3 Translation Rules
\subsection nc3_trans_rules netCDF-3 Translation Rules
The current default translation code translates the OPeNDAP protocol
to netCDF-3 (classic). This netCDF-3 translation converts an OPeNDAP
DAP protocol version 2 DDS to netCDF-3 and is designed to mimic as
closely as possible the translation provided by the libnc-dap
system. In addition, a translation to netCDF-4 (enhanced) is provided
that is entirely new.
system, except that some errors in that older translation have
been fixed.
For illustrative purposes, the following example will be used.
@ -2059,7 +2067,7 @@ Dataset {
} D1;
\code
\subsection Variable Definition
\subsection var_def Variable Definition
The set of netCDF variables is derived from the fields with primitive
base types as they occur in Sequences, Grids, and Structures. The
@ -2078,7 +2086,7 @@ within grids are left out in order to mimic the behavior of libnc-dap.
lon
\endcode
\subsection Variable Dimension Translation
\subsection var_dim_trans Variable Dimension Translation
A variable's rank is determined from three sources.
- The variable has the dimensions associated with the field it
@ -2093,7 +2101,7 @@ containers is a DAP DDS Sequence. This is discussed more fully below.
If the type of the netCDF variable is char, then an extra string
dimension is added as the last dimension.
\subsection Dimension translation
\subsection dim_trans Dimension translation
For dimensions, the rules are as follows.
@ -2172,7 +2180,7 @@ dimensions:
S1.FS2.f2_0 = 2 ;
\endcode
\subsection Variable Name Translation
\subsection var_name_trans Variable Name Translation
The steps for variable name translation are as follows.
@ -2241,7 +2249,7 @@ int S1.FS2.f1(lat, lat) ;
Note that this is incorrect because it dimensions S1.FS2.f1(2,2)
rather than S1.FS2.f1(2,3).
\subsection Translating DAP DDS Sequences
\subsection translation Translating DAP DDS Sequences
Any variable (as determined above) that is contained directly or
indirectly by a Sequence is subject to revision of its rank using the
@ -2311,154 +2319,19 @@ data to determine how many records are associated with the
sequence. Since libnc-dap did essentially the same thing, it can be
assumed that the cost is not prohibitive.
\subsection netCDF-4 Translation Rules
A DAP to netCDF-4 translation also exists, but is not the default and
in any case is only available if the "enable-netcdf-4" option is
specified at configure time. This translation includes some elements
of the libnc-dap translation, but attempts to provide a simpler (but
not, unfortunately, simple) set of translation rules than is used for
the netCDF-3 translation. Please note that the translation is still
experimental and will change to respond to unforeseen problems or to
suggested improvements.
This text will use this running example.
\code
Dataset {
Int32 f1[fdim=10];
Structure {
Int32 f11;
Structure {
Int32 f1[3];
Int32 f2;
} FS2[2];
} S1;
Grid {
Array:
Float32 temp[lat=2][lon=2];
Maps:
Int32 lat[2];
Int32 lon[2];
} G1;
Sequence {
Float64 depth;
} Q1;
} D
\code
\subsection Variable Definition
The rule for choosing variables is relatively simple. Start with the
names of the top-level fields of the DDS. The term top-level means
that the object is a direct subnode of the Dataset object. In our
example, this produces the set [f1, S1, G1, Q1].
\subsection Dimension Definition
The rules for choosing and defining dimensions is as follows.
Collect the set of dimensions (named and anonymous) directly
associated with the variables as defined above. This means that
dimensions within user-defined types are ignored. From our example,
the dimension set is [fdim=10,lat=2,lon=2,2,2]. Note that the
unqualified names are used.
All remaining anonymous dimensions are given the name "<var>_NN",
where "<var>" is the unqualified name of the variable in which the
anonymous dimension appears and NN is the relative position of that
dimension in the dimensions associated with that array. No instances
of this rule occur in the running example.
Remove duplicate dimensions (those with same name and value). Our
dimension set now becomes [fdim=10,lat=2,lon=2].
The final case occurs when there are dimensions with the same name but
with different values. For this case, the size of the dimension is
appended to the dimension name.
\subsection Type Definition
The rules for choosing user-defined types are as follows.
For every Structure, Grid, and Sequence, a netCDF-4 compound type is
created whose fields are the fields of the Structure, Sequence, or
Grid. With one exception, the name of the type is the same as the
Structure or Grid name suffixed with "_t". The exception is that the
compound types derived from Sequences are instead suffixed with
"_record_t".
The types of the fields are the types of the corresponding field of
the Structure, Sequence, or Grid. Note that this type might be itself
a user-defined type.
From the example, we get the following compound types.
\code
compound FS2_t {
int f1(3);
int f2;
};
compound S1_t {
int f11;
FS2_t FS2(2);
};
compound G1_t {
float temp(2,2);
int lat(2);
int lon(2);
}
compound Q1_record_t {
double depth;
};
\endcode
For all sequences of name X, also create this type.
\code
X_record_t (*) X_t
\endcode
In our example, this produces the following type.
\code
Q1_record_t (*) Q1_t
\endcode
If a Sequence, Q has a single field F, whose type is a primitive type,
T, (e.g., int, float, string), then do not apply the previous rule,
but instead replace the whole sequence with the the following field.
\code
T (*) Q.f
\endcode
\subsection Choosing a Translation
The decision about whether to translate to netCDF-3 or netCDF-4 is
determined by applying the following rules in order.
- If the NC_CLASSIC_MODEL flag is set on nc_open(), then netCDF-3
translation is used.
- If the NC_NETCDF4 flag is set on nc_open(), then netCDF-4
translation is used.
- If the URL is prefixed with the client parameter "[netcdf3]" or
"[netcdf-3]" then netCF-3 translation is used.
- If the URL is prefixed with the client parameter "[netcdf4]" or
"[netcdf-4]" then netCF-4 translation is used.
- If none of the above holds, then default to netCDF-3 classic translation.
\subsection Caching
\subsection caching Caching
In an effort to provide better performance for some access patterns,
client-side caching of data is available. The default is no caching,
but it may be enabled by prefixing the URL with "[cache]".
but it may be enabled by prefixing the URL with the paramter "cache".
Caching operates basically as follows.
When a URL is first accessed using nc_open(), netCDF automatically
does a pre-fetch of selected variables. These include all variables
smaller than a specified (and user definable) size. This allows, for
example, quick access to coordinate variables.
example, quick access to coordinate variables. This can be suppressed
with the parameter "noprefetch".
Whenever a request is made using some variant of the nc_get_var() API
procedures, the complete variable is fetched and stored in the cache
@ -2489,63 +2362,61 @@ have an obvious answer. Probably a good rule of thumb is to avoid
caching initially and later turn it on to see its effect on
performance.
\subsection Defined Client Parameters
\subsection defined_params Defined Client Parameters
Currently, a limited set of client parameters is
recognized. Parameters not listed here are ignored, but no error is
signalled.
Parameter Name Legal Values Semantics
- [netcdf-3]|[netcdf-3] - Specify translation to netCDF-3.
- [netcdf-4]|[netcdf-4] - Specify translation to netCDF-4.
- "[log]|[log=<file>]" "" - Turn on logging and send the log output to
the specified file. If no file is specified, then output to standard
- "log" | "log=<file>" - Turn on logging and send the log output to
the specified file. If no file is specified, then output is sent to standard
error.
- "[show=...]" das|dds|url - This causes information to appear as
- "show=... das|dds|url" - This causes information to appear as
specific global attributes. The currently recognized tags are "dds"
to display the underlying DDS, "das" similarly, and "url" to display
the url used to retrieve the data. This parameter may be specified
multiple times (e.g. “[show=dds][show=url]”).
- "[show=fetch]" - This parameter causes the netCDF code to log a copy
multiple times (e.g. “show=dds&show=url”).
- "show=fetch" - This parameter causes the netCDF code to log a copy
of the complete url for every HTTP get request. If logging is
enabled, then this can be helpful in checking to see the access
behavior of the netCDF code.
- "[stringlength=NN]" - Specify the default string length to use for
- "stringlength=NN" - Specify the default string length to use for
string dimensions. The default is 64.
- "[stringlength_<var>=NN]" - Specify the default string length to use
- "stringlength_<var>=NN" - Specify the default string length to use
for a string dimension for the specified variable. The default is
64.
- "[cache]" - This enables caching.
- "[cachelimit=NN]" - Specify the maximum amount of space allowed for
- "cache" - This enables caching.
- "cachelimit=NN" - Specify the maximum amount of space allowed for
the cache.
- "[cachecount=NN]" - Specify the maximum number of entries in the
- "cachecount=NN" - Specify the maximum number of entries in the
cache.
- "noprefetch" - This disables prefetch of small variables.
\subsection Notes on Debugging OPeNDAP Access
\subsection dap_debug Notes on Debugging OPeNDAP Access
The OPeNDAP support makes use of the logging facility of the
underlying oc system. Note that this is currently separate from the
underlying oc system (see http://www.opendap.org/oc).
Note that this is currently separate from the
existing netCDF logging facility. Turning on this logging can
sometimes give important information. Logging can be enabled by
prefixing the url with the client parameter [log] or [log=filename],
using the client parameter "log" or "log=filename",
where the first case will send log output to standard error and the
second will send log output to the specified file.
Users should also be aware that the DAP subsystem creates temporary
files of the name dataddsXXXXXX, where XXXXX is some random string. If
the program using the DAP subsystem crashes, these files may be left
around. It is perfectly safe to delete them. Also, if you are
accessing data over an NFS mount, you may see some .nfsxxxxx files;
those can be ignored as well. 4.12.4 HTTP Configuration.
Users should also be aware that if one is
accessing data over an NFS mount, one may see some .nfsxxxxx files;
those can be ignored.
\subsection http_config HTTP Configuration.
Limited support for configuring the http connection is provided via
parameters in the “.httprc” configuration file. Although deprecated,
the name “.dodsrc” may also be used. The relevant .httprc file is
parameters in the “.dodsrc” configuration file. The relevant .dodsrc file is
located by first looking in the current working directory, and if not
found, then looking in the directory specified by the “$HOME”
environment variable.
Entries in the .httprc file are of the form:
Entries in the .dodsrc file are of the form:
\code
['['<url>']']<key>=<value>
@ -2640,9 +2511,9 @@ follows.
The related curl flags line indicates the curl flags modified by this
key. See the libcurl documentation of the curl_easy_setopt() function
for more detail http://curl.haxx.se/libcurl/c/curl_easy_setopt.html.
for more detail (http://curl.haxx.se/libcurl/c/curl_easy_setopt.html).
For ESG, the following entries must be specified:
For ESG client side key support, the following entries must be specified:
\code
HTTP.SSL.VALIDATE
@ -2973,7 +2844,7 @@ variables may be initialized. The syntax of an initialization is
simple:
\code
variable = value_1, value_2, ...;
variable = value_1, value_2, ... ;
\endcode
The comma-delimited list of constants may be separated by spaces,
@ -3506,7 +3377,7 @@ omega:
Examine the translated DDS for the DAP source from the specified URL:
\code
ncdump -h http://test.opendap.org:8080/dods/dts/test.01
ncdump -h http://thredds-test.ucar.edu/dts/test.01
\endcode
Without dumping all the data, show the special virtual attributes that indicate

View File

@ -240,21 +240,39 @@ The following works to build HDF5 with parallel I/O on our netCDF
testing system:
\verbatim
CC=mpicc ./configure --enable-parallel --prefix=/shecky/local_par --with-zlib=/shecky/local_par
CC=mpicc ./configure --enable-parallel
make check install
\endverbatim
If the HDF5 used by netCDF has been built with parallel I/O, then
netCDF will also be built with support for parallel I/O. This allows
parallel I/O access to netCDF-4/HDF5 files. (See /ref netcdf_formats
for more information about the netCDF format variants.)
parallel I/O access to netCDF-4/HDF5 files. Note that shared libraries
are not supported for parallel HDF5, which makes linking more
difficult to get right. For some reason, "LIBS=-ldl" seems to
sometimes be needed to link successfully with parallel HDF5 libraries.
(See /ref netcdf_formats for more information about the netCDF format
variants.)
The following works to build netCDF-4 with parallel I/O on our netCDF
testing system:
\verbatim
H5DIR=/where/parallel/HDF5/was/installed
CPPFLAGS="-I${H5DIR}/include"
CC=mpicc
LDFLAGS=-L${H5DIR}/lib
LIBS=-ldl
./configure --disable-shared --enable-parallel-tests
make check install
\endverbatim
If parallel I/O access to netCDF classic and 64-bit offset files is
also needed, the parallel-netcdf library should also be installed,
also needed, the parallel-netcdf library should also be installed.
(Note: the previously recommended <a
href=ftp://ftp.unidata.ucar.edu/pub/netcdf/contrib/pnetcdf.h>replacement
pnetcdf.h</a> should no longer be used.) Then configure netCDF with the
--enable-pnetcdf flag.
"--enable-pnetcdf" option.
\page linking Linking to NetCDF

View File

@ -3147,12 +3147,15 @@ and then verify them in HDF5. (And vice versa).
Beginning with netCDF version 4.1,
optional support is provided for accessing data through
OPeNDAP servers using the DAP protocol.
Currently, only DAP protocol version 2 is supported; DAP protocol
version 4 support is under development.
DAP support is automatically enabled if a usable curl library can be
located using the curl-config program or by the --with-curl-config flag.
It can forcibly be enabled or disabled using the --enable-dap
set using the LDFLAGS environment variable (similar to the way
that the HDF5 libraries are referenced).
DAP support can forcibly be enabled or disabled using the --enable-dap
flag or the --disable-dap flag, respectively. If enabled,
then DAP support requires access to the curl library.
then DAP2 support requires access to the curl library.
Refer to the installation manual for details
@ref{Top,@value{i-man},, netcdf-install, @value{i-man}}.
@ -3168,22 +3171,29 @@ the OPeNDAP web site @uref{@value{opendap-url}}.
In order to access an OPeNDAP data source through the netCDF
API, the file name normally used is replaced with a
URL with a specific format.
The URL is composed of four parts.
The URL is composed of three parts.
@enumerate
@item Client parameters - these are prefixed to the front of the
URL and are of the general form [<name>] or [<name>=value].
Examples include [cache=1] and [netcdf3].
@item URL - this is a standard form URL such as
http://test.opendap.org:8080/dods/dts/test.01
http://thredds-test.ucar.edu/dts/test.01
@item Constraints - these are suffixed to the URL and
take the form ``?<projections>&selections''.
The meaning of the terms projection and selection is somewhat complicated;
and the OPeNDAP web site,
@uref{http://www.opendap.or},
@uref{http://www.opendap.org},
should be consulted.
The interaction of DAP constraints with netCDF is complex and
at the moment requires an understanding of how DAP is translated
to netCDF.
@item Client parameters -
these may be specified in either of two ways.
The older, deprecated form prefixes
text to the front of the url and is of
the general form [<name>] or [<name>=value].
Examples include [show=fetch] and [noprefetch].
The newer, preferred form prefixes the
parameters to the end of the url using the
semi-standard '#' format:
``http://....#show=fetch&noprefetch''.
@end enumerate
It is possible to see what the translation does to a particular DAP
@ -3199,13 +3209,13 @@ For example, if a web browser is given the following,
the first URL will return the DDS for the specified dataset,
and the second URL will return the DAS for the specified dataset.
@example
http://test.opendap.org:8080/dods/dts/test.01.dds
http://test.opendap.org:8080/dods/dts/test.01.das
http://thredds-test.ucar.edu/dts/test.01.dds
http://thredds-test.ucar.edu/dts/test.01.das
@end example
Then by using the following ncdump command, it is possible to see the
equivalent netCDF Classic translation.
@example
ncdump -h http://test.opendap.org:8080/dods/dts/test.01
ncdump -h http://thredds-test.ucar.edu/dts/test.01
@end example
The DDS output from the web server should look like this.
@ -3277,11 +3287,11 @@ associated with a variable in the DDS.
Alternately, one can get the text of the DDS as a global attribute
by using the client parameters
mechanism . In this case, the parameter ``[show=dds]''
mechanism . In this case, the parameter ``show=dds''
can be prefixed to the URL and the data retrieved using
the following command
@example
ncdump -h [show=dds]http://test.opendap.org:8080/dods/dts/test.01.dds
ncdump -h http://thredds-test.ucar.edu/dts/test.01.dds#show=dds
@end example
The ncdump -h command will then show both the translation and the original
DDS. In the above example, the DDS would appear as the global
@ -3300,11 +3310,9 @@ variables:
@end verbatim
@subsection DAP to NetCDF Translation Rules
Two translations are currently available.
@itemize
@item DAP 2 Protocol to netCDF-3
@item DAP 2 Protocol to netCDF-4
@end itemize
Currently only one translation available: DAP 2 Protocol to netCDF-3.
There used to be a DAP 2 Protocol to netCDF-4 translation
but that has been removed until the DAP4 protocol is available.
@subsubsection netCDF-3 Translation Rules
The current default translation code
@ -3312,9 +3320,8 @@ translates the OPeNDAP protocol to netCDF-3 (classic).
This netCDF-3 translation converts an OPeNDAP
DAP protocol version 2 DDS to netCDF-3 and is designed to mimic
as closely as possible the translation provided by the libnc-dap
system.
In addition, a translation to netCDF-4 (enhanced) is provided
that is entirely new.
system, except that some errors in that older translation have
been fixed.
For illustrative purposes, the following example will be used.
@verbatim
@ -3604,6 +3611,7 @@ how many records are associated with the sequence.
Since libnc-dap did essentially the same thing, it can be assumed that
the cost is not prohibitive.
@ignore
@subsubsection netCDF-4 Translation Rules
A DAP to netCDF-4 translation also exists, but is not the
default and in any case is only available if the
@ -3792,14 +3800,14 @@ then netCF-4 translation is used.
If none of the above holds, then default to netCDF-3 classic
translation.
@end enumerate
@end
@subsubsection Caching
In an effort to provide better
performance for some access patterns,
client-side caching of data is available.
The default is no caching, but it may
be enabled by prefixing the URL
with "[cache]".
be enabled by the parameter "cache".
Caching operates basically as follows.
@enumerate
@ -3808,7 +3816,8 @@ netCDF automatically does a pre-fetch
of selected variables. These include all
variables smaller than a specified (and user definable)
size. This allows, for example, quick access to
coordinate variables.
coordinate variables. This can be suppressed
with the parameter "noprefetch".
@item
Whenever a request is made using some variant
@ -3856,71 +3865,65 @@ Currently, a limited set of client parameters is recognized.
Parameters not listed here are ignored, but no error is signalled.
@table @emph
@item Parameter Name Legal Values Semantics
@item [netcdf-3]|[netcdf-3]
@item netcdf-3 | netcdf-3
Specify translation to netCDF-3.
@item [netcdf-4]|[netcdf-4]
Specify translation to netCDF-4.
@item "[log]|[log=<file>]" ""
@item "log | log=<file>"
Turn on logging and send the log output to the specified file.
If no file is specified, then output to standard error.
@item "[show=...]" das|dds|url
If no file is specified, then output is sent to standard error.
@item "show=..." das|dds|url
This causes information to appear as specific global attributes.
The currently recognized tags are "dds" to
display the underlying DDS, "das" similarly, and "url" to display
the url used to retrieve the data.
This parameter may be specified multiple times (e.g. ``[show=dds][show=url]'').
@item "[show=fetch]"
This parameter may be specified multiple times (e.g. ``show=dds&show=url'').
@item "show=fetch"
This parameter causes the netCDF code to log a copy of the complete
url for every HTTP get request. If logging is enabled, then
this can be helpful in checking to see the access behavior of the
netCDF code.
@item "[stringlength=NN]"
@item "stringlength=NN"
Specify the default string length to use for string dimensions.
The default is 64.
@item "[stringlength_<var>=NN]"
@item "stringlength_<var>=NN"
Specify the default string length to use for a string dimension
for the specified variable.
The default is 64.
@item "[cache]"
@item "cache"
This enables caching.
@item "[cachelimit=NN]"
@item "cachelimit=NN"
Specify the maximum amount of space allowed for the cache.
@item "[cachecount=NN]"
@item "cachecount=NN"
Specify the maximum number of entries in the cache.
@item "noprefetch"
Disable prefetch of small variables
@end table
@subsection Notes on Debugging OPeNDAP Access
The OPeNDAP support makes use of the logging facility of the
underlying oc system. Note that this is currently
underlying oc system (see http://www.opendap.org/oc).
Note that this is currently
separate from the existing netCDF logging facility.
Turning on this logging can sometimes give
important information. Logging can be enabled
by prefixing the url with
the client parameter [log] or [log=filename], where the first
using the client parameter "log" or "log=filename", where the first
case will send log output to standard error and the second
will send log output to the specified file.
Users should also be aware that the DAP subsystem
creates temporary files of the name dataddsXXXXXX,
where XXXXX is some random string. If the program
using the DAP subsystem crashes, these files may
be left around. It is perfectly safe to delete them.
Also, if you are accessing data over an NFS mount,
you may see some .nfsxxxxx files; those can be ignored
as well.
Users should also be aware that if you one is
accessing data over an NFS mount, you may see some .nfsxxxxx files;
those can be ignored.
@subsection HTTP Configuration.
Limited support for configuring the http connection
is provided via parameters in the
``.httprc'' configuration file. Although deprecated, the name
``.dodsrc'' may also be used.
The relevant .httprc file is located by first looking in the
``.dodsrc'' configuration file.
The relevant .dodsrc file is located by first looking in the
current working directory, and if not found, then looking in the
directory specified by the ``$HOME'' environment variable.
Entries in the .httprc file are of the form:
Entries in the .dodsrc file are of the form:
@example
['['<url>']']<key>=<value>
@end example
@ -4068,7 +4071,7 @@ by this key. See the libcurl documentation of the curl_easy_setopt()
function for more detail
@uref{http://curl.haxx.se/libcurl/c/curl_easy_setopt.html}.
For ESG, the following entries must be specified:
For ESG client side key support, the following entries must be specified:
@itemize
@item HTTP.SSL.VALIDATE
@item HTTP.COOKIEJAR
@ -4773,7 +4776,7 @@ ncdump -v omega -f fortran -n omega foo.nc > Z.cdl
Examine the translated DDS for the DAP source from the specified URL.
ncdump -h http://test.opendap.org:8080/dods/dts/test.01
ncdump -h http://thredds-test.ucar.edu/dts/test.01
@node nccopy, ncgen3, ncdump, NetCDF Utilities
@section nccopy

View File

@ -22,6 +22,10 @@ if USE_NETCDF4
TESTPROGRAMS += tst_atts
endif
if USE_PNETCDF
TESTPROGRAMS += tst_parallel2 tst_pnetcdf
endif
# if EXTRA_TESTS
# TESTPROGRAMS +=
# endif # EXTRA_TESTS
@ -70,6 +74,10 @@ TESTS += run_diskless2.sh
endif
endif
if USE_PNETCDF
TESTS += run_pnetcdf_test.sh
endif
# This will run a bunch of the test programs with valgrind, the memory
# checking tool. (Valgrind must be present for this to work.)
if USE_VALGRIND_TESTS
@ -84,7 +92,7 @@ endif # USE_VALGRIND_TESTS
# Distribute the .c files so that m4 isn't required on the users
# machine.
EXTRA_DIST = test_get.m4 test_put.m4 run_valgrind_tests.sh \
run_diskless.sh run_diskless2.sh run_mmap.sh
run_diskless.sh run_diskless2.sh run_mmap.sh run_pnetcdf_test.sh
# ref_tst_diskless2.cdl is for diff comparison and to produce tst_diskless2.c
EXTRA_DIST += ref_tst_diskless2.cdl CMakeLists.txt

View File

@ -123,16 +123,18 @@ main(int argc, char **argv)
signed char schar_in[ATT_LEN], schar_out[ATT_LEN] = {NC_MIN_BYTE, 1, NC_MAX_BYTE};
unsigned char uchar_in[ATT_LEN];
short short_in[ATT_LEN], short_out[ATT_LEN] = {NC_MIN_SHORT, -128, NC_MAX_SHORT};
unsigned short ushort_in[ATT_LEN], ushort_out[ATT_LEN] = {0, 128, NC_MAX_USHORT};
int int_in[ATT_LEN], int_out[ATT_LEN] = {-100000, 128, 100000};
long long_in[ATT_LEN];
unsigned int uint_in[ATT_LEN], uint_out[ATT_LEN] = {0, 128, NC_MAX_UINT};
float float_in[ATT_LEN], float_out[ATT_LEN] = {-0.5, 0.25, 0.125};
double double_in[ATT_LEN], double_out[ATT_LEN] = {-0.25, .5, 0.125};
long long longlong_in[ATT_LEN] = {-1LL, -1LL, -1LL};
#ifdef USE_NETCDF4
long long_in[ATT_LEN];
unsigned short ushort_in[ATT_LEN], ushort_out[ATT_LEN] = {0, 128, NC_MAX_USHORT};
unsigned int uint_in[ATT_LEN], uint_out[ATT_LEN] = {0, 128, NC_MAX_UINT};
long long longlong_out[ATT_LEN] = {-3123456789LL, 128LL, 3123456789LL};
unsigned long long ulonglong_in[ATT_LEN] = {NC_MAX_UINT64, NC_MAX_UINT64, NC_MAX_UINT64};
unsigned long long ulonglong_out[ATT_LEN] = {0LL, 128LL, 3123456789LL};
#endif
(void) signal(SIGFPE, SIG_IGN);

View File

@ -14,6 +14,7 @@
#include <string.h>
#include <mpi.h>
#include <netcdf.h>
#include <netcdf_par.h>
#include <assert.h>
#define NVARS 6

View File

@ -107,17 +107,12 @@ if TEST_PARALLEL
check_PROGRAMS += tst_mpi_parallel tst_parallel tst_parallel3 \
tst_parallel4 tst_nc4perf
TESTS += run_par_test.sh
# More tests run with --enable-pnetcdf
if USE_PNETCDF
check_PROGRAMS += tst_parallel2 tst_pnetcdf
TESTS += run_pnetcdf_test.sh
endif
endif
EXTRA_DIST = run_par_test.sh run_bm.sh run_bm_test1.sh run_bm_test2.sh \
run_bm_radar_2D.sh run_bm_radar_2D_compression1.sh run_par_bm_test.sh \
run_bm_elena.sh run_par_bm_radar_2D.sh run_bm_radar_2D_endianness1.sh \
run_tst_chunks.sh ref_chunks1.cdl ref_chunks2.cdl run_pnetcdf_test.sh \
run_tst_chunks.sh ref_chunks1.cdl ref_chunks2.cdl \
run_get_hdf4_files.sh run_valgrind_tests.sh run_valgrind_tests2.sh \
run_bm_ar4.sh ref_tst_compounds.nc run_hdf4_valgrind_tests.sh \
ref_tst_xplatform2_1.nc ref_tst_xplatform2_2.nc ref_tst_dims.nc \

View File

@ -202,21 +202,21 @@ yytext[MAXTRST-1] = '\0';
return lexdebug(OPAQUESTRING);
}
[cC]ompound|[sS]truct|[sS]tructure|STRUCT|COMPOUND|STRUCTURE {return lexdebug(COMPOUND);}
enum|ENUM {return lexdebug(ENUM);}
opaque|OPAQUE {return lexdebug(OPAQUE);}
compound|struct|structure {return lexdebug(COMPOUND);}
enum {return lexdebug(ENUM);}
opaque {return lexdebug(OPAQUE);}
float|FLOAT|real|REAL {return lexdebug(FLOAT_K);}
char|CHAR {return lexdebug(CHAR_K);}
byte|BYTE {return lexdebug(BYTE_K);}
ubyte|UBYTE {return lexdebug(UBYTE_K);}
short|SHORT {return lexdebug(SHORT_K);}
ushort|USHORT {return lexdebug(USHORT_K);}
long|LONG|int|INT|integer|INTEGER {return lexdebug(INT_K);}
ulong|ULONG|uint|UINT|uinteger|UINTEGER {return lexdebug(UINT_K);}
int64|INT64 {return lexdebug(INT64_K);}
uint64|UINT64 {return lexdebug(UINT64_K);}
double|DOUBLE {return lexdebug(DOUBLE_K);}
float|real {return lexdebug(FLOAT_K);}
char {return lexdebug(CHAR_K);}
byte {return lexdebug(BYTE_K);}
ubyte {return lexdebug(UBYTE_K);}
short {return lexdebug(SHORT_K);}
ushort {return lexdebug(USHORT_K);}
long|int|integer {return lexdebug(INT_K);}
ulong|uint|uinteger {return lexdebug(UINT_K);}
int64 {return lexdebug(INT64_K);}
uint64 {return lexdebug(UINT64_K);}
double {return lexdebug(DOUBLE_K);}
unlimited|UNLIMITED {int32_val = -1;
return lexdebug(NC_UNLIMITED_K);}

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,4 @@
/* A Bison parser, made by GNU Bison 2.7. */
/* A Bison parser, made by GNU Bison 2.6.4. */
/* Bison interface for Yacc-like parsers in C
@ -100,7 +100,7 @@ extern int ncgdebug;
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
{
/* Line 2058 of yacc.c */
/* Line 2077 of yacc.c */
#line 131 "ncgen.y"
Symbol* sym;
@ -111,7 +111,7 @@ Datalist* datalist;
Constant constant;
/* Line 2058 of yacc.c */
/* Line 2077 of yacc.c */
#line 116 "ncgen.tab.h"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1

File diff suppressed because it is too large Load Diff

View File

@ -34,12 +34,10 @@ EXTRA_DIST += CMakeLists.txt XGetopt.c
# This is used if someone wants to rebuild ncgenyy.c or ncgentab.c
# Otherwise never invoked, but records how to do it. Don't forget to
# manually insert #include <config.h> in ncgenyy.c!
ncgenyy.c: ncgen.l
# manually insert #include "config.h" in ncgenyy.c!
makeparser::
flex -Pncg -8 ncgen.l
mv lex.ncg.c ncgenyy.c
ncgentab.c ncgentab.h: ncgen.y
bison -pncg -d ncgen.y
mv ncgen.tab.c ncgentab.c
mv ncgen.tab.h ncgentab.h

View File

@ -118,12 +118,12 @@ exp ([eE][+-]?[0-9]+)
return (TERMSTRING);
}
float|FLOAT|real|REAL {return (FLOAT_K);}
char|CHAR {return (CHAR_K);}
byte|BYTE {return (BYTE_K);}
short|SHORT {return (SHORT_K);}
long|LONG|int|INT|integer|INTEGER {return (INT_K);}
double|DOUBLE {return (DOUBLE_K);}
float|real {return (FLOAT_K);}
char {return (CHAR_K);}
byte {return (BYTE_K);}
short {return (SHORT_K);}
long|int|integer {return (INT_K);}
double {return (DOUBLE_K);}
unlimited|UNLIMITED {int_val = -1;
return (NC_UNLIMITED_K);}

View File

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.6.4. */
/* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2011 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
@ -44,7 +44,7 @@
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "2.5"
#define YYBISON_VERSION "2.6.4"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@ -58,8 +58,6 @@
/* Pull parsers. */
#define YYPULL 1
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
#define yyparse ncgparse
@ -70,11 +68,9 @@
#define yydebug ncgdebug
#define yynerrs ncgnerrs
/* Copy the first part of user declarations. */
/* Line 268 of yacc.c */
#line 9 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 358 of yacc.c */
#line 9 "ncgen.y"
#ifdef sccs
static char SccsId[] = "$Id: ncgen.y,v 1.34 2010/03/31 18:18:41 dmh Exp $";
@ -147,14 +143,16 @@ void yyerror(char*);
int yyerror(char*);
#endif
/* Line 358 of yacc.c */
#line 148 "ncgen.tab.c"
/* Line 268 of yacc.c */
#line 153 "ncgen.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
# ifndef YY_NULL
# if defined __cplusplus && 201103L <= __cplusplus
# define YY_NULL nullptr
# else
# define YY_NULL 0
# endif
# endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
@ -164,11 +162,17 @@ int yyerror(char*);
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
/* In a future release of Bison, this section will be replaced
by #include "ncgen.tab.h". */
#ifndef YY_NCG_NCGEN_TAB_H_INCLUDED
# define YY_NCG_NCGEN_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int ncgdebug;
#endif
/* Tokens. */
#ifndef YYTOKENTYPE
@ -200,7 +204,6 @@ int yyerror(char*);
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
@ -208,12 +211,28 @@ typedef int YYSTYPE;
# define YYSTYPE_IS_DECLARED 1
#endif
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 /* !YY_NCG_NCGEN_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */
/* Line 343 of yacc.c */
#line 217 "ncgen.tab.c"
/* Line 377 of yacc.c */
#line 236 "ncgen.tab.c"
#ifdef short
# undef short
@ -266,24 +285,24 @@ typedef short int yytype_int16;
# if defined YYENABLE_NLS && YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
# endif
# endif
# ifndef YY_
# define YY_(msgid) msgid
# define YY_(Msgid) Msgid
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
# define YYUSE(E) ((void) (E))
#else
# define YYUSE(e) /* empty */
# define YYUSE(E) /* empty */
#endif
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
# define YYID(n) (n)
# define YYID(N) (N)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
@ -319,6 +338,7 @@ YYID (yyi)
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0
# endif
@ -410,20 +430,20 @@ union yyalloc
#endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from FROM to TO. The source and destination do
/* Copy COUNT objects from SRC to DST. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# define YYCOPY(Dst, Src, Count) \
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
# define YYCOPY(Dst, Src, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \
} \
while (YYID (0))
# endif
# endif
@ -538,7 +558,7 @@ static const yytype_uint16 yyrline[] =
};
#endif
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
#if YYDEBUG || YYERROR_VERBOSE || 0
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
@ -553,7 +573,7 @@ static const char *const yytname[] =
"vardecl", "type", "varlist", "varspec", "$@3", "var", "dimspec",
"dimlist", "vdim", "attdecl", "$@4", "gattdecl", "$@5", "att", "gatt",
"avar", "attr", "attvallist", "aconst", "attconst", "datasection",
"datadecls", "datadecl", "$@6", "constlist", "dconst", "$@7", "const", 0
"datadecls", "datadecl", "$@6", "constlist", "dconst", "$@7", "const", YY_NULL
};
#endif
@ -669,10 +689,10 @@ static const yytype_uint8 yytable[] =
93, 66, 101, 94, 111, 0, 86, 0, 51
};
#define yypact_value_is_default(yystate) \
((yystate) == (-73))
#define yypact_value_is_default(Yystate) \
(!!((Yystate) == (-73)))
#define yytable_value_is_error(yytable_value) \
#define yytable_value_is_error(Yytable_value) \
YYID (0)
static const yytype_int8 yycheck[] =
@ -732,17 +752,18 @@ static const yytype_uint8 yystos[] =
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
YYERROR; \
} \
@ -752,32 +773,33 @@ while (YYID (0))
#define YYTERROR 1
#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
#endif
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
/* This macro is provided for backward compatibility. */
@ -837,6 +859,8 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
YYSTYPE const * const yyvaluep;
#endif
{
FILE *yyo = yyoutput;
YYUSE (yyo);
if (!yyvaluep)
return;
# ifdef YYPRINT
@ -1088,12 +1112,12 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken)
{
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */
const char *yyformat = 0;
const char *yyformat = YY_NULL;
/* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per
@ -1153,7 +1177,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
break;
}
yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2;
@ -1245,25 +1269,20 @@ yydestruct (yymsg, yytype, yyvaluep)
}
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
/* The lookahead symbol. */
int yychar;
#ifndef YYLVAL_INITIALIZE
# define YYLVAL_INITIALIZE()
#endif
#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
# define YY_IGNORE_MAYBE_UNINITIALIZED_END
#endif
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
@ -1305,7 +1324,7 @@ yyparse ()
`yyss': related to states.
`yyvs': related to semantic values.
Refer to the stacks thru separate pointers, to allow yyoverflow
Refer to the stacks through separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
@ -1323,7 +1342,7 @@ yyparse ()
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
int yytoken;
int yytoken = 0;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
@ -1341,7 +1360,6 @@ yyparse ()
Keep to zero when no symbol should be popped. */
int yylen = 0;
yytoken = 0;
yyss = yyssa;
yyvs = yyvsa;
yystacksize = YYINITDEPTH;
@ -1360,6 +1378,7 @@ yyparse ()
yyssp = yyss;
yyvsp = yyvs;
YYLVAL_INITIALIZE ();
goto yysetstate;
/*------------------------------------------------------------.
@ -1500,7 +1519,9 @@ yybackup:
yychar = YYEMPTY;
yystate = yyn;
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
goto yynewstate;
@ -1537,16 +1558,14 @@ yyreduce:
switch (yyn)
{
case 2:
/* Line 1806 of yacc.c */
#line 114 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 114 "ncgen.y"
{ init_netcdf(); }
break;
case 3:
/* Line 1806 of yacc.c */
#line 117 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 117 "ncgen.y"
{
if (derror_count == 0)
define_netcdf(netcdfname);
@ -1556,9 +1575,8 @@ yyreduce:
break;
case 4:
/* Line 1806 of yacc.c */
#line 125 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 125 "ncgen.y"
{
if (derror_count == 0)
close_netcdf();
@ -1566,9 +1584,8 @@ yyreduce:
break;
case 11:
/* Line 1806 of yacc.c */
#line 140 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 140 "ncgen.y"
{ if (int_val <= 0)
derror("dimension length must be positive");
dims[ndims].size = int_val;
@ -1577,9 +1594,8 @@ yyreduce:
break;
case 12:
/* Line 1806 of yacc.c */
#line 146 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 146 "ncgen.y"
{ /* for rare case where 2^31 < dimsize < 2^32 */
if (double_val <= 0)
derror("dimension length must be positive");
@ -1593,9 +1609,8 @@ yyreduce:
break;
case 13:
/* Line 1806 of yacc.c */
#line 157 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 157 "ncgen.y"
{ if (rec_dim != -1)
derror("only one NC_UNLIMITED dimension allowed");
rec_dim = ndims; /* the unlimited (record) dimension */
@ -1605,9 +1620,8 @@ yyreduce:
break;
case 14:
/* Line 1806 of yacc.c */
#line 165 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 165 "ncgen.y"
{
if ((yyvsp[(1) - (1)])->is_dim == 1) {
derror( "duplicate dimension declaration for %s",
@ -1626,51 +1640,44 @@ yyreduce:
break;
case 27:
/* Line 1806 of yacc.c */
#line 197 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 197 "ncgen.y"
{ type_code = NC_BYTE; }
break;
case 28:
/* Line 1806 of yacc.c */
#line 198 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 198 "ncgen.y"
{ type_code = NC_CHAR; }
break;
case 29:
/* Line 1806 of yacc.c */
#line 199 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 199 "ncgen.y"
{ type_code = NC_SHORT; }
break;
case 30:
/* Line 1806 of yacc.c */
#line 200 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 200 "ncgen.y"
{ type_code = NC_INT; }
break;
case 31:
/* Line 1806 of yacc.c */
#line 201 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 201 "ncgen.y"
{ type_code = NC_FLOAT; }
break;
case 32:
/* Line 1806 of yacc.c */
#line 202 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 202 "ncgen.y"
{ type_code = NC_DOUBLE; }
break;
case 35:
/* Line 1806 of yacc.c */
#line 208 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 208 "ncgen.y"
{
static struct vars dummyvar;
@ -1706,9 +1713,8 @@ yyreduce:
break;
case 36:
/* Line 1806 of yacc.c */
#line 241 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 241 "ncgen.y"
{
vars[nvars].ndims = nvdims;
nvars++;
@ -1716,9 +1722,8 @@ yyreduce:
break;
case 42:
/* Line 1806 of yacc.c */
#line 255 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 255 "ncgen.y"
{
if (nvdims >= NC_MAX_VAR_DIMS) {
derror("%s has too many dimensions",vars[nvars].name);
@ -1741,54 +1746,48 @@ yyreduce:
break;
case 43:
/* Line 1806 of yacc.c */
#line 276 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 276 "ncgen.y"
{
defatt();
}
break;
case 44:
/* Line 1806 of yacc.c */
#line 280 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 280 "ncgen.y"
{
equalatt();
}
break;
case 45:
/* Line 1806 of yacc.c */
#line 285 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 285 "ncgen.y"
{
defatt();
}
break;
case 46:
/* Line 1806 of yacc.c */
#line 289 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 289 "ncgen.y"
{
equalatt();
}
break;
case 48:
/* Line 1806 of yacc.c */
#line 297 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 297 "ncgen.y"
{
varnum = NC_GLOBAL; /* handle of "global" attribute */
}
break;
case 49:
/* Line 1806 of yacc.c */
#line 303 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 303 "ncgen.y"
{ if ((yyvsp[(1) - (1)])->is_var == 1)
varnum = (yyvsp[(1) - (1)])->vnum;
else {
@ -1800,9 +1799,8 @@ yyreduce:
break;
case 50:
/* Line 1806 of yacc.c */
#line 313 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 313 "ncgen.y"
{
/* make sure atts array will hold attributes */
grow_aarray(natts, /* must hold natts+1 atts */
@ -1815,9 +1813,8 @@ yyreduce:
break;
case 53:
/* Line 1806 of yacc.c */
#line 327 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 327 "ncgen.y"
{
if (valtype == NC_UNSPECIFIED)
valtype = atype_code;
@ -1827,9 +1824,8 @@ yyreduce:
break;
case 54:
/* Line 1806 of yacc.c */
#line 336 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 336 "ncgen.y"
{
atype_code = NC_CHAR;
*char_valp++ = char_val;
@ -1838,9 +1834,8 @@ yyreduce:
break;
case 55:
/* Line 1806 of yacc.c */
#line 342 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 342 "ncgen.y"
{
atype_code = NC_CHAR;
{
@ -1856,9 +1851,8 @@ yyreduce:
break;
case 56:
/* Line 1806 of yacc.c */
#line 355 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 355 "ncgen.y"
{
atype_code = NC_BYTE;
*byte_valp++ = byte_val;
@ -1867,9 +1861,8 @@ yyreduce:
break;
case 57:
/* Line 1806 of yacc.c */
#line 361 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 361 "ncgen.y"
{
atype_code = NC_SHORT;
*short_valp++ = short_val;
@ -1878,9 +1871,8 @@ yyreduce:
break;
case 58:
/* Line 1806 of yacc.c */
#line 367 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 367 "ncgen.y"
{
atype_code = NC_INT;
*int_valp++ = int_val;
@ -1889,9 +1881,8 @@ yyreduce:
break;
case 59:
/* Line 1806 of yacc.c */
#line 373 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 373 "ncgen.y"
{
atype_code = NC_FLOAT;
*float_valp++ = float_val;
@ -1900,9 +1891,8 @@ yyreduce:
break;
case 60:
/* Line 1806 of yacc.c */
#line 379 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 379 "ncgen.y"
{
atype_code = NC_DOUBLE;
*double_valp++ = double_val;
@ -1911,9 +1901,8 @@ yyreduce:
break;
case 66:
/* Line 1806 of yacc.c */
#line 395 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 395 "ncgen.y"
{
valtype = vars[varnum].type; /* variable type */
valnum = 0; /* values accumulated for variable */
@ -1967,9 +1956,8 @@ yyreduce:
break;
case 67:
/* Line 1806 of yacc.c */
#line 446 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 446 "ncgen.y"
{
if (valnum < var_len) { /* leftovers */
nc_fill(valtype,
@ -1987,9 +1975,8 @@ yyreduce:
break;
case 70:
/* Line 1806 of yacc.c */
#line 465 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 465 "ncgen.y"
{
if(valnum >= var_len) {
if (vars[varnum].dims[0] != rec_dim) { /* not recvar */
@ -2017,9 +2004,8 @@ yyreduce:
break;
case 71:
/* Line 1806 of yacc.c */
#line 490 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 490 "ncgen.y"
{
if (not_a_string) {
switch (valtype) {
@ -2048,9 +2034,8 @@ yyreduce:
break;
case 72:
/* Line 1806 of yacc.c */
#line 518 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 518 "ncgen.y"
{
atype_code = NC_CHAR;
switch (valtype) {
@ -2079,9 +2064,8 @@ yyreduce:
break;
case 73:
/* Line 1806 of yacc.c */
#line 544 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 544 "ncgen.y"
{
not_a_string = 0;
atype_code = NC_CHAR;
@ -2139,9 +2123,8 @@ yyreduce:
break;
case 74:
/* Line 1806 of yacc.c */
#line 599 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 599 "ncgen.y"
{
atype_code = NC_BYTE;
switch (valtype) {
@ -2170,9 +2153,8 @@ yyreduce:
break;
case 75:
/* Line 1806 of yacc.c */
#line 625 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 625 "ncgen.y"
{
atype_code = NC_SHORT;
switch (valtype) {
@ -2201,9 +2183,8 @@ yyreduce:
break;
case 76:
/* Line 1806 of yacc.c */
#line 651 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 651 "ncgen.y"
{
atype_code = NC_INT;
switch (valtype) {
@ -2232,9 +2213,8 @@ yyreduce:
break;
case 77:
/* Line 1806 of yacc.c */
#line 677 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 677 "ncgen.y"
{
atype_code = NC_FLOAT;
switch (valtype) {
@ -2263,9 +2243,8 @@ yyreduce:
break;
case 78:
/* Line 1806 of yacc.c */
#line 703 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 703 "ncgen.y"
{
atype_code = NC_DOUBLE;
switch (valtype) {
@ -2297,9 +2276,8 @@ yyreduce:
break;
case 79:
/* Line 1806 of yacc.c */
#line 732 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 1813 of yacc.c */
#line 732 "ncgen.y"
{
/* store fill_value */
switch (valtype) {
@ -2334,9 +2312,8 @@ yyreduce:
break;
/* Line 1806 of yacc.c */
#line 2340 "ncgen.tab.c"
/* Line 1813 of yacc.c */
#line 2317 "ncgen.tab.c"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@ -2499,7 +2476,9 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
*++yyvsp = yylval;
YY_IGNORE_MAYBE_UNINITIALIZED_END
/* Shift the error token. */
@ -2523,7 +2502,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
#if !defined(yyoverflow) || YYERROR_VERBOSE
#if !defined yyoverflow || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@ -2565,9 +2544,8 @@ yyreturn:
}
/* Line 2067 of yacc.c */
#line 767 "/home/wfisher/Desktop/netcdf-cmake/ncgen3/ncgen.y"
/* Line 2076 of yacc.c */
#line 767 "ncgen.y"
/* HELPER PROGRAMS */
@ -2697,4 +2675,3 @@ clearout(void) /* reset symbol table to empty */
#define YY_NO_INPUT
#include "ncgenyy.c"

View File

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.5. */
/* A Bison parser, made by GNU Bison 2.6.4. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2011 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
@ -30,6 +30,15 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_NCG_NCGEN_TAB_H_INCLUDED
# define YY_NCG_NCGEN_TAB_H_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int ncgdebug;
#endif
/* Tokens. */
#ifndef YYTOKENTYPE
@ -61,7 +70,6 @@
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
@ -71,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 /* !YY_NCG_NCGEN_TAB_H_INCLUDED */

View File

@ -387,37 +387,34 @@ struct yy_trans_info
flex_int32_t yy_verify;
flex_int32_t yy_nxt;
};
static yyconst flex_int16_t yy_accept[264] =
static yyconst flex_int16_t yy_accept[236] =
{ 0,
0, 0, 31, 29, 28, 17, 29, 29, 29, 29,
19, 29, 22, 22, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 29, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 29,
29, 29, 28, 0, 2, 0, 0, 0, 19, 22,
22, 0, 0, 19, 19, 0, 20, 1, 23, 23,
18, 23, 22, 21, 0, 22, 18, 16, 0, 0,
0, 0, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 29, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 29, 29, 29, 28, 0, 2,
0, 0, 0, 19, 22, 22, 0, 0, 19, 19,
0, 20, 1, 23, 23, 18, 23, 22, 21, 0,
22, 18, 16, 0, 0, 0, 0, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 0, 0, 24, 0, 0, 0, 0, 0,
16, 16, 16, 16, 16, 0, 0, 24, 0, 0,
0, 0, 0, 19, 0, 0, 19, 1, 23, 19,
23, 0, 0, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 7, 16, 16, 16, 14, 16, 16,
16, 16, 16, 16, 16, 16, 16, 16, 7, 16,
16, 16, 16, 16, 16, 0, 27, 25, 0, 0,
19, 0, 19, 20, 19, 0, 5, 4, 16, 16,
16, 16, 16, 16, 16, 15, 16, 7, 16, 3,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 16, 16, 25, 0, 26, 0, 15, 0, 12,
19, 0, 0, 19, 1, 23, 19, 23, 0, 0,
16, 16, 16, 16, 16, 16, 16, 16, 14, 16,
16, 16, 16, 16, 16, 16, 16, 7, 16, 16,
16, 16, 16, 16, 0, 27, 25, 0, 0, 19,
0, 19, 20, 19, 0, 16, 16, 16, 16, 15,
16, 16, 16, 16, 5, 4, 16, 16, 16, 16,
16, 7, 16, 16, 3, 16, 16, 16, 25, 0,
26, 0, 15, 0, 12, 16, 16, 16, 16, 16,
16, 16, 16, 16, 16, 16, 16, 6, 16, 16,
16, 16, 16, 16, 16, 16, 16, 0, 16, 8,
16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
16, 0, 16, 16, 16, 16, 0, 16, 16, 16,
16, 16, 0, 16, 16, 13, 13, 16, 16, 16,
16, 16, 14, 16, 9, 16, 16, 16, 16, 11,
16, 10, 0
0, 16, 16, 16, 16, 16, 16, 16, 16, 8,
16, 16, 16, 0, 16, 16, 16, 16, 0, 16,
16, 16, 16, 16, 0, 16, 16, 13, 13, 16,
16, 16, 16, 16, 14, 16, 9, 16, 16, 16,
16, 11, 16, 10, 0
} ;
static yyconst flex_int32_t yy_ec[256] =
@ -429,271 +426,245 @@ static yyconst flex_int32_t yy_ec[256] =
6, 6, 9, 6, 10, 11, 12, 13, 14, 14,
14, 14, 14, 14, 14, 15, 15, 16, 6, 6,
6, 6, 6, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 27, 28, 29, 30, 31, 27,
27, 32, 33, 34, 35, 36, 27, 37, 38, 27,
6, 39, 6, 6, 27, 6, 40, 41, 42, 43,
24, 24, 25, 24, 24, 26, 27, 28, 29, 24,
24, 30, 31, 32, 33, 34, 24, 35, 24, 24,
6, 36, 6, 6, 24, 6, 37, 38, 39, 40,
44, 45, 46, 47, 48, 27, 27, 49, 50, 51,
52, 27, 27, 53, 54, 55, 56, 57, 27, 37,
58, 27, 59, 6, 6, 6, 1, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 60, 60, 60, 60, 60, 60, 60, 60, 60,
60, 61, 61, 61, 61, 61, 61, 61, 61, 61,
41, 42, 43, 44, 45, 24, 24, 46, 47, 48,
49, 24, 24, 50, 51, 52, 53, 54, 24, 35,
55, 24, 56, 6, 6, 6, 1, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 57, 57, 57, 57, 57, 57, 57, 57, 57,
57, 58, 58, 58, 58, 58, 58, 58, 58, 58,
61, 61, 61, 61, 61, 61, 61, 61, 61, 61,
61, 61, 61, 61, 1, 1, 1, 1, 1, 1,
1, 1, 1, 62, 62, 62, 62, 62, 62, 62,
62, 62, 62, 62, 62, 62, 62, 62, 62, 63,
63, 63, 63, 63, 63, 63, 63, 1, 1, 1,
58, 58, 58, 58, 58, 58, 58, 58, 58, 58,
58, 58, 58, 58, 1, 1, 1, 1, 1, 1,
1, 1, 1, 59, 59, 59, 59, 59, 59, 59,
59, 59, 59, 59, 59, 59, 59, 59, 59, 60,
60, 60, 60, 60, 60, 60, 60, 1, 1, 1,
1, 1, 1, 1, 1
} ;
static yyconst flex_int32_t yy_meta[64] =
static yyconst flex_int32_t yy_meta[61] =
{ 0,
1, 1, 2, 1, 1, 1, 1, 3, 4, 4,
4, 1, 5, 5, 5, 1, 4, 5, 5, 5,
5, 5, 5, 4, 4, 4, 4, 6, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
5, 5, 5, 5, 5, 4, 4, 4, 6, 4,
4, 4, 4, 4, 4, 4, 4, 4, 7, 1,
4, 4, 4
5, 5, 5, 4, 4, 6, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 5, 5, 5, 5,
5, 5, 4, 4, 4, 6, 4, 4, 4, 4,
4, 4, 4, 4, 4, 7, 1, 4, 4, 4
} ;
static yyconst flex_int16_t yy_base[274] =
static yyconst flex_int16_t yy_base[246] =
{ 0,
0, 0, 359, 1375, 62, 1375, 58, 317, 57, 62,
94, 342, 133, 177, 30, 42, 57, 132, 118, 50,
172, 63, 146, 167, 175, 183, 180, 72, 193, 200,
218, 210, 213, 226, 238, 246, 255, 252, 258, 272,
271, 265, 160, 91, 1375, 309, 298, 122, 0, 127,
0, 313, 245, 0, 1375, 320, 1375, 0, 46, 72,
155, 327, 1375, 1375, 0, 0, 1375, 285, 344, 233,
226, 224, 304, 335, 323, 329, 338, 332, 365, 416,
350, 371, 380, 401, 386, 411, 421, 436, 427, 441,
453, 432, 457, 447, 462, 472, 482, 487, 491, 508,
0, 0, 327, 1206, 59, 1206, 55, 277, 54, 59,
88, 295, 124, 165, 30, 57, 159, 61, 141, 149,
154, 174, 64, 166, 179, 191, 184, 199, 205, 212,
219, 225, 232, 237, 244, 243, 237, 81, 87, 1206,
278, 259, 91, 0, 118, 0, 139, 204, 0, 1206,
289, 1206, 0, 240, 66, 72, 296, 1206, 1206, 0,
0, 1206, 257, 313, 189, 188, 174, 276, 287, 295,
324, 372, 292, 320, 308, 345, 363, 366, 375, 384,
379, 393, 410, 405, 413, 423, 418, 438, 443, 450,
458, 455, 172, 165, 1206, 197, 143, 196, 114, 274,
501, 466, 516, 512, 519, 200, 180, 1375, 217, 297,
212, 175, 202, 570, 167, 254, 573, 0, 1375, 600,
571, 141, 137, 568, 573, 585, 578, 613, 603, 594,
598, 632, 623, 629, 657, 648, 638, 664, 669, 674,
678, 689, 685, 703, 682, 710, 714, 718, 723, 743,
748, 739, 730, 755, 759, 107, 1375, 1375, 331, 152,
1375, 124, 199, 255, 1375, 89, 769, 773, 780, 784,
787, 790, 794, 799, 820, 824, 827, 830, 837, 833,
840, 868, 886, 889, 871, 874, 899, 878, 905, 914,
917, 920, 924, 1375, 137, 1375, 126, 1375, 78, 1375,
506, 156, 311, 521, 0, 1206, 528, 346, 140, 126,
521, 528, 517, 464, 524, 535, 554, 542, 549, 567,
579, 570, 574, 561, 582, 607, 599, 610, 613, 624,
616, 628, 644, 649, 124, 1206, 1206, 180, 159, 1206,
54, 230, 236, 1206, 101, 661, 664, 655, 595, 669,
682, 674, 689, 699, 695, 702, 710, 715, 720, 729,
740, 735, 746, 750, 755, 760, 775, 765, 1206, 133,
1206, 128, 1206, 65, 1206, 785, 790, 802, 794, 805,
811, 821, 815, 831, 841, 860, 850, 857, 866, 869,
63, 878, 887, 894, 897, 929, 903, 914, 922, 932,
932, 951, 945, 962, 970, 957, 976, 965, 990, 983,
995, 1003, 1011, 1020, 1015, 1023, 1028, 75, 1049, 1031,
1061, 1056, 1064, 1074, 1099, 1081, 1069, 1102, 1094, 1112,
1109, 59, 1115, 1129, 1140, 1147, 248, 1159, 1165, 1154,
1150, 1175, 52, 1193, 1179, 0, 290, 1186, 1196, 1200,
1207, 1213, 1375, 1227, 1232, 1248, 1238, 1257, 1263, 1375,
1266, 1375, 1375, 1329, 1336, 1340, 1346, 1353, 1356, 85,
1360, 1363, 1368
935, 947, 950, 35, 968, 964, 975, 943, 120, 993,
996, 989, 1000, 1003, 25, 1009, 1028, 0, 122, 1021,
1035, 1041, 1038, 1054, 1206, 1071, 1067, 1075, 1081, 1088,
1092, 1206, 1100, 1206, 1206, 1160, 1167, 1171, 1177, 1184,
1187, 66, 1191, 1194, 1199
} ;
static yyconst flex_int16_t yy_def[274] =
static yyconst flex_int16_t yy_def[246] =
{ 0,
263, 1, 263, 263, 263, 263, 264, 265, 263, 263,
263, 263, 263, 263, 266, 266, 266, 266, 266, 266,
266, 266, 266, 266, 266, 266, 266, 263, 266, 266,
266, 266, 266, 266, 266, 266, 266, 266, 266, 263,
263, 263, 263, 264, 263, 264, 263, 267, 11, 14,
14, 263, 263, 11, 263, 263, 263, 268, 13, 269,
269, 269, 263, 263, 270, 14, 263, 266, 263, 263,
263, 263, 266, 266, 266, 266, 266, 266, 266, 266,
266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
235, 1, 235, 235, 235, 235, 236, 237, 235, 235,
235, 235, 235, 235, 238, 238, 238, 238, 238, 238,
238, 238, 235, 238, 238, 238, 238, 238, 238, 238,
238, 238, 238, 238, 235, 235, 235, 235, 236, 235,
236, 235, 239, 11, 14, 14, 235, 235, 11, 235,
235, 235, 240, 13, 241, 241, 241, 235, 235, 242,
14, 235, 238, 235, 235, 235, 235, 238, 238, 238,
238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
238, 238, 235, 235, 235, 235, 235, 243, 45, 235,
266, 266, 266, 266, 266, 263, 263, 263, 263, 263,
271, 50, 263, 263, 263, 263, 263, 268, 263, 62,
270, 263, 263, 266, 266, 266, 266, 266, 266, 266,
266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
266, 266, 266, 266, 266, 263, 263, 263, 263, 272,
263, 263, 269, 269, 263, 263, 266, 266, 266, 266,
266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
266, 266, 266, 263, 263, 263, 263, 263, 263, 263,
235, 235, 235, 235, 240, 235, 57, 242, 235, 235,
238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
238, 238, 238, 238, 235, 235, 235, 235, 244, 235,
235, 241, 241, 235, 235, 238, 238, 238, 238, 238,
238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
238, 238, 238, 238, 238, 238, 238, 238, 235, 235,
235, 235, 235, 235, 235, 238, 238, 238, 238, 238,
238, 238, 238, 238, 238, 238, 238, 238, 238, 238,
235, 238, 238, 238, 238, 238, 238, 238, 238, 238,
266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
266, 266, 266, 266, 266, 266, 266, 263, 266, 266,
266, 266, 266, 266, 266, 266, 266, 266, 266, 266,
266, 263, 266, 266, 266, 266, 273, 266, 266, 266,
266, 266, 263, 266, 266, 273, 273, 266, 266, 266,
266, 266, 263, 266, 266, 266, 266, 266, 266, 263,
266, 263, 0, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263
238, 238, 238, 235, 238, 238, 238, 238, 245, 238,
238, 238, 238, 238, 235, 238, 238, 245, 245, 238,
238, 238, 238, 238, 235, 238, 238, 238, 238, 238,
238, 235, 238, 235, 0, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235
} ;
static yyconst flex_int16_t yy_nxt[1439] =
static yyconst flex_int16_t yy_nxt[1267] =
{ 0,
4, 5, 6, 5, 5, 4, 7, 8, 9, 10,
11, 12, 13, 14, 14, 4, 4, 15, 16, 17,
18, 19, 20, 15, 15, 21, 15, 22, 15, 23,
15, 24, 25, 15, 26, 27, 15, 15, 28, 15,
29, 30, 31, 19, 32, 15, 15, 33, 34, 15,
35, 15, 36, 37, 15, 38, 39, 15, 4, 4,
40, 41, 42, 43, 45, 43, 43, 49, 69, 50,
51, 51, 49, 119, 50, 51, 51, 81, 52, 73,
69, 74, 263, 52, 92, 92, 92, 53, 69, 121,
70, 71, 72, 85, 119, 69, 46, 45, 82, 119,
11, 12, 13, 14, 14, 4, 4, 15, 15, 15,
16, 17, 18, 15, 19, 15, 15, 20, 15, 15,
15, 15, 21, 22, 15, 23, 15, 24, 25, 26,
17, 27, 15, 15, 28, 29, 15, 30, 15, 31,
32, 15, 33, 34, 15, 4, 4, 35, 36, 37,
38, 40, 38, 38, 44, 64, 45, 46, 46, 44,
108, 45, 46, 46, 68, 47, 79, 79, 79, 225,
47, 69, 38, 48, 38, 38, 215, 65, 66, 67,
41, 106, 64, 40, 47, 173, 64, 106, 174, 47,
52, 69, 70, 71, 72, 52, 54, 54, 54, 253,
70, 71, 72, 243, 55, 56, 57, 70, 71, 72,
119, 55, 232, 70, 71, 72, 79, 79, 218, 46,
80, 80, 80, 196, 110, 110, 55, 56, 57, 112,
112, 112, 55, 49, 194, 59, 59, 59, 68, 75,
60, 61, 60, 60, 62, 60, 69, 76, 111, 196,
63, 43, 77, 43, 43, 64, 92, 86, 198, 65,
69, 199, 60, 61, 60, 60, 62, 60, 70, 71,
72, 63, 119, 78, 69, 87, 64, 49, 88, 66,
66, 66, 70, 71, 72, 67, 166, 91, 52, 89,
49, 49, 49, 97, 97, 70, 73, 204, 50, 51,
52, 106, 191, 50, 65, 66, 67, 106, 65, 66,
67, 219, 41, 219, 219, 98, 219, 50, 51, 52,
99, 99, 99, 50, 44, 171, 54, 54, 54, 235,
169, 55, 56, 55, 55, 57, 55, 100, 100, 58,
137, 101, 101, 101, 59, 138, 138, 63, 60, 235,
55, 56, 55, 55, 57, 55, 171, 71, 71, 58,
75, 72, 72, 72, 59, 44, 64, 61, 61, 61,
79, 77, 145, 62, 64, 76, 47, 169, 74, 64,
58, 78, 170, 170, 64, 59, 63, 141, 65, 66,
68, 83, 263, 119, 63, 69, 70, 71, 72, 64,
69, 162, 90, 69, 114, 114, 114, 67, 69, 157,
52, 69, 84, 263, 157, 63, 119, 70, 71, 72,
64, 69, 70, 71, 72, 70, 71, 72, 69, 156,
70, 71, 72, 70, 71, 72, 94, 119, 69, 247,
93, 69, 247, 70, 71, 72, 69, 95, 98, 92,
70, 71, 72, 99, 69, 96, 117, 117, 117, 97,
70, 71, 72, 70, 71, 72, 69, 100, 70, 71,
72, 101, 119, 123, 69, 122, 70, 71, 72, 102,
69, 247, 68, 69, 247, 115, 69, 105, 70, 71,
67, 64, 62, 136, 136, 47, 65, 66, 67, 64,
58, 65, 66, 67, 64, 59, 65, 66, 67, 64,
80, 135, 81, 65, 66, 67, 64, 82, 79, 85,
110, 65, 66, 67, 64, 83, 65, 66, 67, 84,
64, 65, 66, 67, 109, 63, 86, 64, 65, 66,
67, 102, 88, 87, 64, 106, 65, 66, 67, 89,
64, 106, 65, 66, 67, 106, 95, 64, 90, 65,
66, 67, 64, 92, 235, 106, 65, 66, 67, 91,
235, 106, 65, 66, 67, 106, 101, 101, 101, 65,
66, 67, 64, 94, 65, 66, 67, 103, 103, 93,
72, 103, 104, 119, 158, 108, 70, 71, 72, 159,
159, 263, 70, 71, 72, 70, 71, 72, 70, 71,
72, 113, 113, 69, 107, 114, 114, 114, 116, 116,
106, 92, 117, 117, 117, 113, 113, 124, 194, 120,
120, 120, 69, 195, 195, 70, 71, 72, 68, 68,
68, 68, 125, 58, 119, 48, 126, 127, 263, 68,
263, 69, 263, 263, 70, 71, 72, 69, 263, 263,
69, 263, 128, 69, 263, 119, 69, 80, 80, 80,
132, 263, 68, 70, 71, 72, 263, 129, 69, 70,
71, 72, 70, 71, 72, 70, 71, 72, 70, 71,
79, 104, 104, 104, 100, 100, 53, 111, 107, 107,
107, 64, 43, 112, 65, 66, 67, 63, 63, 63,
63, 106, 64, 104, 104, 104, 235, 64, 63, 235,
64, 235, 235, 65, 66, 67, 72, 72, 72, 118,
116, 106, 235, 64, 65, 66, 67, 113, 63, 65,
66, 67, 65, 66, 67, 64, 235, 235, 235, 64,
235, 117, 235, 235, 235, 65, 66, 67, 63, 235,
235, 106, 119, 235, 235, 235, 59, 65, 66, 67,
64, 65, 66, 67, 72, 72, 72, 235, 120, 235,
235, 106, 114, 235, 115, 121, 59, 114, 64, 235,
72, 263, 68, 69, 263, 263, 263, 263, 263, 69,
70, 71, 72, 134, 263, 136, 263, 263, 69, 263,
263, 263, 133, 263, 69, 70, 71, 72, 80, 80,
80, 70, 71, 72, 263, 263, 130, 263, 131, 69,
70, 71, 72, 130, 137, 135, 70, 71, 72, 69,
138, 263, 263, 139, 69, 263, 263, 140, 130, 69,
131, 70, 71, 72, 130, 69, 263, 263, 141, 263,
69, 70, 71, 72, 69, 263, 70, 71, 72, 69,
263, 70, 71, 72, 142, 69, 144, 70, 71, 72,
263, 69, 70, 71, 72, 69, 70, 71, 72, 263,
235, 64, 65, 66, 67, 235, 235, 64, 235, 235,
64, 114, 235, 115, 64, 123, 235, 114, 235, 64,
65, 66, 67, 65, 66, 67, 235, 235, 64, 65,
66, 67, 65, 66, 67, 122, 65, 66, 67, 235,
64, 65, 66, 67, 124, 64, 235, 235, 64, 235,
65, 66, 67, 64, 235, 235, 125, 126, 64, 235,
235, 127, 65, 66, 67, 129, 235, 65, 66, 67,
65, 66, 67, 64, 128, 65, 66, 67, 64, 131,
65, 66, 67, 235, 235, 64, 235, 235, 235, 130,
64, 235, 235, 64, 235, 65, 66, 67, 132, 64,
69, 70, 71, 72, 69, 152, 263, 70, 71, 72,
69, 143, 263, 70, 71, 72, 145, 70, 71, 72,
69, 146, 70, 71, 72, 69, 70, 71, 72, 69,
263, 263, 70, 71, 72, 263, 263, 147, 148, 69,
263, 263, 70, 71, 72, 149, 69, 70, 71, 72,
69, 70, 71, 72, 69, 151, 263, 69, 150, 263,
154, 70, 71, 72, 263, 263, 263, 153, 70, 71,
72, 155, 70, 71, 72, 263, 70, 71, 72, 70,
71, 72, 114, 114, 114, 117, 117, 117, 263, 167,
161, 263, 57, 55, 263, 57, 263, 161, 119, 170,
65, 66, 67, 133, 134, 235, 235, 65, 66, 67,
235, 235, 65, 66, 67, 65, 66, 67, 101, 101,
101, 65, 66, 67, 235, 235, 140, 235, 52, 235,
235, 140, 235, 104, 104, 104, 235, 235, 146, 235,
235, 50, 235, 52, 235, 140, 50, 52, 142, 147,
143, 140, 64, 144, 148, 235, 64, 235, 235, 64,
50, 152, 52, 64, 235, 235, 50, 142, 235, 143,
64, 149, 235, 144, 65, 66, 67, 64, 65, 66,
67, 65, 66, 67, 64, 65, 66, 67, 235, 64,
235, 153, 65, 66, 67, 150, 64, 157, 151, 65,
55, 263, 169, 64, 168, 263, 69, 263, 263, 263,
263, 69, 161, 263, 57, 55, 69, 57, 161, 119,
163, 55, 164, 69, 64, 263, 263, 165, 70, 71,
72, 171, 69, 70, 71, 72, 69, 263, 70, 71,
72, 69, 163, 172, 164, 70, 71, 72, 165, 173,
175, 69, 263, 263, 70, 71, 72, 179, 70, 71,
72, 69, 174, 70, 71, 72, 263, 69, 263, 263,
69, 178, 263, 70, 71, 72, 69, 263, 263, 263,
263, 263, 263, 70, 71, 72, 69, 263, 263, 70,
71, 72, 70, 71, 72, 69, 180, 263, 70, 71,
66, 67, 64, 154, 235, 64, 65, 66, 67, 64,
155, 65, 66, 67, 64, 235, 235, 64, 65, 66,
67, 235, 158, 156, 65, 66, 67, 65, 66, 67,
64, 65, 66, 67, 64, 160, 65, 66, 67, 65,
66, 67, 64, 163, 159, 64, 178, 235, 64, 235,
161, 64, 65, 66, 67, 162, 65, 66, 67, 64,
235, 165, 164, 64, 65, 66, 67, 65, 66, 67,
65, 66, 67, 65, 66, 67, 175, 166, 235, 64,
235, 65, 66, 67, 64, 65, 66, 67, 167, 235,
64, 176, 235, 168, 180, 235, 64, 235, 235, 64,
72, 176, 69, 182, 177, 181, 263, 69, 70, 71,
72, 263, 69, 263, 183, 263, 69, 70, 71, 72,
69, 184, 263, 69, 70, 71, 72, 69, 167, 70,
71, 72, 263, 263, 70, 71, 72, 263, 70, 71,
72, 69, 70, 71, 72, 70, 71, 72, 69, 70,
71, 72, 69, 185, 186, 168, 69, 187, 263, 263,
263, 69, 263, 70, 71, 72, 188, 189, 69, 263,
70, 71, 72, 263, 70, 71, 72, 69, 70, 71,
72, 69, 191, 70, 71, 72, 69, 180, 178, 190,
70, 71, 72, 69, 263, 200, 263, 69, 263, 70,
177, 65, 66, 67, 64, 235, 65, 66, 67, 64,
235, 235, 65, 66, 67, 181, 182, 64, 65, 66,
67, 65, 66, 67, 64, 175, 65, 66, 67, 179,
64, 65, 66, 67, 64, 235, 235, 64, 235, 65,
66, 67, 235, 235, 235, 64, 65, 66, 67, 235,
64, 235, 65, 66, 67, 64, 65, 66, 67, 65,
66, 67, 183, 235, 64, 184, 186, 65, 66, 67,
64, 235, 65, 66, 67, 64, 235, 65, 66, 67,
165, 64, 185, 235, 235, 64, 65, 66, 67, 187,
64, 235, 65, 66, 67, 64, 235, 65, 66, 67,
71, 72, 192, 70, 71, 72, 193, 69, 70, 71,
72, 69, 263, 201, 202, 70, 71, 72, 69, 70,
71, 72, 69, 263, 263, 69, 263, 180, 69, 70,
71, 72, 69, 70, 71, 72, 263, 69, 203, 263,
70, 71, 72, 205, 70, 71, 72, 70, 71, 72,
70, 71, 72, 204, 70, 71, 72, 207, 69, 70,
71, 72, 69, 263, 263, 69, 263, 263, 69, 263,
263, 69, 263, 208, 263, 69, 263, 206, 69, 263,
70, 71, 72, 263, 70, 71, 72, 70, 71, 72,
70, 71, 72, 70, 71, 72, 209, 70, 71, 72,
64, 190, 235, 65, 66, 67, 235, 65, 66, 67,
64, 188, 65, 66, 67, 192, 235, 65, 66, 67,
64, 189, 65, 66, 67, 64, 194, 196, 235, 64,
193, 235, 65, 66, 67, 197, 235, 64, 195, 198,
64, 235, 65, 66, 67, 235, 64, 65, 66, 67,
64, 65, 66, 67, 235, 235, 64, 235, 235, 65,
66, 67, 65, 66, 67, 199, 64, 235, 65, 66,
67, 200, 65, 66, 67, 235, 64, 235, 65, 66,
67, 201, 196, 235, 235, 64, 235, 235, 65, 66,
67, 196, 64, 235, 235, 64, 235, 235, 65, 66,
70, 71, 72, 210, 200, 263, 69, 263, 263, 69,
263, 263, 69, 263, 263, 263, 69, 263, 263, 263,
263, 211, 212, 213, 69, 214, 263, 69, 70, 71,
72, 70, 71, 72, 70, 71, 72, 69, 70, 71,
72, 263, 263, 69, 263, 263, 70, 71, 72, 70,
71, 72, 69, 180, 263, 69, 215, 263, 69, 70,
71, 72, 69, 217, 219, 70, 71, 72, 263, 216,
69, 208, 220, 263, 70, 71, 72, 70, 71, 72,
70, 71, 72, 69, 70, 71, 72, 222, 221, 69,
263, 223, 70, 71, 72, 69, 263, 263, 225, 263,
67, 64, 205, 235, 64, 235, 203, 65, 66, 67,
202, 206, 235, 64, 65, 66, 67, 65, 66, 67,
235, 235, 64, 65, 66, 67, 65, 66, 67, 64,
209, 235, 64, 209, 210, 65, 66, 67, 64, 211,
235, 207, 235, 235, 65, 66, 67, 235, 208, 64,
235, 65, 66, 67, 65, 66, 67, 64, 235, 235,
65, 66, 67, 235, 64, 235, 212, 64, 235, 235,
64, 65, 66, 67, 235, 235, 235, 235, 64, 65,
66, 67, 64, 235, 162, 64, 65, 66, 67, 65,
66, 67, 65, 66, 67, 214, 216, 119, 213, 64,
69, 227, 263, 69, 224, 70, 71, 72, 69, 263,
263, 70, 71, 72, 69, 226, 263, 70, 71, 72,
263, 69, 70, 71, 72, 70, 71, 72, 69, 263,
70, 71, 72, 69, 263, 263, 70, 71, 72, 263,
263, 69, 225, 70, 71, 72, 220, 263, 228, 69,
70, 71, 72, 69, 229, 70, 71, 72, 69, 225,
263, 69, 263, 70, 71, 72, 69, 263, 231, 69,
230, 70, 71, 72, 233, 70, 71, 72, 263, 263,
70, 71, 72, 70, 71, 72, 234, 69, 70, 71,
72, 70, 71, 72, 69, 178, 239, 263, 263, 69,
65, 66, 67, 64, 65, 66, 67, 65, 66, 67,
64, 217, 235, 235, 220, 235, 150, 221, 235, 235,
235, 65, 66, 67, 64, 65, 66, 67, 64, 235,
235, 64, 65, 66, 67, 64, 226, 222, 64, 235,
223, 227, 235, 224, 64, 235, 65, 66, 67, 235,
65, 66, 67, 65, 66, 67, 64, 65, 66, 67,
65, 66, 67, 64, 235, 228, 65, 66, 67, 119,
64, 235, 235, 64, 235, 235, 64, 227, 65, 66,
67, 235, 235, 235, 235, 65, 66, 67, 229, 64,
232, 235, 65, 66, 67, 65, 66, 67, 65, 66,
237, 263, 69, 237, 263, 263, 235, 69, 263, 70,
71, 72, 69, 263, 238, 263, 70, 71, 72, 69,
263, 70, 71, 72, 70, 71, 72, 263, 236, 70,
71, 72, 69, 263, 70, 71, 72, 69, 263, 263,
69, 70, 71, 72, 263, 244, 178, 69, 263, 240,
69, 263, 263, 69, 70, 71, 72, 242, 263, 70,
71, 72, 70, 71, 72, 263, 241, 69, 263, 70,
71, 72, 70, 71, 72, 70, 71, 72, 69, 245,
248, 263, 263, 263, 176, 69, 249, 263, 69, 70,
71, 72, 69, 251, 263, 263, 263, 69, 263, 263,
67, 231, 64, 232, 230, 235, 64, 234, 235, 235,
64, 65, 66, 67, 235, 234, 64, 235, 235, 235,
235, 235, 235, 64, 65, 66, 67, 64, 65, 66,
67, 233, 65, 66, 67, 64, 235, 235, 65, 66,
67, 235, 235, 235, 235, 65, 66, 67, 235, 65,
66, 67, 235, 235, 235, 235, 235, 65, 66, 67,
39, 39, 39, 39, 39, 39, 39, 42, 42, 42,
42, 42, 42, 42, 63, 63, 63, 96, 235, 96,
96, 96, 96, 96, 105, 235, 105, 105, 105, 105,
105, 55, 55, 139, 235, 139, 172, 235, 172, 218,
70, 71, 72, 69, 138, 250, 255, 70, 71, 72,
70, 71, 72, 69, 70, 71, 72, 69, 252, 70,
71, 72, 254, 138, 69, 70, 71, 72, 256, 263,
263, 69, 263, 263, 69, 70, 71, 72, 69, 70,
71, 72, 263, 263, 263, 69, 70, 71, 72, 255,
257, 69, 263, 70, 71, 72, 70, 71, 72, 259,
70, 71, 72, 260, 263, 69, 258, 70, 71, 72,
69, 263, 260, 70, 71, 72, 69, 263, 262, 263,
263, 262, 263, 263, 263, 263, 69, 70, 71, 72,
263, 261, 70, 71, 72, 69, 263, 263, 70, 71,
72, 69, 263, 263, 69, 263, 263, 263, 70, 71,
72, 263, 263, 263, 263, 263, 263, 70, 71, 72,
263, 263, 263, 70, 71, 72, 70, 71, 72, 44,
44, 44, 44, 44, 44, 44, 47, 47, 47, 47,
47, 47, 47, 68, 68, 68, 109, 263, 109, 109,
109, 109, 109, 118, 263, 118, 118, 118, 118, 118,
60, 60, 160, 263, 160, 197, 263, 197, 246, 246,
246, 246, 246, 246, 3, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263
218, 218, 218, 218, 218, 3, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235
} ;
static yyconst flex_int16_t yy_chk[1439] =
static yyconst flex_int16_t yy_chk[1267] =
{ 0,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
@ -701,158 +672,139 @@ static yyconst flex_int16_t yy_chk[1439] =
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 5, 7, 5, 5, 9, 15, 9,
9, 9, 10, 59, 10, 10, 10, 20, 9, 16,
16, 17, 59, 10, 28, 28, 28, 10, 20, 270,
15, 15, 15, 22, 59, 17, 7, 44, 20, 60,
5, 7, 5, 5, 9, 15, 9, 9, 9, 10,
242, 10, 10, 10, 16, 9, 23, 23, 23, 215,
10, 16, 38, 10, 38, 38, 204, 15, 15, 15,
7, 55, 16, 39, 9, 141, 18, 56, 141, 10,
9, 22, 16, 16, 16, 10, 11, 11, 11, 243,
20, 20, 20, 232, 11, 11, 11, 17, 17, 17,
60, 11, 218, 22, 22, 22, 19, 19, 199, 44,
19, 19, 19, 197, 48, 48, 11, 11, 11, 50,
50, 50, 11, 13, 195, 13, 13, 13, 166, 18,
13, 13, 13, 13, 13, 13, 19, 18, 48, 160,
13, 43, 18, 43, 43, 13, 156, 23, 162, 13,
18, 162, 13, 13, 13, 13, 13, 13, 19, 19,
19, 13, 61, 18, 23, 23, 13, 14, 24, 14,
14, 14, 18, 18, 18, 14, 123, 27, 14, 25,
11, 11, 11, 43, 43, 16, 18, 191, 11, 11,
11, 55, 174, 11, 16, 16, 16, 56, 18, 18,
18, 209, 39, 219, 209, 43, 219, 11, 11, 11,
45, 45, 45, 11, 13, 172, 13, 13, 13, 99,
170, 13, 13, 13, 13, 13, 13, 47, 47, 13,
97, 47, 47, 47, 13, 97, 97, 145, 13, 99,
13, 13, 13, 13, 13, 13, 139, 17, 17, 13,
20, 17, 17, 17, 13, 14, 19, 14, 14, 14,
135, 21, 110, 14, 20, 20, 14, 138, 19, 21,
14, 22, 138, 138, 17, 14, 109, 102, 19, 19,
122, 21, 112, 61, 14, 24, 23, 23, 23, 14,
21, 115, 26, 25, 113, 113, 113, 14, 27, 111,
14, 26, 21, 112, 109, 14, 163, 24, 24, 24,
14, 29, 21, 21, 21, 25, 25, 25, 30, 107,
27, 27, 27, 26, 26, 26, 30, 163, 32, 237,
29, 33, 237, 29, 29, 29, 31, 31, 32, 106,
30, 30, 30, 33, 34, 31, 116, 116, 116, 31,
32, 32, 32, 33, 33, 33, 35, 34, 31, 31,
31, 35, 164, 72, 36, 71, 34, 34, 34, 36,
38, 247, 70, 37, 247, 53, 39, 39, 35, 35,
19, 24, 14, 98, 96, 14, 20, 20, 20, 22,
14, 21, 21, 21, 25, 14, 17, 17, 17, 27,
24, 94, 25, 24, 24, 24, 26, 26, 93, 27,
67, 22, 22, 22, 28, 26, 25, 25, 25, 26,
29, 27, 27, 27, 66, 65, 28, 30, 26, 26,
26, 48, 30, 29, 31, 142, 28, 28, 28, 31,
32, 143, 29, 29, 29, 54, 42, 33, 32, 30,
30, 30, 34, 34, 54, 142, 31, 31, 31, 33,
41, 143, 32, 32, 32, 54, 100, 100, 100, 33,
33, 33, 63, 37, 34, 34, 34, 51, 51, 36,
35, 37, 38, 164, 110, 47, 36, 36, 36, 110,
110, 46, 38, 38, 38, 37, 37, 37, 39, 39,
39, 52, 52, 68, 42, 52, 52, 52, 56, 56,
41, 40, 56, 56, 56, 62, 62, 73, 159, 62,
62, 62, 73, 159, 159, 68, 68, 68, 69, 69,
69, 69, 74, 12, 62, 8, 75, 76, 3, 69,
0, 75, 0, 0, 73, 73, 73, 76, 0, 0,
78, 0, 77, 74, 0, 62, 77, 79, 79, 79,
81, 0, 69, 75, 75, 75, 0, 78, 81, 76,
76, 76, 78, 78, 78, 74, 74, 74, 77, 77,
35, 51, 51, 51, 57, 57, 12, 68, 57, 57,
57, 68, 8, 69, 63, 63, 63, 64, 64, 64,
64, 57, 69, 103, 103, 103, 3, 73, 64, 0,
70, 0, 0, 68, 68, 68, 71, 71, 71, 75,
73, 57, 0, 75, 69, 69, 69, 70, 64, 73,
73, 73, 70, 70, 70, 74, 0, 0, 0, 71,
0, 74, 0, 0, 0, 75, 75, 75, 64, 0,
0, 108, 76, 0, 0, 0, 108, 74, 74, 74,
76, 71, 71, 71, 72, 72, 72, 0, 77, 0,
0, 108, 72, 0, 72, 78, 108, 72, 77, 0,
77, 0, 69, 79, 0, 0, 0, 0, 0, 82,
81, 81, 81, 83, 0, 85, 0, 0, 83, 0,
0, 0, 82, 0, 85, 79, 79, 79, 80, 80,
80, 82, 82, 82, 0, 0, 80, 0, 80, 84,
83, 83, 83, 80, 86, 84, 85, 85, 85, 86,
87, 0, 0, 88, 80, 0, 0, 89, 80, 87,
80, 84, 84, 84, 80, 89, 0, 0, 90, 0,
92, 86, 86, 86, 88, 0, 80, 80, 80, 90,
0, 87, 87, 87, 91, 94, 94, 89, 89, 89,
0, 91, 92, 92, 92, 93, 88, 88, 88, 0,
0, 78, 76, 76, 76, 0, 0, 72, 0, 0,
79, 72, 0, 72, 81, 81, 0, 72, 0, 80,
77, 77, 77, 78, 78, 78, 0, 0, 82, 72,
72, 72, 79, 79, 79, 80, 81, 81, 81, 0,
84, 80, 80, 80, 82, 83, 0, 0, 85, 0,
82, 82, 82, 87, 0, 0, 83, 84, 86, 0,
0, 85, 84, 84, 84, 87, 0, 83, 83, 83,
85, 85, 85, 88, 86, 87, 87, 87, 89, 89,
86, 86, 86, 0, 0, 90, 0, 0, 0, 88,
92, 0, 0, 91, 0, 88, 88, 88, 90, 114,
95, 90, 90, 90, 102, 102, 0, 94, 94, 94,
96, 93, 0, 91, 91, 91, 95, 93, 93, 93,
97, 96, 95, 95, 95, 98, 102, 102, 102, 99,
0, 0, 96, 96, 96, 0, 0, 97, 98, 101,
0, 0, 97, 97, 97, 99, 100, 98, 98, 98,
104, 99, 99, 99, 103, 101, 0, 105, 100, 0,
104, 101, 101, 101, 0, 0, 0, 103, 100, 100,
100, 105, 104, 104, 104, 0, 103, 103, 103, 105,
105, 105, 114, 114, 114, 117, 117, 117, 0, 124,
114, 0, 114, 117, 0, 117, 0, 114, 121, 127,
89, 89, 89, 91, 92, 0, 0, 90, 90, 90,
0, 0, 92, 92, 92, 91, 91, 91, 101, 101,
101, 114, 114, 114, 0, 0, 101, 0, 101, 0,
0, 101, 0, 104, 104, 104, 107, 107, 111, 0,
0, 104, 0, 104, 0, 101, 104, 101, 107, 112,
107, 101, 113, 107, 113, 0, 111, 0, 0, 115,
104, 118, 104, 112, 0, 0, 104, 107, 0, 107,
116, 116, 0, 107, 113, 113, 113, 118, 111, 111,
111, 115, 115, 115, 119, 112, 112, 112, 0, 117,
0, 120, 116, 116, 116, 117, 124, 124, 117, 118,
117, 0, 126, 121, 125, 0, 124, 0, 120, 120,
0, 125, 114, 0, 114, 117, 127, 117, 114, 121,
120, 117, 120, 126, 121, 0, 0, 120, 124, 124,
124, 128, 130, 125, 125, 125, 131, 0, 127, 127,
127, 129, 120, 129, 120, 126, 126, 126, 120, 132,
134, 128, 0, 0, 130, 130, 130, 137, 131, 131,
131, 133, 133, 129, 129, 129, 0, 134, 0, 0,
132, 136, 0, 128, 128, 128, 137, 0, 0, 0,
0, 0, 0, 133, 133, 133, 136, 0, 0, 134,
134, 134, 132, 132, 132, 135, 139, 0, 137, 137,
118, 118, 120, 121, 0, 122, 119, 119, 119, 123,
122, 117, 117, 117, 121, 0, 0, 125, 124, 124,
124, 0, 125, 123, 120, 120, 120, 122, 122, 122,
149, 123, 123, 123, 127, 127, 121, 121, 121, 125,
125, 125, 126, 130, 126, 128, 149, 0, 129, 0,
128, 131, 149, 149, 149, 129, 127, 127, 127, 130,
0, 131, 130, 132, 126, 126, 126, 128, 128, 128,
129, 129, 129, 131, 131, 131, 146, 132, 0, 133,
0, 130, 130, 130, 134, 132, 132, 132, 133, 0,
148, 147, 0, 134, 152, 0, 146, 0, 0, 147,
137, 135, 138, 141, 135, 140, 0, 139, 136, 136,
136, 0, 140, 0, 142, 0, 141, 135, 135, 135,
145, 145, 0, 143, 138, 138, 138, 142, 143, 139,
139, 139, 0, 0, 140, 140, 140, 0, 141, 141,
141, 144, 145, 145, 145, 143, 143, 143, 146, 142,
142, 142, 147, 146, 147, 144, 148, 148, 0, 0,
0, 149, 0, 144, 144, 144, 149, 151, 153, 0,
146, 146, 146, 0, 147, 147, 147, 152, 148, 148,
148, 150, 153, 149, 149, 149, 151, 152, 150, 151,
153, 153, 153, 154, 0, 169, 0, 155, 0, 152,
148, 133, 133, 133, 150, 0, 134, 134, 134, 152,
0, 0, 148, 148, 148, 153, 154, 151, 146, 146,
146, 147, 147, 147, 153, 157, 150, 150, 150, 151,
155, 152, 152, 152, 154, 0, 0, 156, 0, 151,
151, 151, 0, 0, 0, 157, 153, 153, 153, 0,
158, 0, 155, 155, 155, 159, 154, 154, 154, 156,
156, 156, 158, 0, 160, 159, 163, 157, 157, 157,
162, 0, 158, 158, 158, 161, 0, 159, 159, 159,
160, 163, 161, 0, 0, 164, 160, 160, 160, 164,
165, 0, 162, 162, 162, 166, 0, 161, 161, 161,
152, 152, 154, 150, 150, 150, 155, 167, 151, 151,
151, 168, 0, 170, 171, 154, 154, 154, 169, 155,
155, 155, 170, 0, 0, 171, 0, 173, 172, 167,
167, 167, 173, 168, 168, 168, 0, 174, 172, 0,
169, 169, 169, 175, 170, 170, 170, 171, 171, 171,
172, 172, 172, 174, 173, 173, 173, 179, 175, 174,
174, 174, 176, 0, 0, 177, 0, 0, 178, 0,
0, 180, 0, 181, 0, 179, 0, 177, 181, 0,
175, 175, 175, 0, 176, 176, 176, 177, 177, 177,
178, 178, 178, 180, 180, 180, 182, 179, 179, 179,
168, 168, 0, 163, 163, 163, 0, 164, 164, 164,
167, 166, 165, 165, 165, 176, 0, 166, 166, 166,
176, 167, 168, 168, 168, 177, 178, 180, 0, 179,
177, 0, 167, 167, 167, 181, 0, 178, 179, 182,
180, 0, 176, 176, 176, 0, 181, 177, 177, 177,
183, 179, 179, 179, 0, 0, 182, 0, 0, 178,
178, 178, 180, 180, 180, 183, 184, 0, 181, 181,
181, 184, 183, 183, 183, 0, 185, 0, 182, 182,
182, 185, 186, 0, 0, 187, 0, 0, 184, 184,
184, 187, 188, 0, 0, 186, 0, 0, 185, 185,
181, 181, 181, 183, 184, 0, 182, 0, 0, 185,
0, 0, 186, 0, 0, 0, 188, 0, 0, 0,
0, 185, 186, 188, 183, 189, 0, 184, 182, 182,
182, 185, 185, 185, 186, 186, 186, 187, 188, 188,
188, 0, 0, 189, 0, 0, 183, 183, 183, 184,
184, 184, 190, 187, 0, 191, 190, 0, 192, 187,
187, 187, 193, 193, 201, 189, 189, 189, 0, 192,
201, 191, 202, 0, 190, 190, 190, 191, 191, 191,
192, 192, 192, 203, 193, 193, 193, 204, 203, 202,
0, 205, 201, 201, 201, 206, 0, 0, 207, 0,
185, 189, 192, 0, 190, 0, 190, 187, 187, 187,
189, 193, 0, 192, 188, 188, 188, 186, 186, 186,
0, 0, 193, 189, 189, 189, 190, 190, 190, 194,
196, 0, 195, 196, 197, 192, 192, 192, 197, 198,
0, 194, 0, 0, 193, 193, 193, 0, 195, 198,
0, 194, 194, 194, 195, 195, 195, 199, 0, 0,
197, 197, 197, 0, 196, 0, 199, 200, 0, 0,
201, 198, 198, 198, 0, 0, 0, 0, 208, 199,
199, 199, 202, 0, 201, 203, 196, 196, 196, 200,
200, 200, 201, 201, 201, 203, 205, 208, 202, 206,
204, 210, 0, 208, 206, 203, 203, 203, 205, 0,
0, 202, 202, 202, 207, 209, 0, 206, 206, 206,
0, 210, 204, 204, 204, 208, 208, 208, 209, 0,
205, 205, 205, 211, 0, 0, 207, 207, 207, 0,
0, 212, 214, 210, 210, 210, 212, 0, 211, 213,
209, 209, 209, 215, 213, 211, 211, 211, 214, 215,
0, 216, 0, 212, 212, 212, 217, 0, 217, 220,
216, 213, 213, 213, 219, 215, 215, 215, 0, 0,
214, 214, 214, 216, 216, 216, 221, 219, 217, 217,
217, 220, 220, 220, 222, 223, 227, 0, 0, 221,
208, 208, 208, 205, 202, 202, 202, 203, 203, 203,
207, 206, 0, 0, 210, 0, 207, 211, 0, 0,
0, 206, 206, 206, 212, 205, 205, 205, 210, 0,
0, 211, 207, 207, 207, 213, 216, 212, 214, 0,
213, 220, 0, 214, 216, 0, 212, 212, 212, 0,
210, 210, 210, 211, 211, 211, 220, 213, 213, 213,
214, 214, 214, 217, 0, 221, 216, 216, 216, 217,
221, 0, 0, 223, 0, 0, 222, 223, 220, 220,
220, 0, 0, 0, 0, 217, 217, 217, 222, 224,
228, 0, 221, 221, 221, 223, 223, 223, 222, 222,
225, 0, 223, 225, 0, 0, 222, 227, 0, 219,
219, 219, 224, 0, 226, 0, 222, 222, 222, 226,
0, 221, 221, 221, 223, 223, 223, 0, 224, 227,
227, 227, 229, 0, 224, 224, 224, 225, 0, 0,
228, 226, 226, 226, 0, 233, 229, 231, 0, 228,
230, 0, 0, 233, 229, 229, 229, 231, 0, 225,
225, 225, 228, 228, 228, 0, 230, 234, 0, 231,
231, 231, 230, 230, 230, 233, 233, 233, 235, 234,
238, 0, 0, 0, 235, 236, 239, 0, 241, 234,
234, 234, 240, 241, 0, 0, 0, 238, 0, 0,
222, 226, 227, 230, 224, 0, 226, 231, 0, 0,
228, 224, 224, 224, 0, 233, 229, 0, 0, 0,
0, 0, 0, 230, 227, 227, 227, 231, 226, 226,
226, 229, 228, 228, 228, 233, 0, 0, 229, 229,
229, 0, 0, 0, 0, 230, 230, 230, 0, 231,
231, 231, 0, 0, 0, 0, 0, 233, 233, 233,
236, 236, 236, 236, 236, 236, 236, 237, 237, 237,
237, 237, 237, 237, 238, 238, 238, 239, 0, 239,
239, 239, 239, 239, 240, 0, 240, 240, 240, 240,
240, 241, 241, 243, 0, 243, 244, 0, 244, 245,
235, 235, 235, 239, 236, 240, 248, 236, 236, 236,
241, 241, 241, 242, 240, 240, 240, 245, 242, 238,
238, 238, 244, 245, 248, 239, 239, 239, 249, 0,
0, 244, 0, 0, 249, 242, 242, 242, 250, 245,
245, 245, 0, 0, 0, 251, 248, 248, 248, 251,
250, 252, 0, 244, 244, 244, 249, 249, 249, 254,
250, 250, 250, 256, 0, 254, 252, 251, 251, 251,
255, 0, 258, 252, 252, 252, 257, 0, 259, 0,
0, 261, 0, 0, 0, 0, 256, 254, 254, 254,
0, 257, 255, 255, 255, 258, 0, 0, 257, 257,
257, 259, 0, 0, 261, 0, 0, 0, 256, 256,
256, 0, 0, 0, 0, 0, 0, 258, 258, 258,
0, 0, 0, 259, 259, 259, 261, 261, 261, 264,
264, 264, 264, 264, 264, 264, 265, 265, 265, 265,
265, 265, 265, 266, 266, 266, 267, 0, 267, 267,
267, 267, 267, 268, 0, 268, 268, 268, 268, 268,
269, 269, 271, 0, 271, 272, 0, 272, 273, 273,
273, 273, 273, 273, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263, 263, 263,
263, 263, 263, 263, 263, 263, 263, 263
245, 245, 245, 245, 245, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235, 235, 235, 235, 235,
235, 235, 235, 235, 235, 235
} ;
static yy_state_type yy_last_accepting_state;
@ -957,7 +909,7 @@ ID ([A-Za-z_]|{UTF8})([A-Z.@#\[\]a-z_0-9+-]|{UTF8})*
/* Note: this definition of string will work for utf8 as well,
although it is a very relaxed definition
*/
#line 961 "lex.ncg.c"
#line 913 "lex.ncg.c"
#define INITIAL 0
@ -966,10 +918,8 @@ ID ([A-Za-z_]|{UTF8})([A-Z.@#\[\]a-z_0-9+-]|{UTF8})*
* down here because we want the user's section 1 to have been scanned first.
* The user has a chance to override it with an option.
*/
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#endif
#ifndef YY_EXTRA_TYPE
#define YY_EXTRA_TYPE void *
@ -1143,7 +1093,7 @@ YY_DECL
#line 107 "ncgen.l"
#line 1145 "lex.ncg.c"
#line 1097 "lex.ncg.c"
if ( !(yy_init) )
{
@ -1196,13 +1146,13 @@ yy_match:
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 264 )
if ( yy_current_state >= 236 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
++yy_cp;
}
while ( yy_base[yy_current_state] != 1375 );
while ( yy_base[yy_current_state] != 1206 );
yy_find_action:
yy_act = yy_accept[yy_current_state];
@ -1520,7 +1470,7 @@ YY_RULE_SETUP
#line 285 "ncgen.l"
ECHO;
YY_BREAK
#line 1522 "lex.ncg.c"
#line 1474 "lex.ncg.c"
case YY_STATE_EOF(INITIAL):
yyterminate();
@ -1812,7 +1762,7 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 264 )
if ( yy_current_state >= 236 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
@ -1840,11 +1790,11 @@ static int yy_get_next_buffer (void)
while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
{
yy_current_state = (int) yy_def[yy_current_state];
if ( yy_current_state >= 264 )
if ( yy_current_state >= 236 )
yy_c = yy_meta[(unsigned int) yy_c];
}
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 263);
yy_is_jam = (yy_current_state == 235);
return yy_is_jam ? 0 : yy_current_state;
}

View File

@ -8,7 +8,7 @@
# $Id: Makefile.am,v 1.1 2010/05/23 21:05:33 dmh Exp $
# Cause C preprocessor to search current and parent directory.
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include
AM_CPPFLAGS = -I.. -I$(top_srcdir) -I$(top_srcdir)/include
# OC Sources; include the daptab.[ch] to avoid the need for bison by user
SRC=oc.c \

View File

@ -562,19 +562,19 @@ oc_dds_fieldbyname(OCobject link, OCobject ddsnode, const char* name, OCobject*
err = oc_dds_nsubnodes(link,ddsnode,&count);
if(err != OC_NOERR) return err;
for(i=0;i<count;i++) {
int match=1;
OCobject field;
char* fieldname = NULL;
int match = 1;
err = oc_dds_ithfield(link,ddsnode,i,&field);
if(err != OC_NOERR) return err;
// Get the field's name
err = oc_dds_name(link,field,&fieldname);
if(err != OC_NOERR) return err;
if(fieldname != NULL) {
match = strcmp(name,fieldname);
free(fieldname);
match = strcmp(name,fieldname);
free(fieldname);
}
if(match == 0) {
if(fieldp) *fieldp = field;
return OC_NOERR;
@ -2039,3 +2039,13 @@ oc_dds_free(OCobject link, OCobject dds0)
}
OCerror
oc_set_curl_callback(OClink link, oc_curl_callback* callback, void* userstate)
{
OCstate* state;
OCVERIFY(OC_State,link);
OCDEREF(OCstate*,state,link);
state->usercurl = callback;
state->usercurldata = userstate;
return OC_NOERR;
}

View File

@ -17,13 +17,6 @@ Version: 2.0
/*!\file oc.h
*/
#ifndef ssize_t
#ifdef SSIZE_T
#define ssize_t SSIZE_T
#else
#define ssize_t int
#endif
#endif
/*!\defgroup Definitions Constants, types, etc.
@{*/
@ -93,6 +86,8 @@ OC_Structure=104,
OC_Dimension=105,
OC_Attribute=106,
OC_Attributeset=107,
OC_Map=108,
OC_Group=109,
} OCtype;
/*!\enum OCerror
@ -560,6 +555,14 @@ extern OCerror oc_set_useragent(OClink, const char* agent);
extern OCerror oc_raw_xdrsize(OClink,OCddsnode,off_t*);
#endif
/*
Define a callback function type
*/
typedef void oc_curl_callback(void*,void*);
extern OCerror oc_set_curl_callback(OClink,oc_curl_callback*,void* state);
#ifdef __cplusplus
}
#endif

View File

@ -9,6 +9,14 @@
#include <netinet/in.h>
#endif
#ifndef HAVE_SSIZE_T
#ifdef SSIZE_T
#define ssize_t SSIZE_T
#else
#define ssize_t int
#endif
#endif
#include "ocinternal.h"
#include "ocdebug.h"
@ -414,9 +422,9 @@ ocreadfile(FILE* file, int datastart, char** memp, size_t* lenp)
{
char* mem;
size_t len;
ssize_t pos;
size_t red;
struct stat stats;
ssize_t pos;
pos = ftell(file);
fseek(file,0,SEEK_SET);

View File

@ -194,6 +194,8 @@ ocfetch(OCstate* state, const char* constraint, OCdxd kind, OCflags flags,
if((stat=ocset_curl_flags(state)) != OC_NOERR) goto fail;
if((stat=ocset_proxy(state)) != OC_NOERR) goto fail;
if((stat=ocset_ssl(state)) != OC_NOERR) goto fail;
if(state->usercurl)
state->usercurl((void*)state->curl,state->usercurldata);
ocbytesclear(state->packet);
@ -584,7 +586,7 @@ ocsetcurlproperties(OCstate* state)
if(state->curlflags.useragent == NULL) {
size_t len = strlen(DFALTUSERAGENT) + strlen(VERSION) + 1;
char* agent = (char*)malloc(len+1);
if(occopycat(agent,len,2,DFALTUSERAGENT,VERSION))
if(occopycat(agent,len,2,DFALTUSERAGENT,VERSION))
state->curlflags.useragent = agent;
}
return;

View File

@ -159,6 +159,8 @@ struct OCstate {
char *username;
char *password;
} creds;
oc_curl_callback* usercurl;
void* usercurldata;
long ddslastmodified;
long datalastmodified;
};
@ -210,5 +212,4 @@ extern int ocinternalinitialize(void);
extern OCerror ocsetuseragent(OCstate* state, const char* agent);
#endif /*COMMON_H*/

View File

@ -95,8 +95,6 @@ readpacket(OCstate* state, OCURI* url,OCbytes* packet,OCdxd dxd,long* lastmodifi
char* fetchurl = NULL;
CURL* curl = state->curl;
fileprotocol = (strcmp(url->protocol,"file")==0);
if(fileprotocol && !state->curlflags.proto_file) {

View File

@ -800,7 +800,6 @@ ocuridecodeonly(char* s, char* only)
unsigned int c;
if (s == NULL) return NULL;
if(only == NULL) only = "";
slen = strlen(s);
decoded = (char*)malloc(slen+1); /* Should be max we need */
@ -808,7 +807,7 @@ ocuridecodeonly(char* s, char* only)
outptr = decoded;
inptr = s;
while((c = *inptr++)) {
if(c == '+' && strchr(only,'+') != NULL)
if(c == '+' && only != NULL && strchr(only,'+') != NULL)
*outptr++ = ' ';
else if(c == '%') {
/* try to pull two hex more characters */
@ -817,7 +816,7 @@ ocuridecodeonly(char* s, char* only)
&& strchr(hexchars,inptr[1]) != NULL) {
/* test conversion */
int xc = (fromHex(inptr[0]) << 4) | (fromHex(inptr[1]));
if(strchr(only,xc) != NULL) {
if(only == NULL || strchr(only,xc) != NULL) {
inptr += 2; /* decode it */
c = xc;
}

View File

@ -59,7 +59,6 @@
#include <sys/types.h>
#endif
#ifdef ENDIAN_VALIDATE
#include <arpa/inet.h>
#endif