mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
Merge branch 'v4.5.0-release-branch' into ncgenutf8.dmh
This commit is contained in:
commit
e2e7c20444
@ -1860,6 +1860,7 @@ SET(host_cpu "${cpu}")
|
||||
SET(host_vendor "${osname}")
|
||||
SET(host_os "${osrel}")
|
||||
SET(abs_top_builddir "${CMAKE_BINARY_DIR}")
|
||||
SET(abs_top_srcdir "${CMAKE_SOURCE_DIR}")
|
||||
|
||||
SET(CC_VERSION "${CMAKE_C_COMPILER}")
|
||||
|
||||
|
@ -1442,9 +1442,10 @@ abs_top_builddir=`pwd`
|
||||
cd $srcdir
|
||||
abs_top_srcdir=`pwd`
|
||||
cd $abs_top_builddir
|
||||
#AC_CONFIG_FILES(test_common.sh.in)
|
||||
rm -f ${abs_top_builddir}/test_common.sh
|
||||
sed -e "s|@TOPSRCDIR@|${abs_top_srcdir}|" -e "s|@TOPBUILDDIR@|${abs_top_builddir}|" <${abs_top_srcdir}/test_common.in >${abs_top_builddir}/test_common.sh
|
||||
|
||||
AC_CONFIG_FILES(test_common.sh:test_common.in)
|
||||
#rm -f ${abs_top_builddir}/test_common.sh
|
||||
#sed -e "s|@TOPSRCDIR@|${abs_top_srcdir}|" -e "s|@TOPBUILDDIR@|${abs_top_builddir}|" <${abs_top_srcdir}/test_common.in >${abs_top_builddir}/test_common.sh
|
||||
|
||||
#####
|
||||
# End netcdf_meta.h definitions.
|
||||
@ -1489,6 +1490,6 @@ AC_CONFIG_FILES([Makefile
|
||||
[test -f nc-config && chmod 755 nc-config])
|
||||
AC_OUTPUT()
|
||||
|
||||
mv -f ${abs_top_srcdir}/test_common.sh ${abs_top_builddir}/test_common.sh
|
||||
#mv -f ${abs_top_srcdir}/test_common.sh ${abs_top_builddir}/test_common.sh
|
||||
|
||||
cat libnetcdf.settings
|
||||
|
@ -10,7 +10,7 @@ EXTRA_DIST = netcdf.m4 DoxygenLayout.xml Doxyfile.in footer.html \
|
||||
architecture.dox internal.dox windows-binaries.md \
|
||||
building-with-cmake.md CMakeLists.txt \
|
||||
groups.dox install.md notes.md install-fortran.md \
|
||||
all-error-codes.md cmake_faq.md credits.md software.md \
|
||||
all-error-codes.md cmake_faq.md credits.md \
|
||||
auth.html obsolete/fan_utils.html bestpractices.md
|
||||
|
||||
# Turn off parallel builds in this directory.
|
||||
|
2580
docs/software.md
2580
docs/software.md
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@
|
||||
#define STR_LEN 255
|
||||
#define MAX_DIMS 255
|
||||
|
||||
herr_t alien_visitor(hid_t did, unsigned dim, hid_t dsid,
|
||||
herr_t alien_visitor(hid_t did, unsigned dim, hid_t dsid,
|
||||
void *visitor_data)
|
||||
{
|
||||
char name1[STR_LEN], name2[STR_LEN];
|
||||
@ -30,9 +30,9 @@ herr_t alien_visitor(hid_t did, unsigned dim, hid_t dsid,
|
||||
/* printf("name of dsid: %s\n", name2); */
|
||||
|
||||
if (H5Gget_objinfo(did, ".", 1, &statbuf) < 0) ERR;
|
||||
/* printf("statbuf.fileno = %d statbuf.objno = %d\n",
|
||||
/* printf("statbuf.fileno = %d statbuf.objno = %d\n",
|
||||
statbuf.fileno, statbuf.objno);*/
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ rec_scan_group(hid_t grpid)
|
||||
int num_scales;
|
||||
hsize_t dims[MAX_DIMS], max_dims[MAX_DIMS];
|
||||
int ndims, d;
|
||||
|
||||
|
||||
/* Loop through datasets to find variables. */
|
||||
if (H5Gget_num_objs(grpid, &num_obj) < 0) ERR;
|
||||
for (i=0; i<num_obj; i++)
|
||||
@ -56,7 +56,7 @@ rec_scan_group(hid_t grpid)
|
||||
* the object. */
|
||||
if ((obj_class = H5Gget_objtype_by_idx(grpid, i)) < 0) ERR;
|
||||
if (H5Gget_objname_by_idx(grpid, i, obj_name, STR_LEN) < 0) ERR;
|
||||
/*printf("\nEncountered: HDF5 object obj_class %d obj_name %s\n",
|
||||
/*printf("\nEncountered: HDF5 object obj_class %d obj_name %s\n",
|
||||
obj_class, obj_name);*/
|
||||
|
||||
/* Deal with groups and datasets, ignore the rest. */
|
||||
@ -86,7 +86,7 @@ rec_scan_group(hid_t grpid)
|
||||
else
|
||||
{
|
||||
int visitor_data = 0;
|
||||
|
||||
|
||||
/* Here's how to get the number of scales attached
|
||||
* to the dataset's dimension 0. */
|
||||
if ((num_scales = H5DSget_num_scales(datasetid, 0)) < 0) ERR;
|
||||
@ -136,34 +136,34 @@ main()
|
||||
hsize_t dimscale_dims[1] = {DIM1_LEN};
|
||||
|
||||
/* Open file and create group. */
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gcreate(fileid, GRP_NAME, 0)) < 0) ERR;
|
||||
|
||||
|
||||
/* Create our dimension scale. Use the built-in NAME attribute
|
||||
* on the dimscale. */
|
||||
if ((dimscale_spaceid = H5Screate_simple(1, dimscale_dims,
|
||||
if ((dimscale_spaceid = H5Screate_simple(1, dimscale_dims,
|
||||
dimscale_dims)) < 0) ERR;
|
||||
if ((dimscaleid = H5Dcreate(grpid, DIMSCALE_NAME, H5T_NATIVE_INT,
|
||||
if ((dimscaleid = H5Dcreate(grpid, DIMSCALE_NAME, H5T_NATIVE_INT,
|
||||
dimscale_spaceid, H5P_DEFAULT)) < 0) ERR;
|
||||
if (H5DSset_scale(dimscaleid, NAME_ATTRIBUTE) < 0) ERR;
|
||||
|
||||
/* Create a 1D variable which uses the dimscale. Attach a label
|
||||
* to this scale. */
|
||||
if ((var1_spaceid = H5Screate_simple(1, dims, dims)) < 0) ERR;
|
||||
if ((var1_datasetid = H5Dcreate(grpid, VAR1_NAME, H5T_NATIVE_INT,
|
||||
if ((var1_datasetid = H5Dcreate(grpid, VAR1_NAME, H5T_NATIVE_INT,
|
||||
var1_spaceid, H5P_DEFAULT)) < 0) ERR;
|
||||
if (H5DSattach_scale(var1_datasetid, dimscaleid, 0) < 0) ERR;
|
||||
if (H5DSset_label(var1_datasetid, 0, FIFTIES_SONG) < 0) ERR;
|
||||
|
||||
/* Create a 1D variabls that doesn't use the dimension scale. */
|
||||
if ((var2_datasetid = H5Dcreate(grpid, VAR2_NAME, H5T_NATIVE_INT,
|
||||
if ((var2_datasetid = H5Dcreate(grpid, VAR2_NAME, H5T_NATIVE_INT,
|
||||
var1_spaceid, H5P_DEFAULT)) < 0) ERR;
|
||||
|
||||
/* Create a 2D dataset which uses the scale for one of its
|
||||
* dimensions. */
|
||||
if ((var3_spaceid = H5Screate_simple(2, dims, dims)) < 0) ERR;
|
||||
if ((var3_datasetid = H5Dcreate(grpid, VAR3_NAME, H5T_NATIVE_INT,
|
||||
if ((var3_datasetid = H5Dcreate(grpid, VAR3_NAME, H5T_NATIVE_INT,
|
||||
var3_spaceid, H5P_DEFAULT)) < 0) ERR;
|
||||
if (H5DSattach_scale(var3_datasetid, dimscaleid, 0) < 0) ERR;
|
||||
|
||||
@ -199,7 +199,7 @@ main()
|
||||
/* Reopen the file and group. */
|
||||
if ((fileid = H5Fopen(FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gopen(fileid, GRP_NAME)) < 0) ERR;
|
||||
|
||||
|
||||
/* Loop through datasets to find variables. */
|
||||
if (H5Gget_num_objs(grpid, &num_obj) < 0) ERR;
|
||||
for (i=0; i<num_obj; i++)
|
||||
@ -224,7 +224,7 @@ main()
|
||||
{
|
||||
H5Dclose(datasetid);
|
||||
}
|
||||
|
||||
|
||||
if ((datasetid = H5Dopen(grpid, obj_name)) < 0) ERR;
|
||||
if ((is_scale = H5DSis_scale(datasetid)) < 0) ERR;
|
||||
if (is_scale && strcmp(obj_name, DIMSCALE_NAME)) ERR;
|
||||
@ -234,7 +234,7 @@ main()
|
||||
|
||||
/* A dimscale comes with a NAME attribute, in
|
||||
* addition to its real name. */
|
||||
if (H5DSget_scale_name(datasetid, nom_de_quincey,
|
||||
if (H5DSget_scale_name(datasetid, nom_de_quincey,
|
||||
STR_LEN) < 0) ERR;
|
||||
if (strcmp(nom_de_quincey, NAME_ATTRIBUTE)) ERR;
|
||||
|
||||
@ -254,7 +254,7 @@ main()
|
||||
if (strcmp(obj_name, VAR1_NAME) == 0 && num_scales != 1) ERR;
|
||||
if (strcmp(obj_name, VAR2_NAME) == 0 && num_scales > 0) ERR;
|
||||
if (strcmp(obj_name, VAR3_NAME) == 0 && num_scales != 1) ERR;
|
||||
|
||||
|
||||
/* There's also a label for dimension 0 of var1. */
|
||||
if (strcmp(obj_name, VAR1_NAME) == 0)
|
||||
{
|
||||
@ -292,15 +292,15 @@ main()
|
||||
int v;
|
||||
|
||||
/* Open file and create group. */
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gcreate(fileid, GRP_NAME, 0)) < 0) ERR;
|
||||
|
||||
|
||||
/* Create our dimension scale. Use the built-in NAME attribute
|
||||
* on the dimscale. */
|
||||
if ((dimscale_spaceid = H5Screate_simple(1, dimscale_dims,
|
||||
if ((dimscale_spaceid = H5Screate_simple(1, dimscale_dims,
|
||||
dimscale_dims)) < 0) ERR;
|
||||
if ((dimscaleid = H5Dcreate(grpid, DIMSCALE_NAME, H5T_NATIVE_INT,
|
||||
if ((dimscaleid = H5Dcreate(grpid, DIMSCALE_NAME, H5T_NATIVE_INT,
|
||||
dimscale_spaceid, H5P_DEFAULT)) < 0) ERR;
|
||||
if (H5DSset_scale(dimscaleid, NAME_ATTRIBUTE) < 0) ERR;
|
||||
|
||||
@ -309,7 +309,7 @@ main()
|
||||
for (v = 0; v < NUM_DATASETS; v++)
|
||||
{
|
||||
sprintf(var_name, "var_%d", v);
|
||||
if ((var1_datasetid[v] = H5Dcreate(grpid, var_name, H5T_NATIVE_INT,
|
||||
if ((var1_datasetid[v] = H5Dcreate(grpid, var_name, H5T_NATIVE_INT,
|
||||
var1_spaceid, H5P_DEFAULT)) < 0) ERR;
|
||||
if (H5DSattach_scale(var1_datasetid[v], dimscaleid, 0) < 0) ERR;
|
||||
}
|
||||
@ -332,7 +332,7 @@ main()
|
||||
hsize_t dims[1] = {1}, maxdims[1] = {H5S_UNLIMITED};
|
||||
|
||||
/* Create file and group. */
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gcreate(fileid, GRP_NAME, 0)) < 0) ERR;
|
||||
|
||||
@ -343,12 +343,12 @@ main()
|
||||
if (H5Pset_chunk(cparmsid, 1, dims) < 0) ERR;
|
||||
|
||||
/* Create our dimension scale, as an unlimited dataset. */
|
||||
if ((dimscaleid = H5Dcreate(grpid, DIMSCALE_NAME, H5T_NATIVE_INT,
|
||||
if ((dimscaleid = H5Dcreate(grpid, DIMSCALE_NAME, H5T_NATIVE_INT,
|
||||
spaceid, cparmsid)) < 0) ERR;
|
||||
if (H5DSset_scale(dimscaleid, NAME_ATTRIBUTE) < 0) ERR;
|
||||
|
||||
/* Create a variable which uses it. */
|
||||
if ((datasetid = H5Dcreate(grpid, VAR1_NAME, H5T_NATIVE_INT,
|
||||
if ((datasetid = H5Dcreate(grpid, VAR1_NAME, H5T_NATIVE_INT,
|
||||
spaceid, cparmsid)) < 0) ERR;
|
||||
if (H5DSattach_scale(datasetid, dimscaleid, 0) < 0) ERR;
|
||||
if (H5DSset_label(datasetid, 0, "dimension label") < 0) ERR;
|
||||
@ -367,7 +367,7 @@ main()
|
||||
|
||||
{
|
||||
hid_t fileid, grpid, spaceid = 0, datasetid = 0;
|
||||
hsize_t num_obj, i;
|
||||
hsize_t volatile num_obj, i;
|
||||
int obj_class;
|
||||
char obj_name[STR_LEN + 1];
|
||||
htri_t is_scale;
|
||||
@ -377,7 +377,7 @@ main()
|
||||
/* Reopen the file and group. */
|
||||
if ((fileid = H5Fopen(FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gopen(fileid, GRP_NAME)) < 0) ERR;
|
||||
|
||||
|
||||
/* Loop through datasets to find variables. */
|
||||
if (H5Gget_num_objs(grpid, &num_obj) < 0) ERR;
|
||||
for (i=0; i<num_obj; i++)
|
||||
@ -401,7 +401,7 @@ main()
|
||||
H5Dclose(datasetid);
|
||||
datasetid = 0;
|
||||
}
|
||||
|
||||
|
||||
/* Open the dataset. */
|
||||
if ((datasetid = H5Dopen(grpid, obj_name)) < 0) ERR;
|
||||
|
||||
@ -434,9 +434,9 @@ main()
|
||||
if (num_scales != 1) ERR;
|
||||
|
||||
/* Go through all dimscales for this var and learn about them. */
|
||||
if (H5DSiterate_scales(datasetid, 0, NULL, alien_visitor,
|
||||
if (H5DSiterate_scales(datasetid, 0, NULL, alien_visitor,
|
||||
&visitor_data) < 0) ERR;
|
||||
|
||||
|
||||
/* There's also a label for dimension 0. */
|
||||
if (H5DSget_label(datasetid, 0, label, STR_LEN) < 0) ERR;
|
||||
|
||||
@ -464,7 +464,7 @@ main()
|
||||
|
||||
{
|
||||
#define NDIMS 3
|
||||
#define TIME_DIM 0
|
||||
#define TIME_DIM 0
|
||||
#define LAT_DIM 1
|
||||
#define LON_DIM 2
|
||||
#define LAT_LEN 2
|
||||
@ -569,7 +569,7 @@ main()
|
||||
/* Reopen the file and group. */
|
||||
if ((fileid = H5Fopen(FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gopen(fileid, GRP_NAME)) < 0) ERR;
|
||||
|
||||
|
||||
/* Loop through datasets to find variables. */
|
||||
if (H5Gget_num_objs(grpid, &num_obj) < 0) ERR;
|
||||
for (i=0; i<num_obj; i++)
|
||||
@ -602,15 +602,15 @@ main()
|
||||
|
||||
/* A dimscale comes with a NAME attribute, in
|
||||
* addition to its real name. */
|
||||
if (H5DSget_scale_name(datasetid, nom_de_quincey,
|
||||
if (H5DSget_scale_name(datasetid, nom_de_quincey,
|
||||
STR_LEN) < 0) ERR;
|
||||
/*printf("found scale %s, NAME %s id 0x%x\n", obj_name,
|
||||
/*printf("found scale %s, NAME %s id 0x%x\n", obj_name,
|
||||
nom_de_quincey, datasetid);*/
|
||||
|
||||
/* Check size depending on name. */
|
||||
if ((!strcmp(obj_name, LAT_NAME) && dims[TIME_DIM] != LAT_LEN) ||
|
||||
(!strcmp(obj_name, LON_NAME) && dims[TIME_DIM] != LON_LEN) ||
|
||||
(!strcmp(obj_name, TIME_NAME) &&
|
||||
(!strcmp(obj_name, TIME_NAME) &&
|
||||
max_dims[TIME_DIM] != H5S_UNLIMITED)) ERR;
|
||||
|
||||
}
|
||||
@ -618,9 +618,9 @@ main()
|
||||
{
|
||||
char label[STR_LEN+1];
|
||||
int visitor_data = 0;
|
||||
|
||||
|
||||
/* SHould have these dimensions... */
|
||||
if (dims[TIME_DIM] != 0 || dims[LAT_DIM] != LAT_LEN ||
|
||||
if (dims[TIME_DIM] != 0 || dims[LAT_DIM] != LAT_LEN ||
|
||||
dims[LON_DIM] != LON_LEN) ERR;
|
||||
if (max_dims[TIME_DIM] != H5S_UNLIMITED) ERR;
|
||||
|
||||
@ -636,7 +636,7 @@ main()
|
||||
if (H5DSiterate_scales(datasetid, d, NULL, alien_visitor,
|
||||
&visitor_data) < 0) ERR;
|
||||
/*printf("visitor_data: 0x%x\n", visitor_data);*/
|
||||
|
||||
|
||||
/* There's also a label for each dimension. */
|
||||
if (H5DSget_label(datasetid, 0, label, STR_LEN) < 0) ERR;
|
||||
if (strcmp(label, TIME_NAME)) ERR;
|
||||
@ -673,7 +673,7 @@ main()
|
||||
#define SMELLINESS_NAME "Smelliness"
|
||||
#define DISTANCE_NAME "Distance"
|
||||
#define TIME_NAME "Time"
|
||||
#define TIME_DIM 0
|
||||
#define TIME_DIM 0
|
||||
#define SMELLINESS_DIM 1
|
||||
#define DISTANCE_DIM 2
|
||||
#define GOAT_NAME "Billy_goat_gruff"
|
||||
@ -773,7 +773,7 @@ main()
|
||||
/* If we can't scan the group, crash into a flaming heap of
|
||||
* smoking, smoldering rubbish. */
|
||||
if (rec_scan_group(grpid)) ERR;
|
||||
|
||||
|
||||
/* Close up the shop. */
|
||||
if (H5Gclose(grpid) < 0 ||
|
||||
H5Fclose(fileid) < 0) ERR;
|
||||
@ -783,4 +783,3 @@ main()
|
||||
#endif
|
||||
FINAL_RESULTS;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
*/
|
||||
#include "h5_err_macros.h"
|
||||
#include <hdf5.h>
|
||||
#include "config.h"
|
||||
|
||||
#define FILE_NAME "tst_h_enums.h5"
|
||||
#define DIM1_LEN 12
|
||||
@ -49,11 +50,11 @@ main()
|
||||
short data_in[DIM1_LEN];
|
||||
int i;
|
||||
short val[NUM_VALS];
|
||||
char love_how[NUM_VALS][STR_LEN + 1] = {"Depth", "Bredth",
|
||||
"Height", "Level",
|
||||
"Freely", "Purely",
|
||||
"Passionately", "Lost",
|
||||
"Breath", "Smiles",
|
||||
char love_how[NUM_VALS][STR_LEN + 1] = {"Depth", "Breadth",
|
||||
"Height", "Level",
|
||||
"Freely", "Purely",
|
||||
"Passionately", "Lost",
|
||||
"Breath", "Smiles",
|
||||
"Tears", "After Death"};
|
||||
/* H5T_class_t type_class;*/
|
||||
size_t size;
|
||||
@ -62,18 +63,18 @@ main()
|
||||
char *member_name;
|
||||
htri_t types_equal;
|
||||
hid_t base_hdf_typeid;
|
||||
|
||||
|
||||
|
||||
|
||||
for (i=0; i < NUM_VALS; i++)
|
||||
val[i] = i*2;
|
||||
for (i=0; i < DIM1_LEN; i++)
|
||||
data[i] = i*2;
|
||||
|
||||
|
||||
/* Open file. */
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gcreate(fileid, GRP_NAME, 0)) < 0) ERR;
|
||||
|
||||
|
||||
/* Create enum type. */
|
||||
/* Both methods do the same thing, but Quincey says to prefer
|
||||
* H5Tcreate_enum. */
|
||||
@ -83,7 +84,7 @@ main()
|
||||
/* Insert some values. */
|
||||
for (i=0; i<NUM_VALS; i++)
|
||||
if (H5Tenum_insert(typeid, love_how[i], &val[i]) < 0) ERR;
|
||||
|
||||
|
||||
/* Write an attribute of this type. */
|
||||
if ((spaceid = H5Screate_simple(1, dims, NULL)) < 0) ERR;
|
||||
if ((attid = H5Acreate(grpid, ATT_NAME, typeid, spaceid,
|
||||
@ -94,10 +95,10 @@ main()
|
||||
if (H5Aclose(attid) < 0 ||
|
||||
H5Tclose(typeid) < 0 ||
|
||||
H5Gclose(grpid) < 0 ||
|
||||
H5Fclose(fileid) < 0) ERR;
|
||||
H5Fclose(fileid) < 0) ERR;
|
||||
|
||||
/* Reopen the file. */
|
||||
if ((fileid = H5Fopen(FILE_NAME, H5F_ACC_RDWR,
|
||||
if ((fileid = H5Fopen(FILE_NAME, H5F_ACC_RDWR,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gopen(fileid, GRP_NAME)) < 0) ERR;
|
||||
|
||||
@ -112,7 +113,7 @@ main()
|
||||
if ((base_hdf_typeid = H5Tget_super(typeid)) < 0) ERR;
|
||||
if ((types_equal = H5Tequal(base_hdf_typeid, H5T_NATIVE_SHORT)) < 0) ERR;
|
||||
if (!types_equal) ERR;
|
||||
|
||||
|
||||
/* Check each value and number in the enum. */
|
||||
for (i=0; i < NUM_VALS; i++)
|
||||
{
|
||||
@ -120,7 +121,11 @@ main()
|
||||
if (the_value != val[i]) ERR;
|
||||
member_name = H5Tget_member_name(typeid, i);
|
||||
if (strcmp(member_name, love_how[i])) ERR;
|
||||
free(member_name);
|
||||
#ifdef HDF5_HAS_H5FREE
|
||||
H5free_memory(member_name);
|
||||
#else
|
||||
free(member_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Now read the data in the attribute and make sure it's what we
|
||||
@ -133,13 +138,13 @@ main()
|
||||
if (H5Aclose(attid) < 0 ||
|
||||
H5Tclose(typeid) < 0 ||
|
||||
H5Gclose(grpid) < 0 ||
|
||||
H5Fclose(fileid) < 0) ERR;
|
||||
H5Fclose(fileid) < 0) ERR;
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
|
||||
printf("*** Checking HDF5 enum type missing values...");
|
||||
{
|
||||
#define NUM_LANG 4
|
||||
#define NUM_LANG 4
|
||||
#define VAR_LANG_NAME "Programming_Language"
|
||||
#define FV_NAME "_FillValue"
|
||||
#define GRP_NAME2 "NetCDF_Programming"
|
||||
@ -165,39 +170,39 @@ main()
|
||||
val[1] = Fortran;
|
||||
val[2] = CPP;
|
||||
val[3] = MISSING;
|
||||
|
||||
|
||||
/* Open file. */
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if ((grpid = H5Gcreate(fileid, GRP_NAME2, 0)) < 0) ERR;
|
||||
|
||||
|
||||
/* Create enum type. */
|
||||
if ((typeid = H5Tenum_create(H5T_NATIVE_SHORT)) < 0) ERR;
|
||||
|
||||
/* Insert some values. */
|
||||
for (i=0; i<NUM_LANG; i++)
|
||||
if (H5Tenum_insert(typeid, lang[i], &val[i]) < 0) ERR;
|
||||
|
||||
|
||||
/* Create a dataset of this enum type, with fill value. */
|
||||
if ((spaceid = H5Screate_simple(1, dims, NULL)) < 0) ERR;
|
||||
if ((plistid = H5Pcreate(H5P_DATASET_CREATE)) < 0) ERR;
|
||||
if (H5Pset_fill_value(plistid, typeid, &fill_value) < 0) ERR;
|
||||
if ((datasetid = H5Dcreate(grpid, VAR_LANG_NAME, typeid,
|
||||
if ((datasetid = H5Dcreate(grpid, VAR_LANG_NAME, typeid,
|
||||
spaceid, plistid)) < 0) ERR;
|
||||
|
||||
/* Create a netCDFstyle _FillValue attribute, though it will be
|
||||
* ignored by HDF5. */
|
||||
if ((att_spaceid = H5Screate(H5S_SCALAR)) < 0) ERR;
|
||||
if ((attid = H5Acreate(grpid, FV_NAME, typeid, att_spaceid,
|
||||
if ((attid = H5Acreate(grpid, FV_NAME, typeid, att_spaceid,
|
||||
H5P_DEFAULT)) < 0) ERR;
|
||||
if (H5Awrite(attid, typeid, &fill_value) < 0) ERR;
|
||||
|
||||
/* Write one value, the rest will end up set to MISSING. */
|
||||
if ((mem_spaceid = H5Screate(H5S_SCALAR)) < 0) ERR;
|
||||
if ((file_spaceid = H5Screate_simple(1, dims, NULL)) < 0) ERR;
|
||||
if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET,
|
||||
if (H5Sselect_hyperslab(file_spaceid, H5S_SELECT_SET,
|
||||
start, NULL, count, NULL) < 0) ERR;
|
||||
if (H5Dwrite(datasetid, typeid, mem_spaceid, file_spaceid,
|
||||
if (H5Dwrite(datasetid, typeid, mem_spaceid, file_spaceid,
|
||||
H5P_DEFAULT, &data_point) < 0) ERR;
|
||||
|
||||
/* Close everything. */
|
||||
@ -209,7 +214,7 @@ main()
|
||||
H5Pclose(plistid) < 0 ||
|
||||
H5Tclose(typeid) < 0 ||
|
||||
H5Gclose(grpid) < 0 ||
|
||||
H5Fclose(fileid) < 0) ERR;
|
||||
H5Fclose(fileid) < 0) ERR;
|
||||
|
||||
/* Reopen the file. */
|
||||
if ((fileid = H5Fopen(FILE_NAME, H5F_ACC_RDWR, H5P_DEFAULT)) < 0) ERR;
|
||||
@ -226,7 +231,7 @@ main()
|
||||
if ((base_hdf_typeid = H5Tget_super(typeid)) < 0) ERR;
|
||||
if ((types_equal = H5Tequal(base_hdf_typeid, H5T_NATIVE_SHORT)) < 0) ERR;
|
||||
if (!types_equal) ERR;
|
||||
|
||||
|
||||
/* Check each value and number in the enum. */
|
||||
for (i=0; i < NUM_LANG; i++)
|
||||
{
|
||||
@ -234,7 +239,11 @@ main()
|
||||
if (the_value != val[i]) ERR;
|
||||
member_name = H5Tget_member_name(typeid, i);
|
||||
if (strcmp(member_name, lang[i])) ERR;
|
||||
free(member_name);
|
||||
#ifdef HDF5_HAS_H5FREE
|
||||
H5free_memory(member_name);
|
||||
#else
|
||||
free(member_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Now read the data in the dataset and make sure it's what we
|
||||
@ -260,12 +269,12 @@ main()
|
||||
/* #define GRP_NAME3 "STOP!" */
|
||||
|
||||
/* hid_t fileid, grpid, typeid; */
|
||||
|
||||
|
||||
/* /\* Open file. *\/ */
|
||||
/* if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, */
|
||||
/* H5P_DEFAULT)) < 0) ERR; */
|
||||
/* if ((grpid = H5Gcreate(fileid, GRP_NAME3, 0)) < 0) ERR; */
|
||||
|
||||
|
||||
/* /\* Create enum type. *\/ */
|
||||
/* if ((typeid = H5Tenum_create(H5T_NATIVE_SHORT)) < 0) ERR; */
|
||||
|
||||
|
@ -66,6 +66,9 @@ typedef enum {VAR, DIM, ATT} NC_OBJ_T;
|
||||
#define X_LONG_MIN X_INT_MIN
|
||||
#define X_LONG_MAX X_INT_MAX
|
||||
#define X_UINT_MAX 4294967295U
|
||||
#define X_INT64_MIN (-9223372036854775807LL-1LL)
|
||||
#define X_INT64_MAX 9223372036854775807LL
|
||||
#define X_UINT64_MAX 18446744073709551615ULL
|
||||
#ifdef WIN32 /* Windows, of course, has to be a *little* different. */
|
||||
#define X_FLOAT_MAX 3.402823466e+38f
|
||||
#else
|
||||
|
@ -4,6 +4,9 @@
|
||||
* $Id: nctime.h,v 1.6 2010/03/18 19:24:26 russ Exp $
|
||||
*********************************************************************/
|
||||
|
||||
#ifndef _NCTIME_H
|
||||
#define _NCTIME_H
|
||||
|
||||
struct bounds_node{
|
||||
int ncid; /* group (or file) in which variable with associated
|
||||
* bounds variable resides */
|
||||
@ -14,7 +17,7 @@ struct bounds_node{
|
||||
|
||||
typedef struct bounds_node bounds_node_t;
|
||||
|
||||
/*
|
||||
/*
|
||||
* This code was extracted with permission from the CDMS time
|
||||
* conversion and arithmetic routines developed by Bob Drach, Lawrence
|
||||
* Livermore National Laboratory as part of the cdtime library.
|
||||
@ -158,4 +161,4 @@ extern int cdParseRelunits(cdCalenType timetype, char* relunits, cdUnitTime* uni
|
||||
#endif /* DLL Considerations. */
|
||||
|
||||
|
||||
|
||||
#endif /* ifdef */
|
||||
|
@ -101,9 +101,6 @@ extern "C" {
|
||||
#define NC_MAX_INT64 (9223372036854775807LL)
|
||||
#define NC_MIN_INT64 (-9223372036854775807LL-1)
|
||||
#define NC_MAX_UINT64 (18446744073709551615ULL)
|
||||
#define X_INT64_MAX (9223372036854775807LL)
|
||||
#define X_INT64_MIN (-X_INT64_MAX - 1)
|
||||
#define X_UINT64_MAX (18446744073709551615ULL)
|
||||
/**@}*/
|
||||
|
||||
/** Name of fill value attribute. If you wish a variable to use a
|
||||
|
@ -47,7 +47,7 @@ EXTRA_DIST = attr.m4 ncx.m4 putget.m4 $(man_MANS) CMakeLists.txt XGetopt.c
|
||||
|
||||
# This tells make how to turn .m4 files into .c files.
|
||||
.m4.c:
|
||||
m4 $(AM_M4FLAGS) $(M4FLAGS) -s $< > $@
|
||||
m4 $(AM_M4FLAGS) $(M4FLAGS) -s $< > $(top_srcdir)/libsrc/$@
|
||||
|
||||
# The C API man page.
|
||||
man_MANS = netcdf.3
|
||||
|
@ -92,9 +92,9 @@
|
||||
#define X_INT_MIN (-2147483647-1)
|
||||
#define X_INT_MAX 2147483647
|
||||
#define X_UINT_MAX 4294967295U
|
||||
#define X_LONGLONG_MIN (-9223372036854775807LL-1LL)
|
||||
#define X_LONGLONG_MAX 9223372036854775807LL
|
||||
#define X_ULONGLONG_MAX 18446744073709551615ULL
|
||||
#define X_INT64_MIN (-9223372036854775807LL-1LL)
|
||||
#define X_INT64_MAX 9223372036854775807LL
|
||||
#define X_UINT64_MAX 18446744073709551615ULL
|
||||
#define X_FLOAT_MAX 3.402823466e+38f
|
||||
#define X_FLOAT_MIN (-X_FLOAT_MAX)
|
||||
#define X_FLT_MAX X_FLOAT_MAX /* alias compatible with limits.h */
|
||||
|
@ -118,16 +118,16 @@ static int ncio_spx_close(ncio *nciop, int doUnlink);
|
||||
* @par fd File Descriptor.
|
||||
* @return -1 on error, length of file (in bytes) otherwise.
|
||||
*/
|
||||
static size_t nc_get_filelen(const int fd) {
|
||||
static off_t nc_get_filelen(const int fd) {
|
||||
|
||||
size_t flen;
|
||||
off_t flen;
|
||||
|
||||
#ifdef HAVE_FILE_LENGTH_I64
|
||||
__int64 file_len = 0;
|
||||
if ((file_len = _filelengthi64(fd)) < 0) {
|
||||
return file_len;
|
||||
}
|
||||
flen = (size_t)file_len;
|
||||
flen = (off_t)file_len;
|
||||
|
||||
#else
|
||||
int res = 0;
|
||||
@ -243,7 +243,7 @@ fgrow2(const int fd, const off_t len)
|
||||
*/
|
||||
|
||||
|
||||
size_t file_len = nc_get_filelen(fd);
|
||||
off_t file_len = nc_get_filelen(fd);
|
||||
if(file_len < 0) return errno;
|
||||
if(len <= file_len)
|
||||
return NC_NOERR;
|
||||
|
@ -170,11 +170,9 @@ NC4_put_propattr(NC_HDF5_FILE_INFO_T* h5)
|
||||
herr = 0;
|
||||
}
|
||||
done:
|
||||
if(ncstat != NC_NOERR) {
|
||||
if(text != NULL) {
|
||||
free(text);
|
||||
text = NULL;
|
||||
}
|
||||
if(text != NULL) {
|
||||
free(text);
|
||||
text = NULL;
|
||||
}
|
||||
|
||||
if(attid >= 0) HCHECK((H5Aclose(attid)));
|
||||
|
@ -96,12 +96,16 @@ fi
|
||||
|
||||
has_cxx="no"
|
||||
has_cxx4="no"
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
|
||||
ncxxconf=$(which ncxx-config 2>/dev/null)
|
||||
ncxx4conf=$(which ncxx4-config 2>/dev/null)
|
||||
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
cxx4=`ncxx4-config --cxx`
|
||||
cxx4flags=`ncxx4-config --cflags`
|
||||
cxx4libs=`ncxx4-config --libs`
|
||||
has_cxx4="yes"
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
elif [ -f "$ncxxconf" ]; then
|
||||
cxx=`ncxx-config --cxx`
|
||||
cxxflags=`ncxx-config --cflags`
|
||||
cxxlibs=`ncxx-config --libs`
|
||||
@ -139,13 +143,13 @@ Available values for OPTION include:
|
||||
--version Library version
|
||||
|
||||
EOF
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
cat <<EOF
|
||||
--cxx4 C++ compiler for netCDF-4 C++ library
|
||||
--cxx4flags flags needed to compile a C++ program
|
||||
--cxx4libs libraries needed to link a C++ program
|
||||
EOF
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
elif [ -f "$ncxxconf" ]; then
|
||||
cat <<EOF
|
||||
--cxx C++ compiler
|
||||
--cxxflags flags needed to compile a C++ program
|
||||
@ -176,14 +180,14 @@ all()
|
||||
echo " --has-c++ -> $has_cxx"
|
||||
echo " --cxx -> $cxx"
|
||||
|
||||
if type -p ncxx-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxxconf" ]; then
|
||||
echo " --cxxflags -> $cxxflags"
|
||||
echo " --cxxlibs -> $cxxlibs"
|
||||
fi
|
||||
echo
|
||||
echo " --has-c++4 -> $has_cxx4"
|
||||
echo " --cxx4 -> $cxx4"
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
echo " --cxx4flags -> $cxx4flags"
|
||||
echo " --cxx4libs -> $cxx4libs"
|
||||
fi
|
||||
|
16
nc-config.in
16
nc-config.in
@ -40,12 +40,16 @@ fi
|
||||
|
||||
has_cxx="no"
|
||||
has_cxx4="no"
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
|
||||
ncxxconf=$(which ncxx-config 2>/dev/null)
|
||||
ncxx4conf=$(which ncxx4-config 2>/dev/null)
|
||||
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
cxx4=`ncxx4-config --cxx`
|
||||
cxx4flags=`ncxx4-config --cflags`
|
||||
cxx4libs=`ncxx4-config --libs`
|
||||
has_cxx4="yes"
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
elif [ -f "$ncxxconf" ]; then
|
||||
cxx=`ncxx-config --cxx`
|
||||
cxxflags=`ncxx-config --cflags`
|
||||
cxxlibs=`ncxx-config --libs`
|
||||
@ -82,13 +86,13 @@ Available values for OPTION include:
|
||||
--version Library version
|
||||
|
||||
EOF
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
cat <<EOF
|
||||
--cxx4 C++ compiler for netCDF-4 C++ library
|
||||
--cxx4flags flags needed to compile a C++ program
|
||||
--cxx4libs libraries needed to link a C++ program
|
||||
EOF
|
||||
elif type -p ncxx-config > /dev/null 2>&1; then
|
||||
elif [ -f "$ncxxconf" ]; then
|
||||
cat <<EOF
|
||||
--cxx C++ compiler
|
||||
--cxxflags flags needed to compile a C++ program
|
||||
@ -119,14 +123,14 @@ all()
|
||||
echo " --has-c++ -> $has_cxx"
|
||||
echo " --cxx -> $cxx"
|
||||
|
||||
if type -p ncxx-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxxconf" ]; then
|
||||
echo " --cxxflags -> $cxxflags"
|
||||
echo " --cxxlibs -> $cxxlibs"
|
||||
fi
|
||||
echo
|
||||
echo " --has-c++4 -> $has_cxx4"
|
||||
echo " --cxx4 -> $cxx4"
|
||||
if type -p ncxx4-config > /dev/null 2>&1; then
|
||||
if [ -f "$ncxx4conf" ]; then
|
||||
echo " --cxx4flags -> $cxx4flags"
|
||||
echo " --cxx4libs -> $cxx4libs"
|
||||
fi
|
||||
|
@ -269,7 +269,7 @@ trim(const char* s)
|
||||
int i;
|
||||
size_t l = strlen(s);
|
||||
char* t = strdup(s);
|
||||
for(i=l-1;l >= 0; i--) {
|
||||
for(i=l-1;i >= 0; i--) {
|
||||
if(t[i] != ' ') break;
|
||||
}
|
||||
t[i+1] = '\0';
|
||||
|
Binary file not shown.
@ -33,6 +33,7 @@
|
||||
|
||||
#include "list.h"
|
||||
#include "bytebuffer.h"
|
||||
#include "nctime.h"
|
||||
|
||||
/* Local Configuration flags*/
|
||||
#define ENABLE_BINARY
|
||||
|
177
ncgen/ncgenl.c
177
ncgen/ncgenl.c
@ -1,5 +1,5 @@
|
||||
|
||||
#line 3 "lex.ncg.c"
|
||||
#line 3 "ncgenl.c"
|
||||
|
||||
#define YY_INT_ALIGNED short int
|
||||
|
||||
@ -26,8 +26,8 @@
|
||||
|
||||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 5
|
||||
#define YY_FLEX_SUBMINOR_VERSION 35
|
||||
#define YY_FLEX_MINOR_VERSION 6
|
||||
#define YY_FLEX_SUBMINOR_VERSION 0
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
@ -65,7 +65,6 @@ typedef int16_t flex_int16_t;
|
||||
typedef uint16_t flex_uint16_t;
|
||||
typedef int32_t flex_int32_t;
|
||||
typedef uint32_t flex_uint32_t;
|
||||
typedef uint64_t flex_uint64_t;
|
||||
#else
|
||||
typedef signed char flex_int8_t;
|
||||
typedef short int flex_int16_t;
|
||||
@ -73,7 +72,6 @@ typedef int flex_int32_t;
|
||||
typedef unsigned char flex_uint8_t;
|
||||
typedef unsigned short int flex_uint16_t;
|
||||
typedef unsigned int flex_uint32_t;
|
||||
#endif /* ! C99 */
|
||||
|
||||
/* Limits of integral types. */
|
||||
#ifndef INT8_MIN
|
||||
@ -104,6 +102,8 @@ typedef unsigned int flex_uint32_t;
|
||||
#define UINT32_MAX (4294967295U)
|
||||
#endif
|
||||
|
||||
#endif /* ! C99 */
|
||||
|
||||
#endif /* ! FLEXINT_H */
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -160,7 +160,15 @@ typedef unsigned int flex_uint32_t;
|
||||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k.
|
||||
* Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
|
||||
* Ditto for the __ia64__ case accordingly.
|
||||
*/
|
||||
#define YY_BUF_SIZE 32768
|
||||
#else
|
||||
#define YY_BUF_SIZE 16384
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
@ -186,6 +194,7 @@ extern FILE *ncgin, *ncgout;
|
||||
#define EOB_ACT_LAST_MATCH 2
|
||||
|
||||
#define YY_LESS_LINENO(n)
|
||||
#define YY_LINENO_REWIND_TO(ptr)
|
||||
|
||||
/* Return all but the first "n" matched characters back to the input stream. */
|
||||
#define yyless(n) \
|
||||
@ -220,7 +229,7 @@ struct yy_buffer_state
|
||||
/* Number of characters read into yy_ch_buf, not including EOB
|
||||
* characters.
|
||||
*/
|
||||
yy_size_t yy_n_chars;
|
||||
int yy_n_chars;
|
||||
|
||||
/* Whether we "own" the buffer - i.e., we know we created it,
|
||||
* and can realloc() it to grow it, and should free() it to
|
||||
@ -290,7 +299,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */
|
||||
|
||||
/* yy_hold_char holds the character lost when ncgtext is formed. */
|
||||
static char yy_hold_char;
|
||||
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
|
||||
static int yy_n_chars; /* number of characters read into yy_ch_buf */
|
||||
yy_size_t ncgleng;
|
||||
|
||||
/* Points to current character in buffer. */
|
||||
@ -362,11 +371,17 @@ extern int ncglineno;
|
||||
int ncglineno = 1;
|
||||
|
||||
extern char *ncgtext;
|
||||
#ifdef yytext_ptr
|
||||
#undef yytext_ptr
|
||||
#endif
|
||||
#define yytext_ptr ncgtext
|
||||
|
||||
static yy_state_type yy_get_previous_state (void );
|
||||
static yy_state_type yy_try_NUL_trans (yy_state_type current_state );
|
||||
static int yy_get_next_buffer (void );
|
||||
#if defined(__GNUC__) && __GNUC__ >= 3
|
||||
__attribute__((__noreturn__))
|
||||
#endif
|
||||
static void yy_fatal_error (yyconst char msg[] );
|
||||
|
||||
/* Done after the current pattern has been matched and before the
|
||||
@ -374,7 +389,7 @@ static void yy_fatal_error (yyconst char msg[] );
|
||||
*/
|
||||
#define YY_DO_BEFORE_ACTION \
|
||||
(yytext_ptr) = yy_bp; \
|
||||
ncgleng = (yy_size_t) (yy_cp - yy_bp); \
|
||||
ncgleng = (size_t) (yy_cp - yy_bp); \
|
||||
(yy_hold_char) = *yy_cp; \
|
||||
*yy_cp = '\0'; \
|
||||
(yy_c_buf_p) = yy_cp;
|
||||
@ -438,7 +453,7 @@ static yyconst flex_int16_t yy_accept[417] =
|
||||
34, 34, 34, 34, 34, 0
|
||||
} ;
|
||||
|
||||
static yyconst flex_int32_t yy_ec[256] =
|
||||
static yyconst YY_CHAR yy_ec[256] =
|
||||
{ 0,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
|
||||
1, 2, 2, 1, 1, 1, 1, 1, 1, 1,
|
||||
@ -470,7 +485,7 @@ static yyconst flex_int32_t yy_ec[256] =
|
||||
1, 1, 1, 1, 1
|
||||
} ;
|
||||
|
||||
static yyconst flex_int32_t yy_meta[69] =
|
||||
static yyconst YY_CHAR yy_meta[69] =
|
||||
{ 0,
|
||||
1, 1, 2, 1, 1, 1, 3, 4, 5, 5,
|
||||
6, 7, 8, 8, 8, 8, 8, 8, 8, 1,
|
||||
@ -481,7 +496,7 @@ static yyconst flex_int32_t yy_meta[69] =
|
||||
11, 11, 11, 14, 1, 11, 11, 11
|
||||
} ;
|
||||
|
||||
static yyconst flex_int16_t yy_base[435] =
|
||||
static yyconst flex_uint16_t yy_base[435] =
|
||||
{ 0,
|
||||
0, 0, 325, 321, 264, 255, 318, 2347, 67, 2347,
|
||||
64, 269, 61, 62, 95, 77, 136, 259, 51, 61,
|
||||
@ -585,7 +600,7 @@ static yyconst flex_int16_t yy_def[435] =
|
||||
416, 416, 416, 416
|
||||
} ;
|
||||
|
||||
static yyconst flex_int16_t yy_nxt[2416] =
|
||||
static yyconst flex_uint16_t yy_nxt[2416] =
|
||||
{ 0,
|
||||
8, 9, 10, 9, 8, 11, 12, 8, 13, 14,
|
||||
15, 16, 17, 18, 18, 18, 18, 18, 18, 8,
|
||||
@ -1320,7 +1335,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 1324 "lex.ncg.c"
|
||||
#line 1339 "ncgenl.c"
|
||||
|
||||
#define INITIAL 0
|
||||
#define ST_C_COMMENT 1
|
||||
@ -1355,11 +1370,11 @@ void ncgset_extra (YY_EXTRA_TYPE user_defined );
|
||||
|
||||
FILE *ncgget_in (void );
|
||||
|
||||
void ncgset_in (FILE * in_str );
|
||||
void ncgset_in (FILE * _in_str );
|
||||
|
||||
FILE *ncgget_out (void );
|
||||
|
||||
void ncgset_out (FILE * out_str );
|
||||
void ncgset_out (FILE * _out_str );
|
||||
|
||||
yy_size_t ncgget_leng (void );
|
||||
|
||||
@ -1367,7 +1382,7 @@ char *ncgget_text (void );
|
||||
|
||||
int ncgget_lineno (void );
|
||||
|
||||
void ncgset_lineno (int line_number );
|
||||
void ncgset_lineno (int _line_number );
|
||||
|
||||
/* Macros after this point can all be overridden by user definitions in
|
||||
* section 1.
|
||||
@ -1381,8 +1396,12 @@ extern int ncgwrap (void );
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef YY_NO_UNPUT
|
||||
|
||||
static void yyunput (int c,char *buf_ptr );
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strncpy (char *,yyconst char *,int );
|
||||
#endif
|
||||
@ -1403,7 +1422,12 @@ static int input (void );
|
||||
|
||||
/* Amount of stuff to slurp up with each read. */
|
||||
#ifndef YY_READ_BUF_SIZE
|
||||
#ifdef __ia64__
|
||||
/* On IA-64, the buffer size is 16k, not 8k */
|
||||
#define YY_READ_BUF_SIZE 16384
|
||||
#else
|
||||
#define YY_READ_BUF_SIZE 8192
|
||||
#endif /* __ia64__ */
|
||||
#endif
|
||||
|
||||
/* Copy whatever the last rule matched to the standard output. */
|
||||
@ -1411,7 +1435,7 @@ static int input (void );
|
||||
/* This used to be an fputs(), but since the string might contain NUL's,
|
||||
* we now use fwrite().
|
||||
*/
|
||||
#define ECHO fwrite( ncgtext, ncgleng, 1, ncgout )
|
||||
#define ECHO do { if (fwrite( ncgtext, ncgleng, 1, ncgout )) {} } while (0)
|
||||
#endif
|
||||
|
||||
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
|
||||
@ -1422,7 +1446,7 @@ static int input (void );
|
||||
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
|
||||
{ \
|
||||
int c = '*'; \
|
||||
yy_size_t n; \
|
||||
size_t n; \
|
||||
for ( n = 0; n < max_size && \
|
||||
(c = getc( ncgin )) != EOF && c != '\n'; ++n ) \
|
||||
buf[n] = (char) c; \
|
||||
@ -1490,7 +1514,7 @@ extern int ncglex (void);
|
||||
|
||||
/* Code executed at the end of each rule. */
|
||||
#ifndef YY_BREAK
|
||||
#define YY_BREAK break;
|
||||
#define YY_BREAK /*LINTED*/break;
|
||||
#endif
|
||||
|
||||
#define YY_RULE_SETUP \
|
||||
@ -1500,14 +1524,10 @@ extern int ncglex (void);
|
||||
*/
|
||||
YY_DECL
|
||||
{
|
||||
register yy_state_type yy_current_state;
|
||||
register char *yy_cp, *yy_bp;
|
||||
register int yy_act;
|
||||
yy_state_type yy_current_state;
|
||||
char *yy_cp, *yy_bp;
|
||||
int yy_act;
|
||||
|
||||
#line 217 "ncgen.l"
|
||||
|
||||
#line 1510 "lex.ncg.c"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
(yy_init) = 1;
|
||||
@ -1534,7 +1554,12 @@ YY_DECL
|
||||
ncg_load_buffer_state( );
|
||||
}
|
||||
|
||||
while ( 1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
#line 217 "ncgen.l"
|
||||
|
||||
#line 1561 "ncgenl.c"
|
||||
|
||||
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
yy_cp = (yy_c_buf_p);
|
||||
|
||||
@ -1550,7 +1575,7 @@ YY_DECL
|
||||
yy_match:
|
||||
do
|
||||
{
|
||||
register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
|
||||
YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;
|
||||
if ( yy_accept[yy_current_state] )
|
||||
{
|
||||
(yy_last_accepting_state) = yy_current_state;
|
||||
@ -2119,7 +2144,7 @@ YY_RULE_SETUP
|
||||
#line 570 "ncgen.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 2123 "lex.ncg.c"
|
||||
#line 2148 "ncgenl.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(TEXT):
|
||||
yyterminate();
|
||||
@ -2251,6 +2276,7 @@ case YY_STATE_EOF(TEXT):
|
||||
"fatal flex scanner internal error--no action found" );
|
||||
} /* end of action switch */
|
||||
} /* end of scanning one token */
|
||||
} /* end of user's declarations */
|
||||
} /* end of ncglex */
|
||||
|
||||
/* yy_get_next_buffer - try to read in a new buffer
|
||||
@ -2262,9 +2288,9 @@ case YY_STATE_EOF(TEXT):
|
||||
*/
|
||||
static int yy_get_next_buffer (void)
|
||||
{
|
||||
register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
||||
register char *source = (yytext_ptr);
|
||||
register int number_to_move, i;
|
||||
char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
|
||||
char *source = (yytext_ptr);
|
||||
yy_size_t number_to_move, i;
|
||||
int ret_val;
|
||||
|
||||
if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
|
||||
@ -2293,7 +2319,7 @@ static int yy_get_next_buffer (void)
|
||||
/* Try to read more data. */
|
||||
|
||||
/* First move last chars to start of buffer. */
|
||||
number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1;
|
||||
number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1;
|
||||
|
||||
for ( i = 0; i < number_to_move; ++i )
|
||||
*(dest++) = *(source++);
|
||||
@ -2313,7 +2339,7 @@ static int yy_get_next_buffer (void)
|
||||
{ /* Not enough room in the buffer - grow it. */
|
||||
|
||||
/* just a shorter name for the current buffer */
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
|
||||
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
|
||||
|
||||
int yy_c_buf_p_offset =
|
||||
(int) ((yy_c_buf_p) - b->yy_ch_buf);
|
||||
@ -2375,9 +2401,9 @@ static int yy_get_next_buffer (void)
|
||||
else
|
||||
ret_val = EOB_ACT_CONTINUE_SCAN;
|
||||
|
||||
if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
||||
if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
||||
/* Extend the array by 50%, plus the number we really need. */
|
||||
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
||||
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ncgrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size );
|
||||
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
||||
@ -2396,14 +2422,14 @@ static int yy_get_next_buffer (void)
|
||||
|
||||
static yy_state_type yy_get_previous_state (void)
|
||||
{
|
||||
register yy_state_type yy_current_state;
|
||||
register char *yy_cp;
|
||||
yy_state_type yy_current_state;
|
||||
char *yy_cp;
|
||||
|
||||
yy_current_state = (yy_start);
|
||||
|
||||
for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
|
||||
{
|
||||
register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
||||
YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
|
||||
if ( yy_accept[yy_current_state] )
|
||||
{
|
||||
(yy_last_accepting_state) = yy_current_state;
|
||||
@ -2428,10 +2454,10 @@ static int yy_get_next_buffer (void)
|
||||
*/
|
||||
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )
|
||||
{
|
||||
register int yy_is_jam;
|
||||
register char *yy_cp = (yy_c_buf_p);
|
||||
int yy_is_jam;
|
||||
char *yy_cp = (yy_c_buf_p);
|
||||
|
||||
register YY_CHAR yy_c = 1;
|
||||
YY_CHAR yy_c = 1;
|
||||
if ( yy_accept[yy_current_state] )
|
||||
{
|
||||
(yy_last_accepting_state) = yy_current_state;
|
||||
@ -2446,12 +2472,14 @@ static int yy_get_next_buffer (void)
|
||||
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
|
||||
yy_is_jam = (yy_current_state == 416);
|
||||
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
return yy_is_jam ? 0 : yy_current_state;
|
||||
}
|
||||
|
||||
static void yyunput (int c, register char * yy_bp )
|
||||
#ifndef YY_NO_UNPUT
|
||||
|
||||
static void yyunput (int c, char * yy_bp )
|
||||
{
|
||||
register char *yy_cp;
|
||||
char *yy_cp;
|
||||
|
||||
yy_cp = (yy_c_buf_p);
|
||||
|
||||
@ -2461,10 +2489,10 @@ static int yy_get_next_buffer (void)
|
||||
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
|
||||
{ /* need to shift things up to make room */
|
||||
/* +2 for EOB chars. */
|
||||
register yy_size_t number_to_move = (yy_n_chars) + 2;
|
||||
register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
||||
yy_size_t number_to_move = (yy_n_chars) + 2;
|
||||
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
|
||||
register char *source =
|
||||
char *source =
|
||||
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
|
||||
|
||||
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
||||
@ -2486,6 +2514,8 @@ static int yy_get_next_buffer (void)
|
||||
(yy_c_buf_p) = yy_cp;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef YY_NO_INPUT
|
||||
#ifdef __cplusplus
|
||||
static int yyinput (void)
|
||||
@ -2534,7 +2564,7 @@ static int yy_get_next_buffer (void)
|
||||
case EOB_ACT_END_OF_FILE:
|
||||
{
|
||||
if ( ncgwrap( ) )
|
||||
return 0;
|
||||
return EOF;
|
||||
|
||||
if ( ! (yy_did_buffer_switch_on_eof) )
|
||||
YY_NEW_FILE;
|
||||
@ -2635,7 +2665,7 @@ static void ncg_load_buffer_state (void)
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in ncg_create_buffer()" );
|
||||
|
||||
b->yy_buf_size = size;
|
||||
b->yy_buf_size = (yy_size_t)size;
|
||||
|
||||
/* yy_ch_buf has to be 2 characters longer than the size given because
|
||||
* we need to put in 2 end-of-buffer characters.
|
||||
@ -2670,10 +2700,6 @@ static void ncg_load_buffer_state (void)
|
||||
ncgfree((void *) b );
|
||||
}
|
||||
|
||||
#ifndef __cplusplus
|
||||
extern int isatty (int );
|
||||
#endif /* __cplusplus */
|
||||
|
||||
/* Initializes or reinitializes a buffer.
|
||||
* This function is sometimes called more than once on the same buffer,
|
||||
* such as during a ncgrestart() or at EOF.
|
||||
@ -2794,7 +2820,7 @@ static void ncgensure_buffer_stack (void)
|
||||
* scanner will even need a stack. We use 2 instead of 1 to avoid an
|
||||
* immediate realloc on the next call.
|
||||
*/
|
||||
num_to_alloc = 1;
|
||||
num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
|
||||
(yy_buffer_stack) = (struct yy_buffer_state**)ncgalloc
|
||||
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
||||
);
|
||||
@ -2811,7 +2837,7 @@ static void ncgensure_buffer_stack (void)
|
||||
if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){
|
||||
|
||||
/* Increase the buffer to prepare for a possible push. */
|
||||
int grow_size = 8 /* arbitrary grow size */;
|
||||
yy_size_t grow_size = 8 /* arbitrary grow size */;
|
||||
|
||||
num_to_alloc = (yy_buffer_stack_max) + grow_size;
|
||||
(yy_buffer_stack) = (struct yy_buffer_state**)ncgrealloc
|
||||
@ -2878,8 +2904,8 @@ YY_BUFFER_STATE ncg_scan_string (yyconst char * yystr )
|
||||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to ncglex() will
|
||||
* scan from a @e copy of @a bytes.
|
||||
* @param bytes the byte buffer to scan
|
||||
* @param len the number of bytes in the buffer pointed to by @a bytes.
|
||||
* @param yybytes the byte buffer to scan
|
||||
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
|
||||
*
|
||||
* @return the newly allocated buffer state object.
|
||||
*/
|
||||
@ -2887,7 +2913,8 @@ YY_BUFFER_STATE ncg_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
|
||||
{
|
||||
YY_BUFFER_STATE b;
|
||||
char *buf;
|
||||
yy_size_t n, i;
|
||||
yy_size_t n;
|
||||
yy_size_t i;
|
||||
|
||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||
n = _yybytes_len + 2;
|
||||
@ -2918,7 +2945,7 @@ YY_BUFFER_STATE ncg_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len
|
||||
|
||||
static void yy_fatal_error (yyconst char* msg )
|
||||
{
|
||||
(void) fprintf( stderr, "%s\n", msg );
|
||||
(void) fprintf( stderr, "%s\n", msg );
|
||||
exit( YY_EXIT_FAILURE );
|
||||
}
|
||||
|
||||
@ -2984,29 +3011,29 @@ char *ncgget_text (void)
|
||||
}
|
||||
|
||||
/** Set the current line number.
|
||||
* @param line_number
|
||||
* @param _line_number line number
|
||||
*
|
||||
*/
|
||||
void ncgset_lineno (int line_number )
|
||||
void ncgset_lineno (int _line_number )
|
||||
{
|
||||
|
||||
ncglineno = line_number;
|
||||
ncglineno = _line_number;
|
||||
}
|
||||
|
||||
/** Set the input stream. This does not discard the current
|
||||
* input buffer.
|
||||
* @param in_str A readable stream.
|
||||
* @param _in_str A readable stream.
|
||||
*
|
||||
* @see ncg_switch_to_buffer
|
||||
*/
|
||||
void ncgset_in (FILE * in_str )
|
||||
void ncgset_in (FILE * _in_str )
|
||||
{
|
||||
ncgin = in_str ;
|
||||
ncgin = _in_str ;
|
||||
}
|
||||
|
||||
void ncgset_out (FILE * out_str )
|
||||
void ncgset_out (FILE * _out_str )
|
||||
{
|
||||
ncgout = out_str ;
|
||||
ncgout = _out_str ;
|
||||
}
|
||||
|
||||
int ncgget_debug (void)
|
||||
@ -3014,9 +3041,9 @@ int ncgget_debug (void)
|
||||
return ncg_flex_debug;
|
||||
}
|
||||
|
||||
void ncgset_debug (int bdebug )
|
||||
void ncgset_debug (int _bdebug )
|
||||
{
|
||||
ncg_flex_debug = bdebug ;
|
||||
ncg_flex_debug = _bdebug ;
|
||||
}
|
||||
|
||||
static int yy_init_globals (void)
|
||||
@ -3076,7 +3103,8 @@ int ncglex_destroy (void)
|
||||
#ifndef yytext_ptr
|
||||
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
|
||||
{
|
||||
register int i;
|
||||
|
||||
int i;
|
||||
for ( i = 0; i < n; ++i )
|
||||
s1[i] = s2[i];
|
||||
}
|
||||
@ -3085,7 +3113,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
|
||||
#ifdef YY_NEED_STRLEN
|
||||
static int yy_flex_strlen (yyconst char * s )
|
||||
{
|
||||
register int n;
|
||||
int n;
|
||||
for ( n = 0; s[n]; ++n )
|
||||
;
|
||||
|
||||
@ -3095,11 +3123,12 @@ static int yy_flex_strlen (yyconst char * s )
|
||||
|
||||
void *ncgalloc (yy_size_t size )
|
||||
{
|
||||
return (void *) malloc( size );
|
||||
return (void *) malloc( size );
|
||||
}
|
||||
|
||||
void *ncgrealloc (void * ptr, yy_size_t size )
|
||||
{
|
||||
|
||||
/* The cast to (char *) in the following accommodates both
|
||||
* implementations that use char* generic pointers, and those
|
||||
* that use void* generic pointers. It works with the latter
|
||||
@ -3112,7 +3141,7 @@ void *ncgrealloc (void * ptr, yy_size_t size )
|
||||
|
||||
void ncgfree (void * ptr )
|
||||
{
|
||||
free( (char *) ptr ); /* see ncgrealloc() for (char *) cast */
|
||||
free( (char *) ptr ); /* see ncgrealloc() for (char *) cast */
|
||||
}
|
||||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
2490
ncgen/ncgeny.c
2490
ncgen/ncgeny.c
File diff suppressed because it is too large
Load Diff
216
ncgen/ncgeny.h
216
ncgen/ncgeny.h
@ -1,14 +1,13 @@
|
||||
/* A Bison parser, made by GNU Bison 2.3. */
|
||||
/* A Bison parser, made by GNU Bison 3.0.4. */
|
||||
|
||||
/* Skeleton interface for Bison's Yacc-like parsers in C
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
|
||||
Free Software Foundation, Inc.
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
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
|
||||
the Free Software Foundation; either version 2, or (at your option)
|
||||
any later version.
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -16,9 +15,7 @@
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
Boston, MA 02110-1301, USA. */
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
@ -33,139 +30,100 @@
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YY_NCG_NCGEN_TAB_H_INCLUDED
|
||||
# define YY_NCG_NCGEN_TAB_H_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 1
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int ncgdebug;
|
||||
#endif
|
||||
|
||||
/* Token type. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
NC_UNLIMITED_K = 258,
|
||||
CHAR_K = 259,
|
||||
BYTE_K = 260,
|
||||
SHORT_K = 261,
|
||||
INT_K = 262,
|
||||
FLOAT_K = 263,
|
||||
DOUBLE_K = 264,
|
||||
UBYTE_K = 265,
|
||||
USHORT_K = 266,
|
||||
UINT_K = 267,
|
||||
INT64_K = 268,
|
||||
UINT64_K = 269,
|
||||
IDENT = 270,
|
||||
TERMSTRING = 271,
|
||||
CHAR_CONST = 272,
|
||||
BYTE_CONST = 273,
|
||||
SHORT_CONST = 274,
|
||||
INT_CONST = 275,
|
||||
INT64_CONST = 276,
|
||||
UBYTE_CONST = 277,
|
||||
USHORT_CONST = 278,
|
||||
UINT_CONST = 279,
|
||||
UINT64_CONST = 280,
|
||||
FLOAT_CONST = 281,
|
||||
DOUBLE_CONST = 282,
|
||||
DIMENSIONS = 283,
|
||||
VARIABLES = 284,
|
||||
NETCDF = 285,
|
||||
DATA = 286,
|
||||
TYPES = 287,
|
||||
COMPOUND = 288,
|
||||
ENUM = 289,
|
||||
OPAQUE_ = 290,
|
||||
OPAQUESTRING = 291,
|
||||
GROUP = 292,
|
||||
PATH = 293,
|
||||
FILLMARKER = 294,
|
||||
NIL = 295,
|
||||
_FILLVALUE = 296,
|
||||
_FORMAT = 297,
|
||||
_STORAGE = 298,
|
||||
_CHUNKSIZES = 299,
|
||||
_DEFLATELEVEL = 300,
|
||||
_SHUFFLE = 301,
|
||||
_ENDIANNESS = 302,
|
||||
_NOFILL = 303,
|
||||
_FLETCHER32 = 304,
|
||||
_NCPROPS = 305,
|
||||
_ISNETCDF4 = 306,
|
||||
_SUPERBLOCK = 307,
|
||||
DATASETID = 308
|
||||
};
|
||||
enum yytokentype
|
||||
{
|
||||
NC_UNLIMITED_K = 258,
|
||||
CHAR_K = 259,
|
||||
BYTE_K = 260,
|
||||
SHORT_K = 261,
|
||||
INT_K = 262,
|
||||
FLOAT_K = 263,
|
||||
DOUBLE_K = 264,
|
||||
UBYTE_K = 265,
|
||||
USHORT_K = 266,
|
||||
UINT_K = 267,
|
||||
INT64_K = 268,
|
||||
UINT64_K = 269,
|
||||
IDENT = 270,
|
||||
TERMSTRING = 271,
|
||||
CHAR_CONST = 272,
|
||||
BYTE_CONST = 273,
|
||||
SHORT_CONST = 274,
|
||||
INT_CONST = 275,
|
||||
INT64_CONST = 276,
|
||||
UBYTE_CONST = 277,
|
||||
USHORT_CONST = 278,
|
||||
UINT_CONST = 279,
|
||||
UINT64_CONST = 280,
|
||||
FLOAT_CONST = 281,
|
||||
DOUBLE_CONST = 282,
|
||||
DIMENSIONS = 283,
|
||||
VARIABLES = 284,
|
||||
NETCDF = 285,
|
||||
DATA = 286,
|
||||
TYPES = 287,
|
||||
COMPOUND = 288,
|
||||
ENUM = 289,
|
||||
OPAQUE_ = 290,
|
||||
OPAQUESTRING = 291,
|
||||
GROUP = 292,
|
||||
PATH = 293,
|
||||
FILLMARKER = 294,
|
||||
NIL = 295,
|
||||
_FILLVALUE = 296,
|
||||
_FORMAT = 297,
|
||||
_STORAGE = 298,
|
||||
_CHUNKSIZES = 299,
|
||||
_DEFLATELEVEL = 300,
|
||||
_SHUFFLE = 301,
|
||||
_ENDIANNESS = 302,
|
||||
_NOFILL = 303,
|
||||
_FLETCHER32 = 304,
|
||||
_NCPROPS = 305,
|
||||
_ISNETCDF4 = 306,
|
||||
_SUPERBLOCK = 307,
|
||||
DATASETID = 308
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define NC_UNLIMITED_K 258
|
||||
#define CHAR_K 259
|
||||
#define BYTE_K 260
|
||||
#define SHORT_K 261
|
||||
#define INT_K 262
|
||||
#define FLOAT_K 263
|
||||
#define DOUBLE_K 264
|
||||
#define UBYTE_K 265
|
||||
#define USHORT_K 266
|
||||
#define UINT_K 267
|
||||
#define INT64_K 268
|
||||
#define UINT64_K 269
|
||||
#define IDENT 270
|
||||
#define TERMSTRING 271
|
||||
#define CHAR_CONST 272
|
||||
#define BYTE_CONST 273
|
||||
#define SHORT_CONST 274
|
||||
#define INT_CONST 275
|
||||
#define INT64_CONST 276
|
||||
#define UBYTE_CONST 277
|
||||
#define USHORT_CONST 278
|
||||
#define UINT_CONST 279
|
||||
#define UINT64_CONST 280
|
||||
#define FLOAT_CONST 281
|
||||
#define DOUBLE_CONST 282
|
||||
#define DIMENSIONS 283
|
||||
#define VARIABLES 284
|
||||
#define NETCDF 285
|
||||
#define DATA 286
|
||||
#define TYPES 287
|
||||
#define COMPOUND 288
|
||||
#define ENUM 289
|
||||
#define OPAQUE_ 290
|
||||
#define OPAQUESTRING 291
|
||||
#define GROUP 292
|
||||
#define PATH 293
|
||||
#define FILLMARKER 294
|
||||
#define NIL 295
|
||||
#define _FILLVALUE 296
|
||||
#define _FORMAT 297
|
||||
#define _STORAGE 298
|
||||
#define _CHUNKSIZES 299
|
||||
#define _DEFLATELEVEL 300
|
||||
#define _SHUFFLE 301
|
||||
#define _ENDIANNESS 302
|
||||
#define _NOFILL 303
|
||||
#define _FLETCHER32 304
|
||||
#define _NCPROPS 305
|
||||
#define _ISNETCDF4 306
|
||||
#define _SUPERBLOCK 307
|
||||
#define DATASETID 308
|
||||
|
||||
|
||||
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
#line 138 "ncgen.y"
|
||||
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 138 "ncgen.y" /* yacc.c:1909 */
|
||||
|
||||
Symbol* sym;
|
||||
unsigned long size; /* allow for zero size to indicate e.g. UNLIMITED*/
|
||||
long mark; /* track indices into the sequence*/
|
||||
int nctype; /* for tracking attribute list type*/
|
||||
Datalist* datalist;
|
||||
NCConstant constant;
|
||||
}
|
||||
/* Line 1529 of yacc.c. */
|
||||
#line 164 "ncgen.tab.h"
|
||||
YYSTYPE;
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
|
||||
#line 117 "ncgeny.h" /* yacc.c:1909 */
|
||||
};
|
||||
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
extern YYSTYPE ncglval;
|
||||
|
||||
int ncgparse (void);
|
||||
|
||||
#endif /* !YY_NCG_NCGEN_TAB_H_INCLUDED */
|
||||
|
@ -1,7 +1,7 @@
|
||||
set -e
|
||||
|
||||
TOPSRCDIR=@TOPSRCDIR@
|
||||
TOPBUILDDIR=@TOPBUILDDIR@
|
||||
TOPSRCDIR=@abs_top_srcdir@
|
||||
TOPBUILDDIR=@abs_top_builddir@
|
||||
|
||||
# Figure out various locations in the src/build tree.
|
||||
# This is relatively fragile code and is essentially
|
||||
@ -20,7 +20,7 @@ TOPBUILDDIR=@TOPBUILDDIR@
|
||||
# the src and build trees are distinct.
|
||||
# 4. Cmake on windows using cygwin or msys.
|
||||
# The src and build trees are distinct.
|
||||
#
|
||||
#
|
||||
# For now, an explicit build using the Visual C(++) compiler
|
||||
# is not supported. The big issue is the handling of executables
|
||||
# and the notion of a VS configuration/build type like Debug or Release.
|
||||
@ -29,11 +29,11 @@ TOPBUILDDIR=@TOPBUILDDIR@
|
||||
# Thus one finds ncdump.exe in $top_builddir/ncdump/Debug instead of
|
||||
# $top_builddir/ncdump. An additional issue is the extension of an
|
||||
# executable: .exe vs nothing. This code attempts to figure out which is used.
|
||||
#
|
||||
#
|
||||
# For possible future fixes, a placeholder is left in place in the
|
||||
# following code named VS. If it were set to the build type, then,
|
||||
# in theory, this code would work with Visual C. It is disabled for now.
|
||||
#
|
||||
#
|
||||
# The goal, then, of this common code is to set up some useful
|
||||
#constants for use in test shell scripts.
|
||||
# 1. srcdir - absolute path to the source dir (e.g. ${top_srcdir}/ncgen)
|
||||
|
Loading…
Reference in New Issue
Block a user