Changed calls in tests from deprecated _ubyte functions to equivalent

_uchar functions.
This commit is contained in:
Russ Rew 2010-06-22 22:41:04 +00:00
parent fe8fb995a6
commit 8a013d4f51
10 changed files with 394 additions and 308 deletions

View File

@ -261,7 +261,7 @@ AC_MSG_CHECKING([whether a default chunk size in bytes was specified])
AC_ARG_WITH([default-chunk-size],
[AS_HELP_STRING([--with-default-chunk-size=<integer>],
[Specify default size of chunks in bytes.])],
[DEFAULTT_CHUNK_SIZE=$with_default_chunk_size], [DEFAULT_CHUNK_SIZE=4194304])
[DEFAULT_CHUNK_SIZE=$with_default_chunk_size], [DEFAULT_CHUNK_SIZE=4194304])
AC_MSG_RESULT([$DEFAULT_CHUNK_SIZE])
AC_DEFINE_UNQUOTED([DEFAULT_CHUNK_SIZE], [$DEFAULT_CHUNK_SIZE], [default chunk size in bytes])

View File

@ -351,10 +351,10 @@ nc_copy_var(int ncid_in, int varid_in, int ncid_out)
(double *)data);
break;
case NC_UBYTE:
retval = nc_get_vara_ubyte(ncid_in, varid_in, start, count,
retval = nc_get_vara_uchar(ncid_in, varid_in, start, count,
(unsigned char *)data);
if (!retval)
retval = nc_put_vara_ubyte(ncid_out, varid_out, start, count,
retval = nc_put_vara_uchar(ncid_out, varid_out, start, count,
(unsigned char *)data);
break;
case NC_USHORT:

View File

@ -1,14 +1,15 @@
/* A Bison parser, made by GNU Bison 2.3. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
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 +17,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
@ -47,7 +46,7 @@
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "2.3"
#define YYBISON_VERSION "2.4.1"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@ -55,6 +54,12 @@
/* Pure parsers. */
#define YYPURE 1
/* Push parsers. */
#define YYPUSH 0
/* Pull parsers. */
#define YYPULL 1
/* Using locations. */
#define YYLSP_NEEDED 0
@ -68,29 +73,15 @@
#define yynerrs cenerrs
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
SCAN_WORD = 258,
SCAN_STRINGCONST = 259,
SCAN_NUMBERCONST = 260
};
#endif
/* Tokens. */
#define SCAN_WORD 258
#define SCAN_STRINGCONST 259
#define SCAN_NUMBERCONST 260
/* Copy the first part of user declarations. */
/* Line 189 of yacc.c */
#line 11 "../oc/ce.y"
#include "ceparselex.h"
/* Line 189 of yacc.c */
#line 84 "ce.tab.c"
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 1
@ -109,20 +100,34 @@
# define YYTOKEN_TABLE 0
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
SCAN_WORD = 258,
SCAN_STRINGCONST = 259,
SCAN_NUMBERCONST = 260
};
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
#endif
/* Copy the second part of user declarations. */
/* Line 216 of yacc.c. */
#line 126 "ce.tab.c"
/* Line 264 of yacc.c */
#line 131 "ce.tab.c"
#ifdef short
# undef short
@ -197,14 +202,14 @@ typedef short int yytype_int16;
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
YYID (int i)
YYID (int yyi)
#else
static int
YYID (i)
int i;
YYID (yyi)
int yyi;
#endif
{
return i;
return yyi;
}
#endif
@ -285,9 +290,9 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */
/* A type that is properly aligned for any stack member. */
union yyalloc
{
yytype_int16 yyss;
YYSTYPE yyvs;
};
yytype_int16 yyss_alloc;
YYSTYPE yyvs_alloc;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
@ -321,12 +326,12 @@ union yyalloc
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
@ -759,17 +764,20 @@ yy_symbol_print (yyoutput, yytype, yyvaluep, parsestate)
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
#else
static void
yy_stack_print (bottom, top)
yytype_int16 *bottom;
yytype_int16 *top;
yy_stack_print (yybottom, yytop)
yytype_int16 *yybottom;
yytype_int16 *yytop;
#endif
{
YYFPRINTF (stderr, "Stack now");
for (; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
for (; yybottom <= yytop; yybottom++)
{
int yybot = *yybottom;
YYFPRINTF (stderr, " %d", yybot);
}
YYFPRINTF (stderr, "\n");
}
@ -804,11 +812,11 @@ yy_reduce_print (yyvsp, yyrule, parsestate)
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
fprintf (stderr, " $%d = ", yyi + 1);
YYFPRINTF (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, parsestate);
fprintf (stderr, "\n");
YYFPRINTF (stderr, "\n");
}
}
@ -1090,10 +1098,8 @@ yydestruct (yymsg, yytype, yyvaluep, parsestate)
break;
}
}
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
@ -1112,10 +1118,9 @@ int yyparse ();
/*----------.
| yyparse. |
`----------*/
/*-------------------------.
| yyparse or yypush_parse. |
`-------------------------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
@ -1139,22 +1144,46 @@ yyparse (parsestate)
#endif
#endif
{
/* The look-ahead symbol. */
/* The lookahead symbol. */
int yychar;
/* The semantic value of the look-ahead symbol. */
/* The semantic value of the lookahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
/* Number of syntax errors so far. */
int yynerrs;
int yystate;
int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
/* The stacks and their tools:
`yyss': related to states.
`yyvs': related to semantic values.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs;
YYSTYPE *yyvsp;
YYSIZE_T yystacksize;
int yyn;
int yyresult;
/* Lookahead token as an internal (translated) token number. */
int yytoken;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
@ -1162,39 +1191,17 @@ int yynerrs;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss = yyssa;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp;
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
yytoken = 0;
yyss = yyssa;
yyvs = yyvsa;
yystacksize = YYINITDEPTH;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
@ -1206,7 +1213,6 @@ int yynerrs;
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
@ -1236,7 +1242,6 @@ int yynerrs;
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
@ -1244,7 +1249,6 @@ int yynerrs;
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
yyss = yyss1;
@ -1267,9 +1271,8 @@ int yynerrs;
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
YYSTACK_RELOCATE (yyss_alloc, yyss);
YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
@ -1280,7 +1283,6 @@ int yynerrs;
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
@ -1290,6 +1292,9 @@ int yynerrs;
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
if (yystate == YYFINAL)
YYACCEPT;
goto yybackup;
/*-----------.
@ -1298,16 +1303,16 @@ int yynerrs;
yybackup:
/* Do appropriate processing given the current state. Read a
look-ahead token if we need one and don't already have one. */
lookahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to look-ahead token. */
/* First try to decide what to do without reference to lookahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a look-ahead token if don't already have one. */
/* Not known => get a lookahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@ -1339,19 +1344,15 @@ yybackup:
goto yyreduce;
}
if (yyn == YYFINAL)
YYACCEPT;
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
/* Shift the look-ahead token. */
/* Shift the lookahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token unless it is eof. */
if (yychar != YYEOF)
/* Discard the shifted token. */
yychar = YYEMPTY;
yystate = yyn;
@ -1392,231 +1393,323 @@ yyreduce:
switch (yyn)
{
case 2:
/* Line 1455 of yacc.c */
#line 24 "../oc/ce.y"
{projections(parsestate,(yyvsp[(1) - (1)]));;}
break;
case 3:
/* Line 1455 of yacc.c */
#line 25 "../oc/ce.y"
{selections(parsestate,(yyvsp[(1) - (1)]));;}
break;
case 4:
/* Line 1455 of yacc.c */
#line 27 "../oc/ce.y"
{projections(parsestate,(yyvsp[(1) - (2)])); selections(parsestate,(yyvsp[(2) - (2)]));;}
break;
case 5:
/* Line 1455 of yacc.c */
#line 31 "../oc/ce.y"
{(yyval)=(yyvsp[(1) - (1)]);;}
break;
case 6:
/* Line 1455 of yacc.c */
#line 34 "../oc/ce.y"
{(yyval)=(yyvsp[(1) - (1)]);;}
break;
case 7:
/* Line 1455 of yacc.c */
#line 39 "../oc/ce.y"
{(yyval)=projectionlist(parsestate,null,(yyvsp[(1) - (1)]));;}
break;
case 8:
/* Line 1455 of yacc.c */
#line 41 "../oc/ce.y"
{(yyval)=projectionlist(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
break;
case 9:
/* Line 1455 of yacc.c */
#line 47 "../oc/ce.y"
{(yyval)=projection(parsestate,(yyvsp[(1) - (1)]));;}
break;
case 10:
/* Line 1455 of yacc.c */
#line 53 "../oc/ce.y"
{(yyval)=segmentlist(parsestate,null,(yyvsp[(1) - (1)]));;}
break;
case 11:
/* Line 1455 of yacc.c */
#line 55 "../oc/ce.y"
{(yyval)=segmentlist(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
break;
case 12:
/* Line 1455 of yacc.c */
#line 61 "../oc/ce.y"
{(yyval)=segment(parsestate,(yyvsp[(1) - (1)]),null);;}
break;
case 13:
/* Line 1455 of yacc.c */
#line 63 "../oc/ce.y"
{(yyval)=segment(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
break;
case 14:
/* Line 1455 of yacc.c */
#line 69 "../oc/ce.y"
{(yyval)=array_indices(parsestate,null,(yyvsp[(1) - (1)]));;}
break;
case 15:
/* Line 1455 of yacc.c */
#line 71 "../oc/ce.y"
{(yyval)=array_indices(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
break;
case 16:
/* Line 1455 of yacc.c */
#line 76 "../oc/ce.y"
{(yyval)=(yyvsp[(1) - (1)]);;}
break;
case 17:
/* Line 1455 of yacc.c */
#line 82 "../oc/ce.y"
{(yyval)=range(parsestate,(yyvsp[(1) - (1)]),null,null);;}
break;
case 18:
/* Line 1455 of yacc.c */
#line 84 "../oc/ce.y"
{(yyval)=range(parsestate,(yyvsp[(2) - (5)]),null,(yyvsp[(4) - (5)]));;}
break;
case 19:
/* Line 1455 of yacc.c */
#line 86 "../oc/ce.y"
{(yyval)=range(parsestate,(yyvsp[(2) - (7)]),(yyvsp[(4) - (7)]),(yyvsp[(6) - (7)]));;}
break;
case 20:
/* Line 1455 of yacc.c */
#line 89 "../oc/ce.y"
{(yyval)=(yyvsp[(2) - (3)]);;}
break;
case 21:
/* Line 1455 of yacc.c */
#line 94 "../oc/ce.y"
{(yyval)=selectionlist(parsestate,null,(yyvsp[(2) - (2)]));;}
break;
case 22:
/* Line 1455 of yacc.c */
#line 96 "../oc/ce.y"
{(yyval)=selectionlist(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
break;
case 23:
/* Line 1455 of yacc.c */
#line 102 "../oc/ce.y"
{(yyval)=sel_clause(parsestate,1,(yyvsp[(1) - (5)]),(yyvsp[(2) - (5)]),(yyvsp[(4) - (5)]));;}
break;
case 24:
/* Line 1455 of yacc.c */
#line 104 "../oc/ce.y"
{(yyval)=sel_clause(parsestate,2,(yyvsp[(1) - (3)]),(yyvsp[(2) - (3)]),(yyvsp[(3) - (3)]));;}
break;
case 26:
/* Line 1455 of yacc.c */
#line 111 "../oc/ce.y"
{(yyval)=(yyvsp[(1) - (1)]);;}
break;
case 27:
/* Line 1455 of yacc.c */
#line 116 "../oc/ce.y"
{(yyvsp[(1) - (1)])=selectionpath(parsestate,null,(yyvsp[(1) - (1)]));;}
break;
case 28:
/* Line 1455 of yacc.c */
#line 118 "../oc/ce.y"
{(yyval)=selectionpath(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
break;
case 29:
/* Line 1455 of yacc.c */
#line 123 "../oc/ce.y"
{(yyval)=function(parsestate,(yyvsp[(1) - (3)]),null);;}
break;
case 30:
/* Line 1455 of yacc.c */
#line 125 "../oc/ce.y"
{(yyval)=function(parsestate,(yyvsp[(1) - (4)]),(yyvsp[(3) - (4)]));;}
break;
case 31:
/* Line 1455 of yacc.c */
#line 130 "../oc/ce.y"
{(yyval)=arg_list(parsestate,null,(yyvsp[(1) - (1)]));;}
break;
case 32:
/* Line 1455 of yacc.c */
#line 132 "../oc/ce.y"
{(yyval)=arg_list(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
break;
case 33:
/* Line 1455 of yacc.c */
#line 137 "../oc/ce.y"
{(yyval)=value_list(parsestate,null,(yyvsp[(1) - (1)]));;}
break;
case 34:
/* Line 1455 of yacc.c */
#line 139 "../oc/ce.y"
{(yyval)=value_list(parsestate,(yyvsp[(1) - (3)]),(yyvsp[(3) - (3)]));;}
break;
case 35:
/* Line 1455 of yacc.c */
#line 144 "../oc/ce.y"
{(yyval)=value(parsestate,(yyvsp[(1) - (1)]),SCAN_WORD);;}
break;
case 36:
/* Line 1455 of yacc.c */
#line 146 "../oc/ce.y"
{(yyval)=value(parsestate,(yyvsp[(1) - (1)]),SCAN_NUMBERCONST);;}
break;
case 37:
/* Line 1455 of yacc.c */
#line 148 "../oc/ce.y"
{(yyval)=value(parsestate,(yyvsp[(1) - (1)]),SCAN_STRINGCONST);;}
break;
case 38:
/* Line 1455 of yacc.c */
#line 153 "../oc/ce.y"
{(yyval)=(Object)ST_EQ;;}
break;
case 39:
/* Line 1455 of yacc.c */
#line 154 "../oc/ce.y"
{(yyval)=(Object)ST_GT;;}
break;
case 40:
/* Line 1455 of yacc.c */
#line 155 "../oc/ce.y"
{(yyval)=(Object)ST_LT;;}
break;
case 41:
/* Line 1455 of yacc.c */
#line 156 "../oc/ce.y"
{(yyval)=(Object)ST_NEQ;;}
break;
case 42:
/* Line 1455 of yacc.c */
#line 157 "../oc/ce.y"
{(yyval)=(Object)ST_RE;;}
break;
case 43:
/* Line 1455 of yacc.c */
#line 158 "../oc/ce.y"
{(yyval)=(Object)ST_GE;;}
break;
case 44:
/* Line 1455 of yacc.c */
#line 159 "../oc/ce.y"
{(yyval)=(Object)ST_LE;;}
break;
case 45:
/* Line 1455 of yacc.c */
#line 165 "../oc/ce.y"
{(yyval)=arrayelement(parsestate,(yyvsp[(1) - (1)]),null);;}
break;
case 46:
/* Line 1455 of yacc.c */
#line 167 "../oc/ce.y"
{(yyval)=arrayelement(parsestate,(yyvsp[(1) - (2)]),(yyvsp[(2) - (2)]));;}
break;
case 47:
/* Line 1455 of yacc.c */
#line 171 "../oc/ce.y"
{(yyval) = (yyvsp[(1) - (1)]);;}
break;
case 48:
/* Line 1455 of yacc.c */
#line 175 "../oc/ce.y"
{ unsigned long tmp = 0;
if(sscanf((char*)(yyvsp[(1) - (1)]),"%lu",&tmp) != 1) {
@ -1627,23 +1720,30 @@ yyreduce:
break;
case 49:
/* Line 1455 of yacc.c */
#line 184 "../oc/ce.y"
{(yyval) = (yyvsp[(1) - (1)]);;}
break;
case 50:
/* Line 1455 of yacc.c */
#line 188 "../oc/ce.y"
{(yyval) = (yyvsp[(1) - (1)]);;}
break;
case 51:
/* Line 1455 of yacc.c */
#line 192 "../oc/ce.y"
{(yyval) = (yyvsp[(1) - (1)]);;}
break;
/* Line 1267 of yacc.c. */
#line 1647 "ce.tab.c"
/* Line 1455 of yacc.c */
#line 1747 "ce.tab.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
@ -1654,7 +1754,6 @@ yyreduce:
*++yyvsp = yyval;
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
@ -1719,7 +1818,7 @@ yyerrlab:
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse look-ahead token after an
/* If just tried and failed to reuse lookahead token after an
error, discard it. */
if (yychar <= YYEOF)
@ -1736,7 +1835,7 @@ yyerrlab:
}
}
/* Else will try to reuse look-ahead token after shifting the error
/* Else will try to reuse lookahead token after shifting the error
token. */
goto yyerrlab1;
@ -1793,9 +1892,6 @@ yyerrlab1:
YY_STACK_PRINT (yyss, yyssp);
}
if (yyn == YYFINAL)
YYACCEPT;
*++yyvsp = yylval;
@ -1820,7 +1916,7 @@ yyabortlab:
yyresult = 1;
goto yyreturn;
#ifndef yyoverflow
#if !defined(yyoverflow) || YYERROR_VERBOSE
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
@ -1831,7 +1927,7 @@ yyexhaustedlab:
#endif
yyreturn:
if (yychar != YYEOF && yychar != YYEMPTY)
if (yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, parsestate);
/* Do not reclaim the symbols of the rule which action triggered
@ -1857,6 +1953,8 @@ yyreturn:
}
/* Line 1675 of yacc.c */
#line 195 "../oc/ce.y"

View File

@ -1,14 +1,15 @@
/* A Bison parser, made by GNU Bison 2.3. */
/* A Bison parser, made by GNU Bison 2.4.1. */
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
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 +17,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,6 +32,7 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
@ -44,20 +44,16 @@
SCAN_NUMBERCONST = 260
};
#endif
/* Tokens. */
#define SCAN_WORD 258
#define SCAN_STRINGCONST 259
#define SCAN_NUMBERCONST 260
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif

View File

@ -306,7 +306,7 @@ int main()
#ifdef USE_NETCDF4
CHECK(nc_inq_varid(ncid, "b", &varid));
CHECK(nc_get_var_ubyte(ncid,varid,uint8));
CHECK(nc_get_var_uchar(ncid,varid,uint8));
#ifdef GENERATE
printf("static %s ubyte_data[DIMSIZE]={","unsigned char");
for(i=0;i<DIMSIZE;i++) printf("%s%hhu",COMMA,uint8[i]);

View File

@ -357,7 +357,7 @@ main(int argc, char **argv)
if (nc_put_var_int(ncid, int_varid, (int *)int_out)) ERR;
if (nc_put_var_float(ncid, float_varid, (float *)float_out)) ERR;
if (nc_put_var_double(ncid, double_varid, (double *)double_out)) ERR;
if (nc_put_var_ubyte(ncid, ubyte_varid, (unsigned char *)ubyte_out)) ERR;
if (nc_put_var_uchar(ncid, ubyte_varid, (unsigned char *)ubyte_out)) ERR;
if (nc_put_var_ushort(ncid, ushort_varid, (unsigned short *)ushort_out)) ERR;
if (nc_put_var_uint(ncid, uint_varid, (unsigned int *)uint_out)) ERR;
if (nc_put_var_longlong(ncid, int64_varid, (long long *)int64_out)) ERR;
@ -614,7 +614,7 @@ main(int argc, char **argv)
if (nc_put_var_int(ncid, int_varid, (int *)int_out)) ERR;
if (nc_put_var_float(ncid, float_varid, (float *)float_out)) ERR;
if (nc_put_var_double(ncid, double_varid, (double *)double_out)) ERR;
if (nc_put_var_ubyte(ncid, ubyte_varid, (unsigned char *)ubyte_out)) ERR;
if (nc_put_var_uchar(ncid, ubyte_varid, (unsigned char *)ubyte_out)) ERR;
if (nc_put_var_ushort(ncid, ushort_varid, (unsigned short *)ushort_out)) ERR;
if (nc_put_var_uint(ncid, uint_varid, (unsigned int *)uint_out)) ERR;
if (nc_put_var_longlong(ncid, int64_varid, (long long *)int64_out)) ERR;

View File

@ -165,10 +165,10 @@ int main(int argc, char *argv[])
count[0] = 2;
stride[0] = STRIDE_SIZE;
if ((res = nc_put_vars_ubyte(ncid, varid[0], start, count,
if ((res = nc_put_vars_uchar(ncid, varid[0], start, count,
stride, ubyte_data_out)))
BAIL(res);
if ((res = nc_get_vars_ubyte(ncid, varid[0], start, count,
if ((res = nc_get_vars_uchar(ncid, varid[0], start, count,
stride, ubyte_data_in)))
BAIL(res);
if (ubyte_data_in[0] != ubyte_data_out[0]) ERR;
@ -232,9 +232,9 @@ int main(int argc, char *argv[])
start[0] = 0;
count[0] = SIZE;
if ((res = nc_put_vara_ubyte(ncid, varid[0], start, count, ubyte_data_out)))
if ((res = nc_put_vara_uchar(ncid, varid[0], start, count, ubyte_data_out)))
BAIL(res);
if ((res = nc_get_vara_ubyte(ncid, varid[0], start, count, ubyte_data_in)))
if ((res = nc_get_vara_uchar(ncid, varid[0], start, count, ubyte_data_in)))
BAIL(res);
for (i=0; i<SIZE; i++)
if (ubyte_data_in[i] != ubyte_data_out[i]) ERR;
@ -286,11 +286,11 @@ int main(int argc, char *argv[])
errors = 0;
index1[0] = 0;
if ((res = nc_put_var1_ubyte(ncid, varid[0], index1, ubyte_data_out)))
if ((res = nc_put_var1_uchar(ncid, varid[0], index1, uchar_data_out)))
BAIL(res);
if ((res = nc_get_var1_ubyte(ncid, varid[0], index1, ubyte_data_in)))
if ((res = nc_get_var1_uchar(ncid, varid[0], index1, uchar_data_in)))
BAIL(res);
if (ubyte_data_in[0] != ubyte_data_out[0]) ERR;
if (uchar_data_in[0] != uchar_data_out[0]) ERR;
if ((res = nc_put_var1_ushort(ncid, varid[1], index1, ushort_data_out)))
BAIL(res);

View File

@ -306,7 +306,7 @@ int main()
#ifdef USE_NETCDF4
CHECK(nc_inq_varid(ncid, "b", &varid));
CHECK(nc_get_var_ubyte(ncid,varid,uint8));
CHECK(nc_get_var_uchar(ncid,varid,uint8));
#ifdef GENERATE
printf("static %s ubyte_data[DIMSIZE]={","unsigned char");
for(i=0;i<DIMSIZE;i++) printf("%s%hhu",COMMA,uint8[i]);

View File

@ -401,7 +401,7 @@ genbin_defineattr(Symbol* asym,Bytebuffer* databuf)
} break;
case NC_UBYTE: {
unsigned char* data = (unsigned char*)bbContents(databuf);
stat = nc_put_att_ubyte(grpid,varid,asym->name,typid,len,data);
stat = nc_put_att_uchar(grpid,varid,asym->name,typid,len,data);
check_err(stat,__LINE__,__FILE__);
} break;
case NC_USHORT: {

File diff suppressed because it is too large Load Diff