Skip to content

Commit

Permalink
nctest, oc2 files updated.
Browse files Browse the repository at this point in the history
  • Loading branch information
WardF committed Dec 6, 2018
1 parent 7112422 commit 921a217
Show file tree
Hide file tree
Showing 62 changed files with 95 additions and 73 deletions.
6 changes: 6 additions & 0 deletions nctest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
# 2015, 2016, 2017, 2018
# University Corporation for Atmospheric Research/Unidata.

# See netcdf-c/COPYRIGHT file for more info.
SET(nctest_SRC add.c atttests.c cdftests.c dimtests.c driver.c emalloc.c error.c misctest.c rec.c slabs.c val.c vardef.c varget.c vargetg.c varput.c varputg.c vartests.c vputget.c vputgetg.c)

FILE(GLOB COPY_FILES ${CMAKE_CURRENT_SOURCE_DIR}/*.nc ${CMAKE_CURRENT_SOURCE_DIR}/*.sh)
Expand Down
6 changes: 3 additions & 3 deletions nctest/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
## This is a automake file, part of Unidata's netCDF package.
# Copyright 2005, see the COPYRIGHT file for more information.
# Copyright 2018, see the COPYRIGHT file for more information.

# This file builds and runs the nctest program, which tests the netCDF
# version 2 interface.

# Put together AM_CPPFLAGS and AM_LDFLAGS.
include $(top_srcdir)/lib_flags.am

AM_LDFLAGS += ${top_builddir}/liblib/libnetcdf.la
AM_LDFLAGS += ${top_builddir}/liblib/libnetcdf.la

# Running nctest results in a file testfile.nc, which is then checked
# to make sure it matches testfile_nc.sav, which was generated under
Expand All @@ -31,7 +31,7 @@ TESTS = $(TESTPROGRAMS) compare_test_files.sh
TEST_EXTENSIONS = .sh

# compare_test_files depends on nctest executing first.
compare_test_files.log: nctest.log
compare_test_files.log: nctest.log

# These are the source files for the nctest program.
nctest_SOURCES = add.c add.h atttests.c cdftests.c dimtests.c driver.c \
Expand Down
2 changes: 1 addition & 1 deletion nctest/add.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/add.c,v 1.18 2008/06/10 19:38:03 russ Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/add.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/add.h,v 1.6 1996/04/30 17:56:54 davis Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/atttests.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctst/atttests.c,v 1.18 2006/10/31 16:21:45 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/cdftests.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/cdftests.c,v 1.23 2009/02/14 14:11:28 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/dimtests.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/dimtests.c,v 1.14 2006/10/31 16:21:54 ed Exp $
*********************************************************************/
Expand Down
8 changes: 4 additions & 4 deletions nctest/driver.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993-2006, UCAR/Unidata
* Copyright 1993-2018, UCAR/Unidata
* See COPYRIGHT file for copying and redistribution conditions.
*
* Test driver for netCDF implementation. This program performs tests
Expand Down Expand Up @@ -75,10 +75,10 @@ main(int argc, char **argv)
/* Skip netCDF-4 - only netCDF-4 classic will work. */
if (format[i] == NC_FORMAT_NETCDF4)
continue;

/* Come up with a test file name. */
sprintf(testfile, "nctest_%s.nc", format_name[i]);
printf("Testing %s with file %s.\n", format_name[i], testfile);
printf("Testing %s with file %s.\n", format_name[i], testfile);

/* Set the default format. */
nc_set_default_format(format[i], NULL);
Expand Down Expand Up @@ -137,7 +137,7 @@ main(int argc, char **argv)

}
}

fprintf(stderr, "\nTotal number of failures: %d\n", nerrs);

if (nerrs)
Expand Down
2 changes: 1 addition & 1 deletion nctest/emalloc.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/emalloc.c,v 1.11 2006/10/31 16:21:56 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/emalloc.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, University Corporation for Atmospheric Research
* Copyright 2018, University Corporation for Atmospheric Research
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/error.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/error.c,v 1.8 2004/11/16 21:33:07 russ Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/error.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, University Corporation for Atmospheric Research
* Copyright 2018, University Corporation for Atmospheric Research
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/misctest.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/misctest.c,v 1.11 2006/10/31 16:21:57 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/rec.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, University Corporation for Atmospheric Research
* Copyright 2018, University Corporation for Atmospheric Research
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/rec.c,v 1.11 2006/10/31 16:21:58 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/slabs.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/slabs.c,v 1.13 2009/02/11 16:17:39 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/testcdf.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/testcdf.h,v 1.9 2006/10/31 16:23:43 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/tests.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993 - 2005, UCAR/Unidata
* Copyright 1993 - 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/tests.h,v 1.8 2006/10/31 16:23:47 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/tst_rename.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* This is part of the netCDF package.
Copyright 2010 University Corporation for Atmospheric Research/Unidata
Copyright 2018 University Corporation for Atmospheric Research/Unidata
See COPYRIGHT file for conditions of use.
Test dim rename that is causing problems with v2 API.
Expand Down
2 changes: 1 addition & 1 deletion nctest/val.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/val.c,v 1.13 2006/10/31 16:22:01 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/val.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/val.h,v 1.7 2006/10/31 16:23:51 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/vardef.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/vardef.c,v 1.18 2009/10/28 18:30:50 dmh Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/varget.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/varget.c,v 1.14 2006/10/31 16:22:03 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/vargetg.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Id: vargetg.c,v 1.10 2006/10/31 16:22:04 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/varput.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/varput.c,v 1.14 2006/10/31 16:22:05 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/varputg.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Id: varputg.c,v 1.10 2006/10/31 16:22:06 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/vartests.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/vartests.c,v 1.19 2006/10/31 16:20:49 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/vputget.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/nctest/vputget.c,v 1.13 2006/10/31 16:19:49 ed Exp $
*********************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion nctest/vputgetg.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*********************************************************************
* Copyright 1993, UCAR/Unidata
* Copyright 2018, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Id: vputgetg.c,v 1.13 2006/10/31 16:19:40 ed Exp $
*********************************************************************/
Expand Down
6 changes: 6 additions & 0 deletions oc2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Copyright 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014,
# 2015, 2016, 2017, 2018
# University Corporation for Atmospheric Research/Unidata.

# See netcdf-c/COPYRIGHT file for more info.
SET(oc_SOURCES oc.c daplex.c dapparse.c dapy.c occompile.c occurlfunctions.c ocdata.c ocdebug.c ocdump.c ocinternal.c ocnode.c ochttp.c ocread.c ocutil.c xxdr.c)


Expand Down
4 changes: 2 additions & 2 deletions oc2/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## This is a automake file, part of Unidata's netCDF package.
# Copyright 2005, see the COPYRIGHT file for more information.
# Copyright 2018, see the COPYRIGHT file for more information.

# This automake file generates the Makefile to build netCDF-4. The
# generated makefile is not run unless the user selected to build
Expand Down Expand Up @@ -31,7 +31,7 @@ xxdr.h
EXTRA_DIST = dap.y CMakeLists.txt auth.html.in oc.css

noinst_LTLIBRARIES = liboc.la
liboc_la_SOURCES = $(SRC) $(HDRS)
liboc_la_SOURCES = $(SRC) $(HDRS)
liboc_la_CPPFLAGS = $(AM_CPPFLAGS)

# These rule are used if someone wants to rebuild the grammar files.
Expand Down
18 changes: 9 additions & 9 deletions oc2/dap.y
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */

/*The lines down to DO NOT DELETE ... comment are specific to the C Parser.
Expand All @@ -17,7 +17,7 @@ int dapdebug = 0;

/*DO NOT DELETE THIS LINE*/

%token SCAN_ALIAS
%token SCAN_ALIAS
%token SCAN_ARRAY
%token SCAN_ATTR
%token SCAN_BYTE
Expand All @@ -31,14 +31,14 @@ int dapdebug = 0;
%token SCAN_GRID
%token SCAN_INT16
%token SCAN_INT32
%token SCAN_MAPS
%token SCAN_MAPS
%token SCAN_MESSAGE
%token SCAN_SEQUENCE
%token SCAN_STRING
%token SCAN_STRUCTURE
%token SCAN_UINT16
%token SCAN_UINT32
%token SCAN_URL
%token SCAN_URL
/* For errorbody */
%token SCAN_PTYPE
%token SCAN_PROG
Expand Down Expand Up @@ -94,10 +94,10 @@ declaration:
| SCAN_GRID '{' SCAN_ARRAY ':' declaration SCAN_MAPS ':'
declarations '}' var_name ';'
{if(($$=dap_makegrid(parsestate,$10,$5,$8))==null) {YYABORT;}}
| error
| error
{dapsemanticerror(parsestate,OC_EBADTYPE,"Unrecognized type"); YYABORT;}
;


base_type:
SCAN_BYTE {$$=(Object)SCAN_BYTE;}
Expand Down Expand Up @@ -144,7 +144,7 @@ attr_list:
;

attribute:
alias ';' {$$=null;} /* ignored */
alias ';' {$$=null;} /* ignored */
| SCAN_BYTE name bytes ';'
{$$=dap_attribute(parsestate,$2,$3,(Object)SCAN_BYTE);}
| SCAN_INT16 name int16 ';'
Expand All @@ -164,7 +164,7 @@ attribute:
| SCAN_URL name urls ';'
{$$=dap_attribute(parsestate,$2,$3,(Object)SCAN_URL);}
| name '{' attr_list '}' {$$=dap_attrset(parsestate,$1,$3);}
| error
| error
{dapsemanticerror(parsestate,OC_EDAS,"Illegal attribute"); YYABORT;}
;

Expand Down Expand Up @@ -222,7 +222,7 @@ str_or_id:
/* Not used
float_or_int:
WORD_INT {$$=$1;}
| WORD_DOUBLE {$$=$1;}
| WORD_DOUBLE {$$=$1;}
;
*/

Expand Down
2 changes: 1 addition & 1 deletion oc2/daplex.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */

#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion oc2/dapparse.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information.
*/

Expand Down
2 changes: 1 addition & 1 deletion oc2/dapparselex.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */

#ifndef DAPPARSELEX_H
Expand Down
2 changes: 1 addition & 1 deletion oc2/oc.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */

#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion oc2/oc.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2014, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT dap for more information. */

/*
Expand Down
2 changes: 1 addition & 1 deletion oc2/occompile.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */

#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion oc2/occompile.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */

#ifndef OCCOMPILE_H
Expand Down
2 changes: 1 addition & 1 deletion oc2/occonstraints.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */

#ifndef OCCONSTRAINTS_H
Expand Down
2 changes: 1 addition & 1 deletion oc2/occurlflags.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */

#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion oc2/occurlfunctions.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright 2009, UCAR/Unidata and OPeNDAP, Inc.
/* Copyright 2018, UCAR/Unidata and OPeNDAP, Inc.
See the COPYRIGHT file for more information. */

#include "config.h"
Expand Down
Loading

0 comments on commit 921a217

Please sign in to comment.