Updated CMake files, added a few changes to fix linux-based compile warnings.

This commit is contained in:
Ward Fisher 2012-08-07 21:34:55 +00:00
parent 0ee2fba307
commit 0a964ad8b1
7 changed files with 235 additions and 219 deletions

View File

@ -13,6 +13,7 @@ SET (CTEST_DROP_METHOD http CACHE STRING "")
SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/~wfisher/cdash/" CACHE STRING "") SET (CTEST_DROP_SITE "yakov.unidata.ucar.edu/~wfisher/cdash/" CACHE STRING "")
SET (CTEST_DROP_LOCATION "/submit.php?project=WinNETCDF" CACHE STRING "") SET (CTEST_DROP_LOCATION "/submit.php?project=WinNETCDF" CACHE STRING "")
SET (CTEST_DROP_SITE_CDASH TRUE CACHE BOOL "") SET (CTEST_DROP_SITE_CDASH TRUE CACHE BOOL "")
SET (CTEST_MEMORYCHECK_COMMAND valgrind CACHE STRING "")
ADD_DEFINITIONS() ADD_DEFINITIONS()

View File

@ -436,7 +436,7 @@ main(int argc, char **argv)
badvars++; badvars++;
fprintf(stderr, fprintf(stderr,
"\tFrom nofill file, %s[%lu] = %.15g\tFrom fill file, %s[%lu] = %.15g\n", "\tFrom nofill file, %s[%lu] = %.15g\tFrom fill file, %s[%lu] = %.15g\n",
varname1, nn, data1[nn], varname2, nn, data2[nn]); varname1, (unsigned long)nn, data1[nn], varname2, (unsigned long)nn, data2[nn]);
break; break;
}; };
} }
@ -458,7 +458,7 @@ main(int argc, char **argv)
badvars++; badvars++;
fprintf(stderr, fprintf(stderr,
"\tFrom nofill file, %s[%lu] = %d\tFrom fill file, %s[%lu] = %d\n", "\tFrom nofill file, %s[%lu] = %d\tFrom fill file, %s[%lu] = %d\n",
varname1, nn, data1[nn], varname2, nn, data2[nn]); varname1, (unsigned long)nn, data1[nn], varname2, (unsigned long)nn, data2[nn]);
break; break;
}; };
} }

View File

@ -92,7 +92,7 @@ main(int argc, char **argv)
for (i = 0; i < NUM_TRIES; i++) for (i = 0; i < NUM_TRIES; i++)
{ {
printf(", trying sizehint of %ld ...", sizehint); printf(", trying sizehint of %lu ...", (unsigned long)sizehint);
if (create_file(FILE_NAME, NC_NOFILL, &sizehint)) ERR; if (create_file(FILE_NAME, NC_NOFILL, &sizehint)) ERR;
if (nc_open(FILE_NAME, 0, &ncid)) ERR; if (nc_open(FILE_NAME, 0, &ncid)) ERR;
if (nc_get_var1(ncid, 0, idx, &data)) ERR; if (nc_get_var1(ncid, 0, idx, &data)) ERR;

View File

@ -71,10 +71,10 @@ odometerprint(Odometer* odom)
} else for(i=0;i<odom->rank;i++) { } else for(i=0;i<odom->rank;i++) {
int ioffset = i + odom->offset; int ioffset = i + odom->offset;
sprintf(tmp,"[%lu/%lu..%lu:%lu]", sprintf(tmp,"[%lu/%lu..%lu:%lu]",
odom->origin->index[ioffset], (unsigned long)odom->origin->index[ioffset],
odom->origin->start[ioffset], (unsigned long)odom->origin->start[ioffset],
odom->origin->declsize[ioffset], (unsigned long)odom->origin->declsize[ioffset],
odom->origin->count[ioffset] (unsigned long)odom->origin->count[ioffset]
); );
strcat(line,tmp); strcat(line,tmp);
} }

View File

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.6.2. */ /* A Bison parser, made by GNU Bison 2.5. */
/* Bison implementation for Yacc-like parsers in C /* Bison implementation for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2011 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 it under the terms of the GNU General Public License as published by
@ -44,7 +44,7 @@
#define YYBISON 1 #define YYBISON 1
/* Bison version. */ /* Bison version. */
#define YYBISON_VERSION "2.6.2" #define YYBISON_VERSION "2.5"
/* Skeleton name. */ /* Skeleton name. */
#define YYSKELETON_NAME "yacc.c" #define YYSKELETON_NAME "yacc.c"
@ -58,6 +58,8 @@
/* Pull parsers. */ /* Pull parsers. */
#define YYPULL 1 #define YYPULL 1
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */ /* Substitute the variable and function names. */
#define yyparse ncgparse #define yyparse ncgparse
@ -68,9 +70,11 @@
#define yydebug ncgdebug #define yydebug ncgdebug
#define yynerrs ncgnerrs #define yynerrs ncgnerrs
/* Copy the first part of user declarations. */ /* Copy the first part of user declarations. */
/* Line 336 of yacc.c */
#line 9 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 268 of yacc.c */
#line 9 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
#ifdef sccs #ifdef sccs
static char SccsId[] = "$Id: ncgen.y,v 1.34 2010/03/31 18:18:41 dmh Exp $"; static char SccsId[] = "$Id: ncgen.y,v 1.34 2010/03/31 18:18:41 dmh Exp $";
@ -143,16 +147,14 @@ void yyerror(char*);
int yyerror(char*); int yyerror(char*);
#endif #endif
/* Line 336 of yacc.c */
#line 148 "ncgen.tab.c"
# ifndef YY_NULL /* Line 268 of yacc.c */
# if defined __cplusplus && 201103L <= __cplusplus #line 153 "ncgen.tab.c"
# define YY_NULL nullptr
# else /* Enabling traces. */
# define YY_NULL 0 #ifndef YYDEBUG
# endif # define YYDEBUG 0
# endif #endif
/* Enabling verbose error messages. */ /* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE #ifdef YYERROR_VERBOSE
@ -162,18 +164,12 @@ int yyerror(char*);
# define YYERROR_VERBOSE 0 # define YYERROR_VERBOSE 0
#endif #endif
/* In a future release of Bison, this section will be replaced /* Enabling the token table. */
by #include "ncgen.tab.h". */ #ifndef YYTOKEN_TABLE
#ifndef NCG_NCGEN_TAB_H # define YYTOKEN_TABLE 0
# define NCG_NCGEN_TAB_H
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int ncgdebug;
#endif #endif
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
# define YYTOKENTYPE # define YYTOKENTYPE
@ -204,6 +200,7 @@ extern int ncgdebug;
#endif #endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE; typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
@ -211,28 +208,12 @@ typedef int YYSTYPE;
# define YYSTYPE_IS_DECLARED 1 # define YYSTYPE_IS_DECLARED 1
#endif #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 /* !NCG_NCGEN_TAB_H */
/* Copy the second part of user declarations. */ /* Copy the second part of user declarations. */
/* Line 353 of yacc.c */
#line 236 "ncgen.tab.c" /* Line 343 of yacc.c */
#line 217 "ncgen.tab.c"
#ifdef short #ifdef short
# undef short # undef short
@ -338,7 +319,6 @@ YYID (yyi)
# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER) || defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
/* Use EXIT_SUCCESS as a witness for stdlib.h. */
# ifndef EXIT_SUCCESS # ifndef EXIT_SUCCESS
# define EXIT_SUCCESS 0 # define EXIT_SUCCESS 0
# endif # endif
@ -430,19 +410,19 @@ union yyalloc
#endif #endif
#if defined YYCOPY_NEEDED && YYCOPY_NEEDED #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
/* Copy COUNT objects from SRC to DST. The source and destination do /* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */ not overlap. */
# ifndef YYCOPY # ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__ # if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(Dst, Src, Count) \ # define YYCOPY(To, From, Count) \
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else # else
# define YYCOPY(Dst, Src, Count) \ # define YYCOPY(To, From, Count) \
do \ do \
{ \ { \
YYSIZE_T yyi; \ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \ for (yyi = 0; yyi < (Count); yyi++) \
(Dst)[yyi] = (Src)[yyi]; \ (To)[yyi] = (From)[yyi]; \
} \ } \
while (YYID (0)) while (YYID (0))
# endif # endif
@ -558,7 +538,7 @@ static const yytype_uint16 yyrline[] =
}; };
#endif #endif
#if YYDEBUG || YYERROR_VERBOSE || 0 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] = static const char *const yytname[] =
@ -573,7 +553,7 @@ static const char *const yytname[] =
"vardecl", "type", "varlist", "varspec", "$@3", "var", "dimspec", "vardecl", "type", "varlist", "varspec", "$@3", "var", "dimspec",
"dimlist", "vdim", "attdecl", "$@4", "gattdecl", "$@5", "att", "gatt", "dimlist", "vdim", "attdecl", "$@4", "gattdecl", "$@5", "att", "gatt",
"avar", "attr", "attvallist", "aconst", "attconst", "datasection", "avar", "attr", "attvallist", "aconst", "attconst", "datasection",
"datadecls", "datadecl", "$@6", "constlist", "dconst", "$@7", "const", YY_NULL "datadecls", "datadecl", "$@6", "constlist", "dconst", "$@7", "const", 0
}; };
#endif #endif
@ -754,12 +734,11 @@ static const yytype_uint8 yystos[] =
#define YYBACKUP(Token, Value) \ #define YYBACKUP(Token, Value) \
do \ do \
if (yychar == YYEMPTY) \ if (yychar == YYEMPTY && yylen == 1) \
{ \ { \
yychar = (Token); \ yychar = (Token); \
yylval = (Value); \ yylval = (Value); \
YYPOPSTACK (yylen); \ YYPOPSTACK (1); \
yystate = *yyssp; \
goto yybackup; \ goto yybackup; \
} \ } \
else \ else \
@ -773,10 +752,12 @@ while (YYID (0))
#define YYTERROR 1 #define YYTERROR 1
#define YYERRCODE 256 #define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. /* 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 If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */ the previous symbol: RHS[0] (always defined). */
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT #ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \ # define YYLLOC_DEFAULT(Current, Rhs, N) \
do \ do \
@ -797,9 +778,6 @@ while (YYID (0))
while (YYID (0)) while (YYID (0))
#endif #endif
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
/* This macro is provided for backward compatibility. */ /* This macro is provided for backward compatibility. */
@ -859,8 +837,6 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
YYSTYPE const * const yyvaluep; YYSTYPE const * const yyvaluep;
#endif #endif
{ {
FILE *yyo = yyoutput;
YYUSE (yyo);
if (!yyvaluep) if (!yyvaluep)
return; return;
# ifdef YYPRINT # ifdef YYPRINT
@ -1112,12 +1088,12 @@ static int
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
yytype_int16 *yyssp, int yytoken) yytype_int16 *yyssp, int yytoken)
{ {
YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
YYSIZE_T yysize = yysize0; YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1; YYSIZE_T yysize1;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
/* Internationalized format string. */ /* Internationalized format string. */
const char *yyformat = YY_NULL; const char *yyformat = 0;
/* Arguments of yyformat. */ /* Arguments of yyformat. */
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
/* Number of reported tokens (one for the "unexpected", one per /* Number of reported tokens (one for the "unexpected", one per
@ -1177,7 +1153,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
break; break;
} }
yyarg[yycount++] = yytname[yyx]; yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); yysize1 = yysize + yytnamerr (0, yytname[yyx]);
if (! (yysize <= yysize1 if (! (yysize <= yysize1
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM)) && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
return 2; return 2;
@ -1269,6 +1245,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. */ /* The lookahead symbol. */
@ -1315,7 +1305,7 @@ yyparse ()
`yyss': related to states. `yyss': related to states.
`yyvs': related to semantic values. `yyvs': related to semantic values.
Refer to the stacks through separate pointers, to allow yyoverflow Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */ to reallocate them elsewhere. */
/* The state stack. */ /* The state stack. */
@ -1369,6 +1359,7 @@ yyparse ()
The wasted elements are never initialized. */ The wasted elements are never initialized. */
yyssp = yyss; yyssp = yyss;
yyvsp = yyvs; yyvsp = yyvs;
goto yysetstate; goto yysetstate;
/*------------------------------------------------------------. /*------------------------------------------------------------.
@ -1546,14 +1537,16 @@ yyreduce:
switch (yyn) switch (yyn)
{ {
case 2: case 2:
/* Line 1787 of yacc.c */
#line 114 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 114 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ init_netcdf(); } { init_netcdf(); }
break; break;
case 3: case 3:
/* Line 1787 of yacc.c */
#line 117 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 117 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
if (derror_count == 0) if (derror_count == 0)
define_netcdf(netcdfname); define_netcdf(netcdfname);
@ -1563,8 +1556,9 @@ yyreduce:
break; break;
case 4: case 4:
/* Line 1787 of yacc.c */
#line 125 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 125 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
if (derror_count == 0) if (derror_count == 0)
close_netcdf(); close_netcdf();
@ -1572,8 +1566,9 @@ yyreduce:
break; break;
case 11: case 11:
/* Line 1787 of yacc.c */
#line 140 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 140 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ if (int_val <= 0) { if (int_val <= 0)
derror("dimension length must be positive"); derror("dimension length must be positive");
dims[ndims].size = int_val; dims[ndims].size = int_val;
@ -1582,8 +1577,9 @@ yyreduce:
break; break;
case 12: case 12:
/* Line 1787 of yacc.c */
#line 146 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 146 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ /* for rare case where 2^31 < dimsize < 2^32 */ { /* for rare case where 2^31 < dimsize < 2^32 */
if (double_val <= 0) if (double_val <= 0)
derror("dimension length must be positive"); derror("dimension length must be positive");
@ -1597,8 +1593,9 @@ yyreduce:
break; break;
case 13: case 13:
/* Line 1787 of yacc.c */
#line 157 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 157 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ if (rec_dim != -1) { if (rec_dim != -1)
derror("only one NC_UNLIMITED dimension allowed"); derror("only one NC_UNLIMITED dimension allowed");
rec_dim = ndims; /* the unlimited (record) dimension */ rec_dim = ndims; /* the unlimited (record) dimension */
@ -1608,8 +1605,9 @@ yyreduce:
break; break;
case 14: case 14:
/* Line 1787 of yacc.c */
#line 165 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 165 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
if ((yyvsp[(1) - (1)])->is_dim == 1) { if ((yyvsp[(1) - (1)])->is_dim == 1) {
derror( "duplicate dimension declaration for %s", derror( "duplicate dimension declaration for %s",
@ -1628,44 +1626,51 @@ yyreduce:
break; break;
case 27: case 27:
/* Line 1787 of yacc.c */
#line 197 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 197 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ type_code = NC_BYTE; } { type_code = NC_BYTE; }
break; break;
case 28: case 28:
/* Line 1787 of yacc.c */
#line 198 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 198 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ type_code = NC_CHAR; } { type_code = NC_CHAR; }
break; break;
case 29: case 29:
/* Line 1787 of yacc.c */
#line 199 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 199 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ type_code = NC_SHORT; } { type_code = NC_SHORT; }
break; break;
case 30: case 30:
/* Line 1787 of yacc.c */
#line 200 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 200 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ type_code = NC_INT; } { type_code = NC_INT; }
break; break;
case 31: case 31:
/* Line 1787 of yacc.c */
#line 201 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 201 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ type_code = NC_FLOAT; } { type_code = NC_FLOAT; }
break; break;
case 32: case 32:
/* Line 1787 of yacc.c */
#line 202 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 202 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ type_code = NC_DOUBLE; } { type_code = NC_DOUBLE; }
break; break;
case 35: case 35:
/* Line 1787 of yacc.c */
#line 208 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 208 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
static struct vars dummyvar; static struct vars dummyvar;
@ -1701,8 +1706,9 @@ yyreduce:
break; break;
case 36: case 36:
/* Line 1787 of yacc.c */
#line 241 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 241 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
vars[nvars].ndims = nvdims; vars[nvars].ndims = nvdims;
nvars++; nvars++;
@ -1710,8 +1716,9 @@ yyreduce:
break; break;
case 42: case 42:
/* Line 1787 of yacc.c */
#line 255 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 255 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
if (nvdims >= NC_MAX_VAR_DIMS) { if (nvdims >= NC_MAX_VAR_DIMS) {
derror("%s has too many dimensions",vars[nvars].name); derror("%s has too many dimensions",vars[nvars].name);
@ -1734,48 +1741,54 @@ yyreduce:
break; break;
case 43: case 43:
/* Line 1787 of yacc.c */
#line 276 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 276 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
defatt(); defatt();
} }
break; break;
case 44: case 44:
/* Line 1787 of yacc.c */
#line 280 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 280 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
equalatt(); equalatt();
} }
break; break;
case 45: case 45:
/* Line 1787 of yacc.c */
#line 285 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 285 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
defatt(); defatt();
} }
break; break;
case 46: case 46:
/* Line 1787 of yacc.c */
#line 289 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 289 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
equalatt(); equalatt();
} }
break; break;
case 48: case 48:
/* Line 1787 of yacc.c */
#line 297 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 297 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
varnum = NC_GLOBAL; /* handle of "global" attribute */ varnum = NC_GLOBAL; /* handle of "global" attribute */
} }
break; break;
case 49: case 49:
/* Line 1787 of yacc.c */
#line 303 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 303 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ if ((yyvsp[(1) - (1)])->is_var == 1) { if ((yyvsp[(1) - (1)])->is_var == 1)
varnum = (yyvsp[(1) - (1)])->vnum; varnum = (yyvsp[(1) - (1)])->vnum;
else { else {
@ -1787,8 +1800,9 @@ yyreduce:
break; break;
case 50: case 50:
/* Line 1787 of yacc.c */
#line 313 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 313 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
/* make sure atts array will hold attributes */ /* make sure atts array will hold attributes */
grow_aarray(natts, /* must hold natts+1 atts */ grow_aarray(natts, /* must hold natts+1 atts */
@ -1801,8 +1815,9 @@ yyreduce:
break; break;
case 53: case 53:
/* Line 1787 of yacc.c */
#line 327 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 327 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
if (valtype == NC_UNSPECIFIED) if (valtype == NC_UNSPECIFIED)
valtype = atype_code; valtype = atype_code;
@ -1812,8 +1827,9 @@ yyreduce:
break; break;
case 54: case 54:
/* Line 1787 of yacc.c */
#line 336 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 336 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_CHAR; atype_code = NC_CHAR;
*char_valp++ = char_val; *char_valp++ = char_val;
@ -1822,8 +1838,9 @@ yyreduce:
break; break;
case 55: case 55:
/* Line 1787 of yacc.c */
#line 342 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 342 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_CHAR; atype_code = NC_CHAR;
{ {
@ -1839,8 +1856,9 @@ yyreduce:
break; break;
case 56: case 56:
/* Line 1787 of yacc.c */
#line 355 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 355 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_BYTE; atype_code = NC_BYTE;
*byte_valp++ = byte_val; *byte_valp++ = byte_val;
@ -1849,8 +1867,9 @@ yyreduce:
break; break;
case 57: case 57:
/* Line 1787 of yacc.c */
#line 361 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 361 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_SHORT; atype_code = NC_SHORT;
*short_valp++ = short_val; *short_valp++ = short_val;
@ -1859,8 +1878,9 @@ yyreduce:
break; break;
case 58: case 58:
/* Line 1787 of yacc.c */
#line 367 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 367 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_INT; atype_code = NC_INT;
*int_valp++ = int_val; *int_valp++ = int_val;
@ -1869,8 +1889,9 @@ yyreduce:
break; break;
case 59: case 59:
/* Line 1787 of yacc.c */
#line 373 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 373 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_FLOAT; atype_code = NC_FLOAT;
*float_valp++ = float_val; *float_valp++ = float_val;
@ -1879,8 +1900,9 @@ yyreduce:
break; break;
case 60: case 60:
/* Line 1787 of yacc.c */
#line 379 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 379 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_DOUBLE; atype_code = NC_DOUBLE;
*double_valp++ = double_val; *double_valp++ = double_val;
@ -1889,8 +1911,9 @@ yyreduce:
break; break;
case 66: case 66:
/* Line 1787 of yacc.c */
#line 395 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 395 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
valtype = vars[varnum].type; /* variable type */ valtype = vars[varnum].type; /* variable type */
valnum = 0; /* values accumulated for variable */ valnum = 0; /* values accumulated for variable */
@ -1944,8 +1967,9 @@ yyreduce:
break; break;
case 67: case 67:
/* Line 1787 of yacc.c */
#line 446 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 446 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
if (valnum < var_len) { /* leftovers */ if (valnum < var_len) { /* leftovers */
nc_fill(valtype, nc_fill(valtype,
@ -1963,8 +1987,9 @@ yyreduce:
break; break;
case 70: case 70:
/* Line 1787 of yacc.c */
#line 465 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 465 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
if(valnum >= var_len) { if(valnum >= var_len) {
if (vars[varnum].dims[0] != rec_dim) { /* not recvar */ if (vars[varnum].dims[0] != rec_dim) { /* not recvar */
@ -1992,8 +2017,9 @@ yyreduce:
break; break;
case 71: case 71:
/* Line 1787 of yacc.c */
#line 490 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 490 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
if (not_a_string) { if (not_a_string) {
switch (valtype) { switch (valtype) {
@ -2022,8 +2048,9 @@ yyreduce:
break; break;
case 72: case 72:
/* Line 1787 of yacc.c */
#line 518 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 518 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_CHAR; atype_code = NC_CHAR;
switch (valtype) { switch (valtype) {
@ -2052,8 +2079,9 @@ yyreduce:
break; break;
case 73: case 73:
/* Line 1787 of yacc.c */
#line 544 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 544 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
not_a_string = 0; not_a_string = 0;
atype_code = NC_CHAR; atype_code = NC_CHAR;
@ -2111,8 +2139,9 @@ yyreduce:
break; break;
case 74: case 74:
/* Line 1787 of yacc.c */
#line 599 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 599 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_BYTE; atype_code = NC_BYTE;
switch (valtype) { switch (valtype) {
@ -2141,8 +2170,9 @@ yyreduce:
break; break;
case 75: case 75:
/* Line 1787 of yacc.c */
#line 625 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 625 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_SHORT; atype_code = NC_SHORT;
switch (valtype) { switch (valtype) {
@ -2171,8 +2201,9 @@ yyreduce:
break; break;
case 76: case 76:
/* Line 1787 of yacc.c */
#line 651 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 651 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_INT; atype_code = NC_INT;
switch (valtype) { switch (valtype) {
@ -2201,8 +2232,9 @@ yyreduce:
break; break;
case 77: case 77:
/* Line 1787 of yacc.c */
#line 677 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 677 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_FLOAT; atype_code = NC_FLOAT;
switch (valtype) { switch (valtype) {
@ -2231,8 +2263,9 @@ yyreduce:
break; break;
case 78: case 78:
/* Line 1787 of yacc.c */
#line 703 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 703 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
atype_code = NC_DOUBLE; atype_code = NC_DOUBLE;
switch (valtype) { switch (valtype) {
@ -2264,8 +2297,9 @@ yyreduce:
break; break;
case 79: case 79:
/* Line 1787 of yacc.c */
#line 732 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 1806 of yacc.c */
#line 732 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
{ {
/* store fill_value */ /* store fill_value */
switch (valtype) { switch (valtype) {
@ -2300,8 +2334,9 @@ yyreduce:
break; break;
/* Line 1787 of yacc.c */
#line 2305 "ncgen.tab.c" /* Line 1806 of yacc.c */
#line 2340 "ncgen.tab.c"
default: break; default: break;
} }
/* User semantic actions sometimes alter yychar, and that requires /* User semantic actions sometimes alter yychar, and that requires
@ -2488,7 +2523,7 @@ yyabortlab:
yyresult = 1; yyresult = 1;
goto yyreturn; goto yyreturn;
#if !defined yyoverflow || YYERROR_VERBOSE #if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------. /*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. | | yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/ `-------------------------------------------------*/
@ -2530,8 +2565,9 @@ yyreturn:
} }
/* Line 2048 of yacc.c */
#line 767 "/Users/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y" /* Line 2067 of yacc.c */
#line 767 "/home/wfisher/Desktop/win_netcdf/ncgen3/ncgen.y"
/* HELPER PROGRAMS */ /* HELPER PROGRAMS */
@ -2661,3 +2697,4 @@ clearout(void) /* reset symbol table to empty */
#define YY_NO_INPUT #define YY_NO_INPUT
#include "ncgenyy.c" #include "ncgenyy.c"

View File

@ -1,8 +1,8 @@
/* A Bison parser, made by GNU Bison 2.6.2. */ /* A Bison parser, made by GNU Bison 2.5. */
/* Bison interface for Yacc-like parsers in C /* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc. Copyright (C) 1984, 1989-1990, 2000-2011 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 it under the terms of the GNU General Public License as published by
@ -30,15 +30,6 @@
This special exception was added by the Free Software Foundation in This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */ version 2.2 of Bison. */
#ifndef NCG_NCGEN_TAB_H
# define NCG_NCGEN_TAB_H
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int ncgdebug;
#endif
/* Tokens. */ /* Tokens. */
#ifndef YYTOKENTYPE #ifndef YYTOKENTYPE
@ -70,6 +61,7 @@ extern int ncgdebug;
#endif #endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE; typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_TRIVIAL 1
@ -79,18 +71,4 @@ typedef int YYSTYPE;
extern YYSTYPE ncglval; extern YYSTYPE ncglval;
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int ncgparse (void *YYPARSE_PARAM);
#else
int ncgparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int ncgparse (void);
#else
int ncgparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !NCG_NCGEN_TAB_H */

View File

@ -615,7 +615,7 @@ ocdumpdatapath(OCstate* state, OCdata* data, OCbytes* buffer)
if(fisset(next->datamode,OCDT_FIELD) if(fisset(next->datamode,OCDT_FIELD)
|| fisset(next->datamode,OCDT_ELEMENT) || fisset(next->datamode,OCDT_ELEMENT)
|| fisset(next->datamode,OCDT_RECORD)) { || fisset(next->datamode,OCDT_RECORD)) {
snprintf(tmp,sizeof(tmp),".%lu",next->index); snprintf(tmp,sizeof(tmp),".%lu",(unsigned long)next->index);
ocbytescat(buffer,tmp); ocbytescat(buffer,tmp);
} }
} }