From 25417880f7b9480eda39fc8a0589b0f7623bdd5a Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Thu, 6 Dec 2018 14:29:57 -0700 Subject: [PATCH] Updated libdispatch/ files with copyright notice. --- libdispatch/CMakeLists.txt | 6 ++++ libdispatch/Makefile.am | 2 +- libdispatch/datt.c | 32 +++++++++--------- libdispatch/dattget.c | 2 +- libdispatch/dattinq.c | 40 +++++++++++----------- libdispatch/dattput.c | 2 +- libdispatch/dauth.c | 4 +-- libdispatch/daux.c | 32 +++++++++--------- libdispatch/dcompound.c | 68 +++++++++++++++++--------------------- libdispatch/dcopy.c | 8 ++--- libdispatch/ddim.c | 2 +- libdispatch/ddispatch.c | 6 ++-- libdispatch/denum.c | 2 +- libdispatch/derror.c | 2 +- libdispatch/dfile.c | 2 +- libdispatch/dfilter.c | 2 +- libdispatch/dgroup.c | 2 +- libdispatch/dinternal.c | 2 +- libdispatch/doffsets.c | 2 +- libdispatch/dopaque.c | 2 +- libdispatch/dparallel.c | 2 +- libdispatch/drc.c | 4 +-- libdispatch/dstring.c | 2 +- libdispatch/dtype.c | 2 +- libdispatch/dutf8.c | 2 +- libdispatch/dutil.c | 2 +- libdispatch/dv2i.c | 2 +- libdispatch/dvar.c | 2 +- libdispatch/dvarget.c | 2 +- libdispatch/dvarput.c | 2 +- libdispatch/dvlen.c | 2 +- libdispatch/dwinpath.c | 2 +- libdispatch/json.c | 16 ++++----- libdispatch/nc.c | 2 +- libdispatch/ncbytes.c | 2 +- libdispatch/nchashmap.c | 2 +- libdispatch/nclist.c | 12 +++---- libdispatch/nclistmgr.c | 5 ++- libdispatch/nclog.c | 2 +- libdispatch/nctime.c | 52 ++++++++++++++--------------- libdispatch/ncuri.c | 2 +- libdispatch/netcdf.m4 | 5 ++- libdispatch/stubdef.c | 2 +- libdispatch/test_ncuri.c | 2 +- libdispatch/test_pathcvt.c | 4 +-- 45 files changed, 175 insertions(+), 179 deletions(-) diff --git a/libdispatch/CMakeLists.txt b/libdispatch/CMakeLists.txt index 9d274464c..133121dc2 100644 --- a/libdispatch/CMakeLists.txt +++ b/libdispatch/CMakeLists.txt @@ -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(libdispatch_SOURCES dparallel.c dcopy.c dfile.c ddim.c datt.c dattinq.c dattput.c dattget.c derror.c dvar.c dvarget.c dvarput.c dvarinq.c ddispatch.c nclog.c dstring.c dutf8.c dinternal.c doffsets.c ncuri.c nclist.c ncbytes.c nchashmap.c nctime.c nc.c nclistmgr.c utf8proc.h utf8proc.c dwinpath.c dutil.c drc.c dauth.c dreadonly.c dnotnc4.c dnotnc3.c crc32.c daux.c) IF(USE_NETCDF4) diff --git a/libdispatch/Makefile.am b/libdispatch/Makefile.am index 9633bda48..613bf27e0 100644 --- a/libdispatch/Makefile.am +++ b/libdispatch/Makefile.am @@ -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 2008, see the COPYRIGHT file for more information. # This Makefile controls the building of the dispatch layer of the # netCDF library. The dispatch layer decides whether to call the diff --git a/libdispatch/datt.c b/libdispatch/datt.c index 9a9df359a..d9896ed5e 100644 --- a/libdispatch/datt.c +++ b/libdispatch/datt.c @@ -1,6 +1,6 @@ /** \file -Copyright 2010 University Corporation for Atmospheric -Research/Unidata. See \ref copyright file for more info. +Copyright 2018 University Corporation for Atmospheric +Research/Unidata. See \ref copyright file for more info. These functions read and write attributes. */ @@ -22,7 +22,7 @@ created, while the netCDF dataset is in define mode. Additional attributes may be added later by reentering define mode. A netCDF attribute has a netCDF variable to which it is assigned, a -name, a type, a length, and a sequence of one or more values. +name, a type, a length, and a sequence of one or more values. An attribute is designated by its variable ID and name. When an attribute name is not known, it may be designated by its variable ID @@ -50,7 +50,7 @@ Operations supported on attributes are: - Copy attribute from one netCDF variable to another. - Get name of attribute from its number. - Rename an attribute. -- Delete an attribute. +- Delete an attribute. */ /*! \{*/ /* All these functions are part of the above defgroup... */ @@ -69,16 +69,16 @@ new name is longer than the original name, the netCDF dataset must be in define mode. You cannot rename an attribute to have the same name as another attribute of the same variable. -\param ncid NetCDF or group ID, from a previous call to nc_open(), -nc_create(), nc_def_grp(), or associated inquiry functions such as +\param ncid NetCDF or group ID, from a previous call to nc_open(), +nc_create(), nc_def_grp(), or associated inquiry functions such as nc_inq_ncid(). \param varid Variable ID of the attribute's variable, or ::NC_GLOBAL for a global attribute. -\param name Attribute \ref object_name. +\param name Attribute \ref object_name. -\param newname The new attribute \ref object_name. +\param newname The new attribute \ref object_name.

Example

@@ -90,8 +90,8 @@ dataset named foo.nc: #include ... int status; - int ncid; - int rh_id; + int ncid; + int rh_id; ... status = nc_open("foo.nc", NC_NOWRITE, &ncid); if (status != NC_NOERR) handle_error(status); @@ -134,13 +134,13 @@ The function nc_del_att() deletes a netCDF attribute from an open netCDF dataset. The netCDF dataset must be in define mode. \param ncid NetCDF or group ID, from a previous call to nc_open(), -nc_create(), nc_def_grp(), or associated inquiry functions such as +nc_create(), nc_def_grp(), or associated inquiry functions such as nc_inq_ncid(). \param varid Variable ID of the attribute's variable, or ::NC_GLOBAL for a global attribute. -\param name Attribute name. +\param name Attribute name.

Example

@@ -150,9 +150,9 @@ Units for a variable rh in an existing netCDF dataset named foo.nc: \code #include ... - int status; - int ncid; - int rh_id; + int status; + int ncid; + int rh_id; ... status = nc_open("foo.nc", NC_WRITE, &ncid); if (status != NC_NOERR) handle_error(status); @@ -160,7 +160,7 @@ Units for a variable rh in an existing netCDF dataset named foo.nc: status = nc_inq_varid (ncid, "rh", &rh_id); if (status != NC_NOERR) handle_error(status); ... - status = nc_redef(ncid); + status = nc_redef(ncid); if (status != NC_NOERR) handle_error(status); status = nc_del_att(ncid, rh_id, "Units"); if (status != NC_NOERR) handle_error(status); diff --git a/libdispatch/dattget.c b/libdispatch/dattget.c index 969c7bd3d..13a957559 100644 --- a/libdispatch/dattget.c +++ b/libdispatch/dattget.c @@ -3,7 +3,7 @@ Attribute functions These functions read and write attributes. -Copyright 2010 University Corporation for Atmospheric +Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ #include "ncdispatch.h" diff --git a/libdispatch/dattinq.c b/libdispatch/dattinq.c index e5acab0d0..025d5c8b7 100644 --- a/libdispatch/dattinq.c +++ b/libdispatch/dattinq.c @@ -3,7 +3,7 @@ Attribute inquiry functions These functions find out about attributes. -Copyright 2011 University Corporation for Atmospheric +Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ #include "ncdispatch.h" @@ -20,7 +20,7 @@ Return information about a netCDF attribute. The function nc_inq_att returns the attribute's type and length. \param ncid NetCDF or group ID, from a previous call to nc_open(), -nc_create(), nc_def_grp(), or associated inquiry functions such as +nc_create(), nc_def_grp(), or associated inquiry functions such as nc_inq_ncid(). \param varid Variable ID of the attribute's variable, or ::NC_GLOBAL @@ -49,12 +49,12 @@ foo.nc: \code #include ... - int status; - int ncid; - int rh_id; - nc_type vr_type, t_type; - size_t vr_len, t_len; - + int status; + int ncid; + int rh_id; + nc_type vr_type, t_type; + size_t vr_len, t_len; + ... status = nc_open("foo.nc", NC_NOWRITE, &ncid); if (status != NC_NOERR) handle_error(status); @@ -80,7 +80,7 @@ foo.nc: \author Glenn Davis, Ed Hartnett, Dennis Heimbigner */ int -nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, +nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, size_t *lenp) { NC* ncp; @@ -94,13 +94,13 @@ nc_inq_att(int ncid, int varid, const char *name, nc_type *xtypep, Find an attribute ID. \param ncid NetCDF or group ID, from a previous call to nc_open(), -nc_create(), nc_def_grp(), or associated inquiry functions such as +nc_create(), nc_def_grp(), or associated inquiry functions such as nc_inq_ncid(). \param varid Variable ID of the attribute's variable, or ::NC_GLOBAL for a global attribute. -\param name Attribute \ref object_name. +\param name Attribute \ref object_name. \param idp Pointer to location for returned attribute number that specifies which attribute this is for this variable (or which global @@ -171,7 +171,7 @@ nc_inq_attid(int ncid, int varid, const char *name, int *idp) Find the name of an attribute. \param ncid NetCDF or group ID, from a previous call to nc_open(), -nc_create(), nc_def_grp(), or associated inquiry functions such as +nc_create(), nc_def_grp(), or associated inquiry functions such as nc_inq_ncid(). \param varid Variable ID of the attribute's variable, or ::NC_GLOBAL @@ -183,7 +183,7 @@ number of attributes for the variable, as returned from a call to nc_inq_varnatts(). \param name Pointer to the location for the returned attribute \ref -object_name. +object_name. \section nc_inq_attname_example Example @@ -263,7 +263,7 @@ nc_inq_attname(int ncid, int varid, int attnum, char *name) Find number of global or group attributes. \param ncid NetCDF or group ID, from a previous call to nc_open(), -nc_create(), nc_def_grp(), or associated inquiry functions such as +nc_create(), nc_def_grp(), or associated inquiry functions such as nc_inq_ncid(). \param nattsp Pointer where number of global or group attributes will be @@ -271,7 +271,7 @@ written. \ref ignored_if_null. \section nc_inq_natts_example Example -Here is an example from +Here is an example from \code @@ -311,13 +311,13 @@ nc_inq_natts(int ncid, int *nattsp) Find the type of an attribute. \param ncid NetCDF or group ID, from a previous call to nc_open(), -nc_create(), nc_def_grp(), or associated inquiry functions such as +nc_create(), nc_def_grp(), or associated inquiry functions such as nc_inq_ncid(). \param varid Variable ID of the attribute's variable, or ::NC_GLOBAL for a global or group attribute. -\param name Attribute \ref object_name. +\param name Attribute \ref object_name. \param xtypep Pointer to location for returned attribute \ref data_type. @@ -368,17 +368,17 @@ nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep) Find the length of an attribute. \param ncid NetCDF or group ID, from a previous call to nc_open(), -nc_create(), nc_def_grp(), or associated inquiry functions such as +nc_create(), nc_def_grp(), or associated inquiry functions such as nc_inq_ncid(). \param varid Variable ID of the attribute's variable, or ::NC_GLOBAL for a global or group attribute. -\param name Attribute \ref object_name. +\param name Attribute \ref object_name. \param lenp Pointer to location for returned number of values currently stored in the attribute. Before using the value as a C -string, make sure it is null-terminated. \ref ignored_if_null. +string, make sure it is null-terminated. \ref ignored_if_null. \section nc_inq_attlen_example Example diff --git a/libdispatch/dattput.c b/libdispatch/dattput.c index dcc5f2e6c..1a43b5232 100644 --- a/libdispatch/dattput.c +++ b/libdispatch/dattput.c @@ -3,7 +3,7 @@ Functions to write attributes. These functions read and write attributes. -Copyright 2010 University Corporation for Atmospheric +Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ #include "ncdispatch.h" diff --git a/libdispatch/dauth.c b/libdispatch/dauth.c index 914ad6ab4..0d1085901 100644 --- a/libdispatch/dauth.c +++ b/libdispatch/dauth.c @@ -1,6 +1,6 @@ /* -Copyright (c) 1998-2017 University Corporation for Atmospheric Research/Unidata -See LICENSE.txt for license information. +Copyright (c) 1998-2018 University Corporation for Atmospheric Research/Unidata +See COPYRIGHT for license information. */ diff --git a/libdispatch/daux.c b/libdispatch/daux.c index 1f7b40ba5..b57d4f6a1 100644 --- a/libdispatch/daux.c +++ b/libdispatch/daux.c @@ -1,6 +1,6 @@ /* -Copyright (c) 1998-2017 University Corporation for Atmospheric Research/Unidata -See LICENSE.txt for license information. +Copyright (c) 1998-2018 University Corporation for Atmospheric Research/Unidata +See COPYRIGHT for license information. */ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * @@ -31,7 +31,7 @@ struct NCAUX_FIELD { char* name; nc_type fieldtype; size_t ndims; - int dimsizes[NC_MAX_VAR_DIMS]; + int dimsizes[NC_MAX_VAR_DIMS]; size_t size; size_t offset; size_t alignment; @@ -96,7 +96,7 @@ ncaux_reclaim_data(int ncid, int xtype, void* memory, size_t count) size_t typesize = 0; size_t i; Position offset; - + if(ncid < 0 || xtype < 0 || (memory == NULL && count > 0) || xtype == NC_NAT) @@ -110,7 +110,7 @@ ncaux_reclaim_data(int ncid, int xtype, void* memory, size_t count) if((stat=reclaim_datar(ncid,xtype,typesize,&offset))) /* reclaim one instance */ break; } - + done: return stat; } @@ -120,7 +120,7 @@ static int reclaim_datar(int ncid, int xtype, size_t typesize, Position* offset) { int stat = NC_NOERR; - + switch (xtype) { case NC_CHAR: case NC_BYTE: case NC_UBYTE: case NC_SHORT: case NC_USHORT: @@ -147,7 +147,7 @@ reclaim_datar(int ncid, int xtype, size_t typesize, Position* offset) } return stat; } - + #ifdef USE_NETCDF4 static ptrdiff_t @@ -162,7 +162,7 @@ static int reclaim_usertype(int ncid, int xtype, Position* offset) { int stat = NC_NOERR; - size_t size; + size_t size; nc_type basetype; size_t nfields; int klass; @@ -250,7 +250,7 @@ reclaim_compound(int ncid, int xtype, size_t cmpdsize, size_t nfields, Position* for(i=0;ioffset = saveoffset; @@ -278,13 +278,13 @@ ncaux_begin_compound(int ncid, const char *name, int alignmode, void** tagp) struct NCAUX_CMPD* cmpd = NULL; if(tagp) *tagp = NULL; - + cmpd = (struct NCAUX_CMPD*)calloc(1,sizeof(struct NCAUX_CMPD)); if(cmpd == NULL) {status = NC_ENOMEM; goto fail;} cmpd->ncid = ncid; cmpd->mode = alignmode; cmpd->nfields = 0; - cmpd->name = strdup(name); + cmpd->name = strdup(name); if(cmpd->name == NULL) {status = NC_ENOMEM; goto fail;} if(tagp) { @@ -350,7 +350,7 @@ ncaux_add_field(void* tag, const char *name, nc_type field_type, field = &cmpd->fields[cmpd->nfields+1]; field->name = strdup(name); field->fieldtype = field_type; - if(field->name == NULL) {status = NC_ENOMEM; goto done;} + if(field->name == NULL) {status = NC_ENOMEM; goto done;} field->ndims = (size_t)ndims; memcpy(field->dimsizes,dimsizes,sizeof(int)*field->ndims); cmpd->nfields++; @@ -458,7 +458,7 @@ findfirstfield(int ncid, nc_type xtype) int status = NC_NOERR; nc_type fieldtype = xtype; if(xtype <= NC_MAX_ATOMIC_TYPE) goto done; - + status = nc_inq_compound_fieldtype(ncid, xtype, 0, &fieldtype); if(status != NC_NOERR) goto done; fieldtype = findfirstfield(ncid,fieldtype); @@ -494,7 +494,7 @@ computefieldinfo(struct NCAUX_CMPD* cmpd) /* Assign the sizes for the fields */ for(i=0;infields;i++) { - struct NCAUX_FIELD* field = &cmpd->fields[i]; + struct NCAUX_FIELD* field = &cmpd->fields[i]; status = nc_inq_type(cmpd->ncid,field->fieldtype,NULL,&field->size); if(status != NC_NOERR) goto done; totaldimsize = dimproduct(field->ndims,field->dimsizes); @@ -513,7 +513,7 @@ computefieldinfo(struct NCAUX_CMPD* cmpd) break; case NC_ENUM: field->alignment = ncaux_type_alignment(firsttype,cmpd->ncid); - break; + break; case NC_VLEN: /*fall thru*/ case NC_COMPOUND: field->alignment = ncaux_type_alignment(firsttype,cmpd->ncid); @@ -535,5 +535,3 @@ done: } #endif /*USE_NETCDF4*/ - - diff --git a/libdispatch/dcompound.c b/libdispatch/dcompound.c index 902f0a9e6..2399cc741 100644 --- a/libdispatch/dcompound.c +++ b/libdispatch/dcompound.c @@ -1,7 +1,7 @@ /*! \file Functions for Compound Types - Copyright 2011 University Corporation for Atmospheric + Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ #include "ncdispatch.h" @@ -21,9 +21,9 @@ nc_insert_compound(). Call nc_insert_compound() once for each field you wish to insert into the compound type. \param ncid \ref ncid -\param size The size, in bytes, of the compound type. +\param size The size, in bytes, of the compound type. \param name \ref object_name of the created type. -\param typeidp The type ID of the new type is copied here. +\param typeidp The type ID of the new type is copied here. \returns ::NC_NOERR No error. \returns ::NC_EBADID Bad \ref ncid. @@ -35,7 +35,7 @@ you wish to insert into the compound type. \returns ::NC_ENOTNC4 This file was created with the strict netcdf-3 flag, therefore netcdf-4 operations are not allowed. (see nc_open). \returns ::NC_EHDFERR An error was reported by the HDF5 layer. \returns ::NC_EPERM Attempt to write to a read-only file. -\returns ::NC_ENOTINDEFINE Not in define mode. +\returns ::NC_ENOTINDEFINE Not in define mode. \section nc_def_compound_example Example @@ -46,7 +46,7 @@ int i1; int i2; }; struct s1 data[DIM_LEN], data_in[DIM_LEN]; - + if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR; if (nc_def_compound(ncid, sizeof(struct s1), SVC_REC, &typeid)) ERR; if (nc_insert_compound(ncid, typeid, BATTLES_WITH_KLINGONS, @@ -60,7 +60,7 @@ if (nc_close(ncid)) ERR; \endcode */ int -nc_def_compound(int ncid, size_t size, const char *name, +nc_def_compound(int ncid, size_t size, const char *name, nc_type *typeidp) { NC* ncp; @@ -82,7 +82,7 @@ nc_def_compound(), or nc_inq_var(). \param offset Offset in byte from the beginning of the compound type for this field. -\param field_typeid The type of the field to be inserted. +\param field_typeid The type of the field to be inserted. \returns ::NC_NOERR No error. \returns ::NC_EBADID Bad \ref ncid. @@ -93,10 +93,10 @@ for this field. \returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. \returns ::NC_EPERM Attempt to write to a read-only file. -\returns ::NC_ENOTINDEFINE Not in define mode. +\returns ::NC_ENOTINDEFINE Not in define mode. */ int -nc_insert_compound(int ncid, nc_type xtype, const char *name, +nc_insert_compound(int ncid, nc_type xtype, const char *name, size_t offset, nc_type field_typeid) { NC *ncp; @@ -119,7 +119,7 @@ nc_def_compound(), or nc_inq_var(). \param offset Offset in byte from the beginning of the compound type for this field. -\param field_typeid The type of the field to be inserted. +\param field_typeid The type of the field to be inserted. \param ndims Number of dimensions in array. @@ -135,11 +135,11 @@ for this field. \returns ::NC_ENOTNC4 Not an netCDF-4 file, or classic model enabled. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. \returns ::NC_EPERM Attempt to write to a read-only file. -\returns ::NC_ENOTINDEFINE Not in define mode. +\returns ::NC_ENOTINDEFINE Not in define mode. */ int -nc_insert_array_compound(int ncid, nc_type xtype, const char *name, - size_t offset, nc_type field_typeid, +nc_insert_array_compound(int ncid, nc_type xtype, const char *name, + size_t offset, nc_type field_typeid, int ndims, const int *dim_sizes) { NC* ncp; @@ -172,7 +172,7 @@ placed here. \ref ignored_if_null. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. */ int -nc_inq_compound(int ncid, nc_type xtype, char *name, +nc_inq_compound(int ncid, nc_type xtype, char *name, size_t *sizep, size_t *nfieldsp) { int class = 0; @@ -206,7 +206,7 @@ nc_inq_compound_name(int ncid, nc_type xtype, char *name) } /** \ingroup user_types -Learn the size of a compound type. +Learn the size of a compound type. \param ncid \ref ncid @@ -229,7 +229,7 @@ nc_inq_compound_size(int ncid, nc_type xtype, size_t *sizep) } /** \ingroup user_types -Learn the number of fields in a compound type. +Learn the number of fields in a compound type. \param ncid \ref ncid @@ -252,7 +252,7 @@ nc_inq_compound_nfields(int ncid, nc_type xtype, size_t *nfieldsp) } /** \ingroup user_types -Get information about one of the fields of a compound type. +Get information about one of the fields of a compound type. \param ncid \ref ncid @@ -284,9 +284,9 @@ field. \ref ignored_if_null. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. */ int -nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, - char *name, size_t *offsetp, - nc_type *field_typeidp, int *ndimsp, +nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, + char *name, size_t *offsetp, + nc_type *field_typeidp, int *ndimsp, int *dim_sizesp) { NC* ncp; @@ -298,7 +298,7 @@ nc_inq_compound_field(int ncid, nc_type xtype, int fieldid, } /** \ingroup user_types -Get information about one of the fields of a compound type. +Get information about one of the fields of a compound type. \param ncid \ref ncid @@ -318,7 +318,7 @@ ignored_if_null. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. */ int -nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid, +nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid, char *name) { NC* ncp; @@ -330,7 +330,7 @@ nc_inq_compound_fieldname(int ncid, nc_type xtype, int fieldid, } /** \ingroup user_types -Get information about one of the fields of a compound type. +Get information about one of the fields of a compound type. \param ncid \ref ncid @@ -350,7 +350,7 @@ ignored_if_null. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. */ int -nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid, +nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid, size_t *offsetp) { NC* ncp; @@ -360,7 +360,7 @@ nc_inq_compound_fieldoffset(int ncid, nc_type xtype, int fieldid, } /** \ingroup user_types -Get information about one of the fields of a compound type. +Get information about one of the fields of a compound type. \param ncid \ref ncid @@ -380,7 +380,7 @@ field. \ref ignored_if_null. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. */ int -nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid, +nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid, nc_type *field_typeidp) { NC* ncp; @@ -390,7 +390,7 @@ nc_inq_compound_fieldtype(int ncid, nc_type xtype, int fieldid, } /** \ingroup user_types -Get information about one of the fields of a compound type. +Get information about one of the fields of a compound type. \param ncid \ref ncid @@ -410,7 +410,7 @@ field. \ref ignored_if_null. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. */ int -nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid, +nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid, int *ndimsp) { NC* ncp; @@ -420,7 +420,7 @@ nc_inq_compound_fieldndims(int ncid, nc_type xtype, int fieldid, } /** \ingroup user_types -Get information about one of the fields of a compound type. +Get information about one of the fields of a compound type. \param ncid \ref ncid @@ -440,7 +440,7 @@ field. \ref ignored_if_null. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. */ int -nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid, +nc_inq_compound_fielddim_sizes(int ncid, nc_type xtype, int fieldid, int *dim_sizesp) { NC *ncp; @@ -472,7 +472,7 @@ field. \ref ignored_if_null. \returns ::NC_EHDFERR An error was reported by the HDF5 layer. */ int -nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name, +nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name, int *fieldidp) { NC* ncp; @@ -481,9 +481,3 @@ nc_inq_compound_fieldindex(int ncid, nc_type xtype, const char *name, return ncp->dispatch->inq_compound_fieldindex(ncid,xtype,name,fieldidp); } /*! \} */ /* End of named group ...*/ - - - - - - diff --git a/libdispatch/dcopy.c b/libdispatch/dcopy.c index 0c73c40bd..8ef13cb48 100644 --- a/libdispatch/dcopy.c +++ b/libdispatch/dcopy.c @@ -1,6 +1,6 @@ /** * @file - * Copyright 2010 University Corporation for Atmospheric + * Copyright 2018 University Corporation for Atmospheric * Research/Unidata. See COPYRIGHT file for more info. * * This file has the var and att copy functions. @@ -13,7 +13,7 @@ #ifdef USE_NETCDF4 /** * @internal Compare two netcdf types for equality. Must have the - * ncids as well, to find user-defined types. + * ncids as well, to find user-defined types. * * @param ncid1 File ID. * @param typeid1 Type ID. @@ -152,7 +152,7 @@ NC_compare_nc_types(int ncid1, int typeid1, int ncid2, int typeid2, /** * @internal Recursively hunt for a netCDF type id. (Code from - * nc4internal.c); Return matching typeid or 0 if not found. + * nc4internal.c); Return matching typeid or 0 if not found. * * @param ncid1 File ID. * @param tid1 Type ID. @@ -226,7 +226,7 @@ NC_rec_find_nc_type(int ncid1, nc_type tid1, int ncid2, nc_type* tid2) /** * @internal Given a type in one file, find its equal (if any) in - * another file. It sounds so simple, but it's a real pain! + * another file. It sounds so simple, but it's a real pain! * * @param ncid1 File ID. * @param xtype1 Type ID. diff --git a/libdispatch/ddim.c b/libdispatch/ddim.c index 93e736406..4abcc4e38 100644 --- a/libdispatch/ddim.c +++ b/libdispatch/ddim.c @@ -3,7 +3,7 @@ Dimension functions These functions define and inquire about dimensions. -Copyright 2010 University Corporation for Atmospheric +Copyright 2018 University Corporation for Atmospheric Research/Unidata. See COPYRIGHT file for more info. */ diff --git a/libdispatch/ddispatch.c b/libdispatch/ddispatch.c index 1da5846ca..06359bc12 100644 --- a/libdispatch/ddispatch.c +++ b/libdispatch/ddispatch.c @@ -1,5 +1,5 @@ /* -Copyright (c) 1998-2017 University Corporation for Atmospheric Research/Unidata +Copyright (c) 1998-2018 University Corporation for Atmospheric Research/Unidata See LICENSE.txt for license information. */ @@ -212,7 +212,7 @@ NC_urlmodel(const char* path, int mode, char** newurl) found = 1; break; } - } + } if(found) { model = protolist->model; /* Substitute the protocol in any case */ @@ -231,7 +231,7 @@ NC_urlmodel(const char* path, int mode, char** newurl) model = NC_FORMATX_DAP2; else if((match=ncurilookup(url,"dap4")) != NULL || strcmp(proto,"dap4") == 0) model = NC_FORMATX_DAP4; - else + else model = 0; /* Still don't know */ } if(model == 0) {/* Last resort: use the mode */ diff --git a/libdispatch/denum.c b/libdispatch/denum.c index dc8a2b057..5e482bdb2 100644 --- a/libdispatch/denum.c +++ b/libdispatch/denum.c @@ -1,7 +1,7 @@ /*! \file Functions for Enum Types - Copyright 2011 University Corporation for Atmospheric + Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ #include "ncdispatch.h" diff --git a/libdispatch/derror.c b/libdispatch/derror.c index 6a2b83fc0..b6d066ec1 100644 --- a/libdispatch/derror.c +++ b/libdispatch/derror.c @@ -3,7 +3,7 @@ Error messages and library version. These functions return the library version, and error messages. -Copyright 2010 University Corporation for Atmospheric +Copyright 2018 University Corporation for Atmospheric Research/Unidata. See COPYRIGHT file for more info. */ diff --git a/libdispatch/dfile.c b/libdispatch/dfile.c index 0447cc110..1db561ff3 100644 --- a/libdispatch/dfile.c +++ b/libdispatch/dfile.c @@ -6,7 +6,7 @@ * These functions end up calling functions in one of the dispatch * layers (netCDF-4, dap server, etc). * - * Copyright 2010 University Corporation for Atmospheric + * Copyright 2018 University Corporation for Atmospheric * Research/Unidata. See COPYRIGHT file for more info. */ diff --git a/libdispatch/dfilter.c b/libdispatch/dfilter.c index 8c4360722..e48eddfcb 100644 --- a/libdispatch/dfilter.c +++ b/libdispatch/dfilter.c @@ -1,5 +1,5 @@ /* - * Copyright 1996, University Corporation for Atmospheric Research + * Copyright 2018, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. */ diff --git a/libdispatch/dgroup.c b/libdispatch/dgroup.c index 8b1fe4b44..c6f553680 100644 --- a/libdispatch/dgroup.c +++ b/libdispatch/dgroup.c @@ -1,7 +1,7 @@ /*! \file Functions for netCDF-4 features. -Copyright 2010 University Corporation for Atmospheric +Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ #include "ncdispatch.h" diff --git a/libdispatch/dinternal.c b/libdispatch/dinternal.c index 4783042dc..c94e2f3cc 100644 --- a/libdispatch/dinternal.c +++ b/libdispatch/dinternal.c @@ -1,7 +1,7 @@ /*! \internal Public functions from dispatch table. -Copyright 2010 University Corporation for Atmospheric +Copyright 2018 University Corporation for Atmospheric Research/Unidata. See COPYRIGHT file for more info. */ diff --git a/libdispatch/doffsets.c b/libdispatch/doffsets.c index 0d438c0c8..e366a2d44 100644 --- a/libdispatch/doffsets.c +++ b/libdispatch/doffsets.c @@ -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/ncgen/offsets.c,v 1.1 2009/09/25 18:22:40 dmh Exp $ *********************************************************************/ diff --git a/libdispatch/dopaque.c b/libdispatch/dopaque.c index b9065afe5..3a77e7942 100644 --- a/libdispatch/dopaque.c +++ b/libdispatch/dopaque.c @@ -1,7 +1,7 @@ /*! \file Functions for Opaque Types - Copyright 2011 University Corporation for Atmospheric + Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ #include "ncdispatch.h" diff --git a/libdispatch/dparallel.c b/libdispatch/dparallel.c index 0f3c3a1f4..a62351435 100644 --- a/libdispatch/dparallel.c +++ b/libdispatch/dparallel.c @@ -1,4 +1,4 @@ -/* Copyright 2010 University Corporation for Atmospheric +/* Copyright 2018 University Corporation for Atmospheric Research/Unidata. See COPYRIGHT file for more info. */ /** * @file diff --git a/libdispatch/drc.c b/libdispatch/drc.c index 2f7c5bf25..2ad784472 100644 --- a/libdispatch/drc.c +++ b/libdispatch/drc.c @@ -1,6 +1,6 @@ /* -Copyright (c) 1998-2017 University Corporation for Atmospheric Research/Unidata -See LICENSE.txt for license information. +Copyright (c) 1998-2018 University Corporation for Atmospheric Research/Unidata +See COPYRIGHT for license information. */ #include "config.h" diff --git a/libdispatch/dstring.c b/libdispatch/dstring.c index 2a3cece0d..832e4d8c4 100644 --- a/libdispatch/dstring.c +++ b/libdispatch/dstring.c @@ -1,5 +1,5 @@ /* - * Copyright 1996, University Corporation for Atmospheric Research + * Copyright 2018, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. */ /* $Id: string.c,v 1.76 2010/05/26 21:43:33 dmh Exp $ */ diff --git a/libdispatch/dtype.c b/libdispatch/dtype.c index 82fafb475..3de208c1e 100644 --- a/libdispatch/dtype.c +++ b/libdispatch/dtype.c @@ -1,7 +1,7 @@ /*! \file Functions for User-Defined Types - Copyright 2011 University Corporation for Atmospheric + Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ #include "ncdispatch.h" diff --git a/libdispatch/dutf8.c b/libdispatch/dutf8.c index c7550aa23..f8e0d6b9a 100644 --- a/libdispatch/dutf8.c +++ b/libdispatch/dutf8.c @@ -1,5 +1,5 @@ /* - * Copyright 2017, University Corporation for Atmospheric Research + * Copyright 2018, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. */ diff --git a/libdispatch/dutil.c b/libdispatch/dutil.c index aa52bc7f6..f79575ef3 100644 --- a/libdispatch/dutil.c +++ b/libdispatch/dutil.c @@ -1,5 +1,5 @@ /********************************************************************* - * Copyright 2016, UCAR/Unidata + * Copyright 2018, UCAR/Unidata * See netcdf/COPYRIGHT file for copying and redistribution conditions. *********************************************************************/ diff --git a/libdispatch/dv2i.c b/libdispatch/dv2i.c index c7c05a96d..98b9a6cd6 100644 --- a/libdispatch/dv2i.c +++ b/libdispatch/dv2i.c @@ -1,7 +1,7 @@ /** \file The V2 API Functions. -Copyright 1996, University Corporation for Atmospheric Research +Copyright 2018, University Corporation for Atmospheric Research See \ref copyright file for copying and redistribution conditions. */ diff --git a/libdispatch/dvar.c b/libdispatch/dvar.c index 655667285..50028ac78 100644 --- a/libdispatch/dvar.c +++ b/libdispatch/dvar.c @@ -1102,7 +1102,7 @@ Warning: this function is only defined if the type of the variable is an atomic integer or float type. This function may only be called after the variable is defined, but -before nc_enddef is called. +before nc_enddef is called. @param[in] ncid NetCDF ID, from a previous call to nc_open or nc_create. diff --git a/libdispatch/dvarget.c b/libdispatch/dvarget.c index 8ccf8909d..0a1810809 100644 --- a/libdispatch/dvarget.c +++ b/libdispatch/dvarget.c @@ -1,7 +1,7 @@ /*! \file Functions for getting data from variables. -Copyright 2011 University Corporation for Atmospheric +Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ diff --git a/libdispatch/dvarput.c b/libdispatch/dvarput.c index 86c09e54b..5d43b5921 100644 --- a/libdispatch/dvarput.c +++ b/libdispatch/dvarput.c @@ -1,7 +1,7 @@ /*! \file dvarput.c Functions for writing data to variables. -Copyright 2010 University Corporation for Atmospheric +Copyright 2018 University Corporation for Atmospheric Research/Unidata. See COPYRIGHT file for more info. */ diff --git a/libdispatch/dvlen.c b/libdispatch/dvlen.c index d14ad6972..5236f28cc 100644 --- a/libdispatch/dvlen.c +++ b/libdispatch/dvlen.c @@ -1,7 +1,7 @@ /*! \file Functions for VLEN Types - Copyright 2011 University Corporation for Atmospheric + Copyright 2018 University Corporation for Atmospheric Research/Unidata. See \ref copyright file for more info. */ #include "ncdispatch.h" diff --git a/libdispatch/dwinpath.c b/libdispatch/dwinpath.c index b83ef543c..3bf010fc6 100644 --- a/libdispatch/dwinpath.c +++ b/libdispatch/dwinpath.c @@ -1,5 +1,5 @@ /* - * Copyright 1996, University Corporation for Atmospheric Research + * Copyright 2018, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. */ diff --git a/libdispatch/json.c b/libdispatch/json.c index 4196885d1..2fe194550 100644 --- a/libdispatch/json.c +++ b/libdispatch/json.c @@ -1,11 +1,11 @@ -/* Copyright 2016, UCAR/Unidata. - See the LICENSE file for more information. +/* Copyright 2018, UCAR/Unidata. + See the COPYRIGHT file for more information. */ #ifndef NCJSON_INC #define NCJSON_INC 1 -#define NCJ_DICT 1 +#define NCJ_DICT 1 #define NCJ_LIST 2 #define NCJ_WORD 3 #define NCJ_NUMBER 4 @@ -77,7 +77,7 @@ done: static int NCJyytext(NCJparser* parser, char* start, ptrdiff_t pdlen) { - size_t len = (size_t)pdlen; + size_t len = (size_t)pdlen; if(parser->yytext == NULL) parser->yytext = (char*)malloc(len+1); else @@ -133,13 +133,13 @@ NCJlex(NCJparser* parser) for(;;) { c = *parser->pos++; if(c == NCJ_QUOTE || c == NCJ_NUL) break; - last++; + last++; } if(c == NCJ_NUL) { parser->errno = NCJ_ESTRING; token = NCJ_ERR; goto done; - } + } if(!NCJyytext(parser,start,(next - start))) goto done; token = NCJ_STRING; } else { /* single char token */ @@ -147,7 +147,7 @@ NCJlex(NCJparser* parser) } done: if(parser->errno) token = NCJ_ERR; - return token; + return token; } /* Simple recursive descent */ @@ -174,7 +174,7 @@ NCJparseR(NCJparser* parser, NCjson** listp) default: parser->errno = NCJ_EBADTOKEN; } - return NULL; + return NULL; } static NCjson* diff --git a/libdispatch/nc.c b/libdispatch/nc.c index 9683c7925..3fc129dc8 100644 --- a/libdispatch/nc.c +++ b/libdispatch/nc.c @@ -1,5 +1,5 @@ /* - * Copyright 1996, University Corporation for Atmospheric Research + * Copyright 2018, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. */ diff --git a/libdispatch/ncbytes.c b/libdispatch/ncbytes.c index 7d0aa904c..f5a731ae5 100644 --- a/libdispatch/ncbytes.c +++ b/libdispatch/ncbytes.c @@ -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 diff --git a/libdispatch/nchashmap.c b/libdispatch/nchashmap.c index ff45dcfb4..0a6d8a1ce 100644 --- a/libdispatch/nchashmap.c +++ b/libdispatch/nchashmap.c @@ -1,5 +1,5 @@ /* -Copyright (c) 1998-2017 University Corporation for Atmospheric Research/Unidata +Copyright (c) 1998-2018 University Corporation for Atmospheric Research/Unidata See LICENSE.txt for license information. */ diff --git a/libdispatch/nclist.c b/libdispatch/nclist.c index 679c1b174..c901c78f6 100644 --- a/libdispatch/nclist.c +++ b/libdispatch/nclist.c @@ -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 #include @@ -113,7 +113,7 @@ nclistset(NClist* l, size_t index, void* elem) if(l == NULL) return FALSE; if(!nclistsetalloc(l,index+1)) return FALSE; if(index >= l->length) { - if(!nclistsetlength(l,index+1)) return FALSE; + if(!nclistsetlength(l,index+1)) return FALSE; } l->content[index] = elem; return TRUE; @@ -147,7 +147,7 @@ void* nclistpop(NClist* l) { if(l == NULL || l->length == 0) return NULL; - l->length--; + l->length--; return l->content[l->length]; } @@ -168,7 +168,7 @@ nclistremove(NClist* l, size_t i) elem = l->content[i]; for(i+=1;icontent[i-1] = l->content[i]; l->length--; - return elem; + return elem; } /* Duplicate and return the content (null terminate) */ @@ -212,7 +212,7 @@ nclistelemremove(NClist* l, void* elem) } -/* Extends nclist to include a unique operator +/* Extends nclist to include a unique operator which remove duplicate values; NULL values removed return value is always 1. */ @@ -229,7 +229,7 @@ nclistunique(NClist* l) for(j=i+1;jpath,path)==0) { f = nc_filelist[i]; break; - } + } } } return f; @@ -126,4 +126,3 @@ iterate_NCList(int index, NC** ncp) if(ncp) *ncp = nc_filelist[index]; return NC_NOERR; } - diff --git a/libdispatch/nclog.c b/libdispatch/nclog.c index f43d23dff..4e0adbfd8 100644 --- a/libdispatch/nclog.c +++ b/libdispatch/nclog.c @@ -1,5 +1,5 @@ /********************************************************************* - * Copyright 2010, UCAR/Unidata + * Copyright 2018, UCAR/Unidata * See netcdf/COPYRIGHT file for copying and redistribution conditions. * $Header$ *********************************************************************/ diff --git a/libdispatch/nctime.c b/libdispatch/nctime.c index 07c9b1708..aed5ac984 100644 --- a/libdispatch/nctime.c +++ b/libdispatch/nctime.c @@ -1,10 +1,10 @@ /********************************************************************* - * Copyright 2008, University Corporation for Atmospheric Research + * Copyright 2018, University Corporation for Atmospheric Research * See netcdf/COPYRIGHT file for copying and redistribution conditions. * $Id: nctime.c,v 1.9 2010/05/05 22:15:39 dmh Exp $ *********************************************************************/ -/* +/* * This code was extracted with permission from the CDMS time * conversion and arithmetic routines developed by Bob Drach, Lawrence * Livermore National Laboratory as part of the cdtime library. Russ @@ -58,7 +58,7 @@ static void cdError(char *fmt, ...) { va_list args; - + cuErrorOccurred = 1; if(cuErrOpts & CU_VERBOSE){ va_start(args,fmt); @@ -84,11 +84,11 @@ static int days_sum[12] = {0,31,59,90,120,151,181,212,243,273,304,334}; * date->year (long) (year since 0 BC) * date->timeType (CdTimetype) (time type) * date->baseYear base year for relative times - * Output: - * date->month (short) (month in year) + * Output: + * date->month (short) (month in year) * date->day (short) (day in month) * - * + * * Derived from NRL NEONS V3.6. */ @@ -131,14 +131,14 @@ CdMonthDay(int *doy, CdTime *date) } /* Compute day-of-year from year, month and day - * + * * Input: * date->year (long) (year since 0 BC) * date->month (short) (month in year) * date->day (short) (day in month) * date->baseYear base year for relative times * Output: doy (int) (day-of-year) - * + * * Derived from NRL NEONS V3.6 */ @@ -152,7 +152,7 @@ CdDayOfYear(CdTime *date, int *doy) month = date->month; if (month < 1 || month > 12) { cdError( "Day-of-year error; month: %d\n", month); - month = 1; + month = 1; } if(!(date->timeType & CdChronCal)) /* Ignore year for Clim calendar */ @@ -173,14 +173,14 @@ CdDayOfYear(CdTime *date, int *doy) /* Convert epochal time (hours since 00 jan 1, 1970) * to human time (structured) - * - * Input: + * + * Input: * etime = epochal time representation * timeType = time type (e.g., CdChron, CdClim, etc.) as defined in cdms.h * baseYear = base real, used for relative time types only - * + * * Output: htime = human (structured) time representation - * + * * Derived from NRL Neons V3.6 */ void @@ -404,7 +404,7 @@ cdDiffGregorian(cdCompTime ca, cdCompTime cb){ /* Return -1, 0, 1 as ca is less than, equal to, */ /* or greater than cb, respectively. */ -static int +static int cdCompCompare(cdCompTime ca, cdCompTime cb){ int test; @@ -469,7 +469,7 @@ CdDivDelTime(double begEtm, double endEtm, CdDeltaTime delTime, CdTimeType timeT long delMonths, range; CdTime bhtime, ehtime; int hoursInYear; - + extern void Cde2h(double etime, CdTimeType timeType, long baseYear, CdTime *htime); switch(delTime.units){ @@ -610,11 +610,11 @@ cdToOldTimetype(cdCalenType newtype, CdTimeType* oldtype) } /* Convert human time to epochal time (hours since 00 jan 1, 1970) - * + * * Input: htime = human time representation - * + * * Output: etime = epochal time representation - * + * * Derived from NRL Neons V3.6 */ void @@ -628,7 +628,7 @@ Cdh2e(CdTime *htime, double *etime) int daysInYear; /* days in non-leap year */ CdDayOfYear(htime,&doy); - + day_cnt = 0; baseYear = ((htime->timeType) & CdBase1970) ? 1970 : htime->baseYear; @@ -641,7 +641,7 @@ Cdh2e(CdTime *htime, double *etime) daysInLeapYear = ((htime->timeType) & Cd365) ? 366 : 360; daysInYear = ((htime->timeType) & Cd365) ? 365 : 360; } - + if (year > baseYear) { for (ytemp = year - 1; ytemp >= baseYear; ytemp--) { day_cnt += ISLEAP(ytemp,htime->timeType) ? daysInLeapYear : daysInYear; @@ -650,7 +650,7 @@ Cdh2e(CdTime *htime, double *etime) for (ytemp = year; ytemp < baseYear; ytemp++) { day_cnt -= ISLEAP(ytemp,htime->timeType) ? daysInLeapYear : daysInYear; } - } + } *etime = (double) (day_cnt + doy - 1) * 24. + htime->hour; return; } @@ -687,7 +687,7 @@ cdChar2Comp(cdCalenType timetype, char* chartime, cdCompTime* comptime) comptime->month = CD_NULL_MONTH; comptime->day = CD_NULL_DAY; comptime->hour = CD_NULL_HOUR; - + if(timetype & cdStandardCal){ nconv = sscanf(chartime,"%ld-%hd-%hd %d:%d:%lf",&year,&month,&day,&ihr,&imin,&sec); if(nconv==EOF || nconv==0){ @@ -787,7 +787,7 @@ cdComp2Rel(cdCalenType timetype, cdCompTime comptime, char* relunits, double* re cdUnitTime unit; double base_etm, etm, delta; long ndel, hoursInYear; - + /* Parse the relunits */ if(cdParseRelunits(timetype, relunits, &unit, &base_comptime)) return; @@ -807,7 +807,7 @@ cdComp2Rel(cdCalenType timetype, cdCompTime comptime, char* relunits, double* re default: break; } } - + /* Convert basetime to epochal */ humantime.year = base_comptime.year; humantime.month = base_comptime.month; @@ -1071,7 +1071,7 @@ cdRel2Comp(cdCalenType timetype, char* relunits, double reltime, cdCompTime* com /* Convert back to human, then comptime. */ else if(baseunits == cdHour){ Cde2h(base_etm+delta, old_timetype, 1970, &humantime); - + } comptime->year = humantime.year; comptime->month = humantime.month; @@ -1091,7 +1091,7 @@ cdComp2Iso(cdCalenType timetype, int separator, cdCompTime comptime, char* time) if(cdValidateTime(timetype,comptime)) return; - + ihr = (int)comptime.hour; dtmp = 60.0 * (comptime.hour - (double)ihr); imin = (int)dtmp; diff --git a/libdispatch/ncuri.c b/libdispatch/ncuri.c index 7e13abdba..03a741965 100644 --- a/libdispatch/ncuri.c +++ b/libdispatch/ncuri.c @@ -1,5 +1,5 @@ /********************************************************************* - * Copyright 2010, UCAR/Unidata + * Copyright 2018, UCAR/Unidata * See netcdf/COPYRIGHT file for copying and redistribution conditions. * $Header$ *********************************************************************/ diff --git a/libdispatch/netcdf.m4 b/libdispatch/netcdf.m4 index f57742b08..1a58df027 100644 --- a/libdispatch/netcdf.m4 +++ b/libdispatch/netcdf.m4 @@ -1,12 +1,12 @@ /* - Copyright 2010 University Corporation for Atmospheric + Copyright 2018 University Corporation for Atmospheric Research/Unidata. See COPYRIGHT file for more info. This file defines most of the netcdf API in terms of the dispatch functions along with a few functions that are overlays over the dispatch functions. - "$Id: netcdf.m4,v 1.16 2010/06/01 15:34:50 ed Exp $" + "$Id: netcdf.m4,v 1.16 2010/06/01 15:34:50 ed Exp $" */ #include "ncdispatch.h" @@ -588,4 +588,3 @@ NC_PUT_ATT(ulonglong,unsigned long long) #ifdef USE_NETCDF4 /*NC_PUT_ATT(string,char*) defined separately */ #endif /*USE_NETCDF4*/ - diff --git a/libdispatch/stubdef.c b/libdispatch/stubdef.c index 519ec4d70..7db2c7193 100644 --- a/libdispatch/stubdef.c +++ b/libdispatch/stubdef.c @@ -1,5 +1,5 @@ /********************************************************************* - * Copyright 1993, UCAR/Unidata + * Copyright 2018, UCAR/Unidata * See netcdf/COPYRIGHT file for copying and redistribution conditions. *********************************************************************/ diff --git a/libdispatch/test_ncuri.c b/libdispatch/test_ncuri.c index 957b41ad0..7d23af3ed 100644 --- a/libdispatch/test_ncuri.c +++ b/libdispatch/test_ncuri.c @@ -1,5 +1,5 @@ /********************************************************************* - * Copyright 2016, UCAR/Unidata + * Copyright 2018, UCAR/Unidata * See netcdf/COPYRIGHT file for copying and redistribution conditions. *********************************************************************/ diff --git a/libdispatch/test_pathcvt.c b/libdispatch/test_pathcvt.c index 7b9307473..1d3f12c5a 100644 --- a/libdispatch/test_pathcvt.c +++ b/libdispatch/test_pathcvt.c @@ -1,5 +1,5 @@ /********************************************************************* - * Copyright 2016, UCAR/Unidata + * Copyright 2018, UCAR/Unidata * See netcdf/COPYRIGHT file for copying and redistribution conditions. *********************************************************************/ @@ -50,7 +50,7 @@ main(int argc, char** argv) } #ifdef VERBOSE fprintf(stderr,"NCpathcvt:: input: |%s| actual=|%s|\n",test->path,cvt); -#endif +#endif free(cvt); }