mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
Updated CMake files, added a few changes to fix linux-based compile warnings.
This commit is contained in:
parent
0ee2fba307
commit
0a964ad8b1
@ -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_LOCATION "/submit.php?project=WinNETCDF" CACHE STRING "")
|
||||
SET (CTEST_DROP_SITE_CDASH TRUE CACHE BOOL "")
|
||||
SET (CTEST_MEMORYCHECK_COMMAND valgrind CACHE STRING "")
|
||||
|
||||
|
||||
ADD_DEFINITIONS()
|
||||
|
@ -436,7 +436,7 @@ main(int argc, char **argv)
|
||||
badvars++;
|
||||
fprintf(stderr,
|
||||
"\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;
|
||||
};
|
||||
}
|
||||
@ -458,7 +458,7 @@ main(int argc, char **argv)
|
||||
badvars++;
|
||||
fprintf(stderr,
|
||||
"\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;
|
||||
};
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ main(int argc, char **argv)
|
||||
|
||||
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 (nc_open(FILE_NAME, 0, &ncid)) ERR;
|
||||
if (nc_get_var1(ncid, 0, idx, &data)) ERR;
|
||||
|
@ -71,10 +71,10 @@ odometerprint(Odometer* odom)
|
||||
} else for(i=0;i<odom->rank;i++) {
|
||||
int ioffset = i + odom->offset;
|
||||
sprintf(tmp,"[%lu/%lu..%lu:%lu]",
|
||||
odom->origin->index[ioffset],
|
||||
odom->origin->start[ioffset],
|
||||
odom->origin->declsize[ioffset],
|
||||
odom->origin->count[ioffset]
|
||||
(unsigned long)odom->origin->index[ioffset],
|
||||
(unsigned long)odom->origin->start[ioffset],
|
||||
(unsigned long)odom->origin->declsize[ioffset],
|
||||
(unsigned long)odom->origin->count[ioffset]
|
||||
);
|
||||
strcat(line,tmp);
|
||||
}
|
||||
|
@ -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
|
||||
|
||||
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
|
||||
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.6.2"
|
||||
#define YYBISON_VERSION "2.5"
|
||||
|
||||
/* Skeleton name. */
|
||||
#define YYSKELETON_NAME "yacc.c"
|
||||
@ -58,6 +58,8 @@
|
||||
/* Pull parsers. */
|
||||
#define YYPULL 1
|
||||
|
||||
/* Using locations. */
|
||||
#define YYLSP_NEEDED 0
|
||||
|
||||
/* Substitute the variable and function names. */
|
||||
#define yyparse ncgparse
|
||||
@ -68,9 +70,11 @@
|
||||
#define yydebug ncgdebug
|
||||
#define yynerrs ncgnerrs
|
||||
|
||||
|
||||
/* 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
|
||||
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*);
|
||||
#endif
|
||||
|
||||
/* Line 336 of yacc.c */
|
||||
#line 148 "ncgen.tab.c"
|
||||
|
||||
# ifndef YY_NULL
|
||||
# if defined __cplusplus && 201103L <= __cplusplus
|
||||
# define YY_NULL nullptr
|
||||
# else
|
||||
# define YY_NULL 0
|
||||
# endif
|
||||
# endif
|
||||
/* Line 268 of yacc.c */
|
||||
#line 153 "ncgen.tab.c"
|
||||
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
|
||||
/* Enabling verbose error messages. */
|
||||
#ifdef YYERROR_VERBOSE
|
||||
@ -162,18 +164,12 @@ int yyerror(char*);
|
||||
# define YYERROR_VERBOSE 0
|
||||
#endif
|
||||
|
||||
/* In a future release of Bison, this section will be replaced
|
||||
by #include "ncgen.tab.h". */
|
||||
#ifndef NCG_NCGEN_TAB_H
|
||||
# define NCG_NCGEN_TAB_H
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int ncgdebug;
|
||||
/* Enabling the token table. */
|
||||
#ifndef YYTOKEN_TABLE
|
||||
# define YYTOKEN_TABLE 0
|
||||
#endif
|
||||
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
@ -204,6 +200,7 @@ extern int ncgdebug;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef int YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
@ -211,28 +208,12 @@ 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 /* !NCG_NCGEN_TAB_H */
|
||||
|
||||
/* 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
|
||||
# undef short
|
||||
@ -338,7 +319,6 @@ 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
|
||||
@ -430,19 +410,19 @@ union yyalloc
|
||||
#endif
|
||||
|
||||
#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. */
|
||||
# ifndef YYCOPY
|
||||
# if defined __GNUC__ && 1 < __GNUC__
|
||||
# define YYCOPY(Dst, Src, Count) \
|
||||
__builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
|
||||
# define YYCOPY(To, From, Count) \
|
||||
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
|
||||
# else
|
||||
# define YYCOPY(Dst, Src, Count) \
|
||||
# define YYCOPY(To, From, Count) \
|
||||
do \
|
||||
{ \
|
||||
YYSIZE_T yyi; \
|
||||
for (yyi = 0; yyi < (Count); yyi++) \
|
||||
(Dst)[yyi] = (Src)[yyi]; \
|
||||
(To)[yyi] = (From)[yyi]; \
|
||||
} \
|
||||
while (YYID (0))
|
||||
# endif
|
||||
@ -558,7 +538,7 @@ static const yytype_uint16 yyrline[] =
|
||||
};
|
||||
#endif
|
||||
|
||||
#if YYDEBUG || YYERROR_VERBOSE || 0
|
||||
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
|
||||
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
|
||||
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
|
||||
static const char *const yytname[] =
|
||||
@ -573,7 +553,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", YY_NULL
|
||||
"datadecls", "datadecl", "$@6", "constlist", "dconst", "$@7", "const", 0
|
||||
};
|
||||
#endif
|
||||
|
||||
@ -754,12 +734,11 @@ static const yytype_uint8 yystos[] =
|
||||
|
||||
#define YYBACKUP(Token, Value) \
|
||||
do \
|
||||
if (yychar == YYEMPTY) \
|
||||
if (yychar == YYEMPTY && yylen == 1) \
|
||||
{ \
|
||||
yychar = (Token); \
|
||||
yylval = (Value); \
|
||||
YYPOPSTACK (yylen); \
|
||||
yystate = *yyssp; \
|
||||
YYPOPSTACK (1); \
|
||||
goto yybackup; \
|
||||
} \
|
||||
else \
|
||||
@ -773,10 +752,12 @@ 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 \
|
||||
@ -797,9 +778,6 @@ while (YYID (0))
|
||||
while (YYID (0))
|
||||
#endif
|
||||
|
||||
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
|
||||
|
||||
|
||||
|
||||
/* This macro is provided for backward compatibility. */
|
||||
|
||||
@ -859,8 +837,6 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep)
|
||||
YYSTYPE const * const yyvaluep;
|
||||
#endif
|
||||
{
|
||||
FILE *yyo = yyoutput;
|
||||
YYUSE (yyo);
|
||||
if (!yyvaluep)
|
||||
return;
|
||||
# ifdef YYPRINT
|
||||
@ -1112,12 +1088,12 @@ static int
|
||||
yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
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 yysize1;
|
||||
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
|
||||
/* Internationalized format string. */
|
||||
const char *yyformat = YY_NULL;
|
||||
const char *yyformat = 0;
|
||||
/* Arguments of yyformat. */
|
||||
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
|
||||
/* Number of reported tokens (one for the "unexpected", one per
|
||||
@ -1177,7 +1153,7 @@ yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
|
||||
break;
|
||||
}
|
||||
yyarg[yycount++] = yytname[yyx];
|
||||
yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);
|
||||
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
|
||||
if (! (yysize <= yysize1
|
||||
&& yysize1 <= YYSTACK_ALLOC_MAXIMUM))
|
||||
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. */
|
||||
@ -1315,7 +1305,7 @@ yyparse ()
|
||||
`yyss': related to states.
|
||||
`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. */
|
||||
|
||||
/* The state stack. */
|
||||
@ -1369,6 +1359,7 @@ yyparse ()
|
||||
The wasted elements are never initialized. */
|
||||
yyssp = yyss;
|
||||
yyvsp = yyvs;
|
||||
|
||||
goto yysetstate;
|
||||
|
||||
/*------------------------------------------------------------.
|
||||
@ -1546,14 +1537,16 @@ yyreduce:
|
||||
switch (yyn)
|
||||
{
|
||||
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(); }
|
||||
break;
|
||||
|
||||
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)
|
||||
define_netcdf(netcdfname);
|
||||
@ -1563,8 +1556,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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)
|
||||
close_netcdf();
|
||||
@ -1572,8 +1566,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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)
|
||||
derror("dimension length must be positive");
|
||||
dims[ndims].size = int_val;
|
||||
@ -1582,8 +1577,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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 */
|
||||
if (double_val <= 0)
|
||||
derror("dimension length must be positive");
|
||||
@ -1597,8 +1593,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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)
|
||||
derror("only one NC_UNLIMITED dimension allowed");
|
||||
rec_dim = ndims; /* the unlimited (record) dimension */
|
||||
@ -1608,8 +1605,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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) {
|
||||
derror( "duplicate dimension declaration for %s",
|
||||
@ -1628,44 +1626,51 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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; }
|
||||
break;
|
||||
|
||||
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; }
|
||||
break;
|
||||
|
||||
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; }
|
||||
break;
|
||||
|
||||
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; }
|
||||
break;
|
||||
|
||||
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; }
|
||||
break;
|
||||
|
||||
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; }
|
||||
break;
|
||||
|
||||
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;
|
||||
|
||||
@ -1701,8 +1706,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
nvars++;
|
||||
@ -1710,8 +1716,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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) {
|
||||
derror("%s has too many dimensions",vars[nvars].name);
|
||||
@ -1734,48 +1741,54 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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();
|
||||
}
|
||||
break;
|
||||
|
||||
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();
|
||||
}
|
||||
break;
|
||||
|
||||
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();
|
||||
}
|
||||
break;
|
||||
|
||||
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();
|
||||
}
|
||||
break;
|
||||
|
||||
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 */
|
||||
}
|
||||
break;
|
||||
|
||||
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)
|
||||
varnum = (yyvsp[(1) - (1)])->vnum;
|
||||
else {
|
||||
@ -1787,8 +1800,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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 */
|
||||
grow_aarray(natts, /* must hold natts+1 atts */
|
||||
@ -1801,8 +1815,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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)
|
||||
valtype = atype_code;
|
||||
@ -1812,8 +1827,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
*char_valp++ = char_val;
|
||||
@ -1822,8 +1838,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
{
|
||||
@ -1839,8 +1856,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
*byte_valp++ = byte_val;
|
||||
@ -1849,8 +1867,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
*short_valp++ = short_val;
|
||||
@ -1859,8 +1878,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
*int_valp++ = int_val;
|
||||
@ -1869,8 +1889,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
*float_valp++ = float_val;
|
||||
@ -1879,8 +1900,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
*double_valp++ = double_val;
|
||||
@ -1889,8 +1911,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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 */
|
||||
valnum = 0; /* values accumulated for variable */
|
||||
@ -1944,8 +1967,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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 */
|
||||
nc_fill(valtype,
|
||||
@ -1963,8 +1987,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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 (vars[varnum].dims[0] != rec_dim) { /* not recvar */
|
||||
@ -1992,8 +2017,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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) {
|
||||
switch (valtype) {
|
||||
@ -2022,8 +2048,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
switch (valtype) {
|
||||
@ -2052,8 +2079,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
atype_code = NC_CHAR;
|
||||
@ -2111,8 +2139,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
switch (valtype) {
|
||||
@ -2141,8 +2170,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
switch (valtype) {
|
||||
@ -2171,8 +2201,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
switch (valtype) {
|
||||
@ -2201,8 +2232,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
switch (valtype) {
|
||||
@ -2231,8 +2263,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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;
|
||||
switch (valtype) {
|
||||
@ -2264,8 +2297,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
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 */
|
||||
switch (valtype) {
|
||||
@ -2300,8 +2334,9 @@ yyreduce:
|
||||
break;
|
||||
|
||||
|
||||
/* Line 1787 of yacc.c */
|
||||
#line 2305 "ncgen.tab.c"
|
||||
|
||||
/* Line 1806 of yacc.c */
|
||||
#line 2340 "ncgen.tab.c"
|
||||
default: break;
|
||||
}
|
||||
/* User semantic actions sometimes alter yychar, and that requires
|
||||
@ -2488,7 +2523,7 @@ yyabortlab:
|
||||
yyresult = 1;
|
||||
goto yyreturn;
|
||||
|
||||
#if !defined yyoverflow || YYERROR_VERBOSE
|
||||
#if !defined(yyoverflow) || YYERROR_VERBOSE
|
||||
/*-------------------------------------------------.
|
||||
| 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 */
|
||||
@ -2661,3 +2697,4 @@ clearout(void) /* reset symbol table to empty */
|
||||
#define YY_NO_INPUT
|
||||
|
||||
#include "ncgenyy.c"
|
||||
|
||||
|
@ -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
|
||||
|
||||
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
|
||||
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
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef NCG_NCGEN_TAB_H
|
||||
# define NCG_NCGEN_TAB_H
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int ncgdebug;
|
||||
#endif
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
@ -70,6 +61,7 @@ extern int ncgdebug;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef int YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
@ -79,18 +71,4 @@ typedef int YYSTYPE;
|
||||
|
||||
extern YYSTYPE ncglval;
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int ncgparse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int ncgparse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int ncgparse (void);
|
||||
#else
|
||||
int ncgparse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
#endif /* !NCG_NCGEN_TAB_H */
|
||||
|
@ -615,7 +615,7 @@ ocdumpdatapath(OCstate* state, OCdata* data, OCbytes* buffer)
|
||||
if(fisset(next->datamode,OCDT_FIELD)
|
||||
|| fisset(next->datamode,OCDT_ELEMENT)
|
||||
|| fisset(next->datamode,OCDT_RECORD)) {
|
||||
snprintf(tmp,sizeof(tmp),".%lu",next->index);
|
||||
snprintf(tmp,sizeof(tmp),".%lu",(unsigned long)next->index);
|
||||
ocbytescat(buffer,tmp);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user