Hello community,
here is the log from the commit of package octave-forge-netcdf for
openSUSE:Factory checked in at 2020-06-11 14:48:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/octave-forge-netcdf (Old)
and /work/SRC/openSUSE:Factory/.octave-forge-netcdf.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave-forge-netcdf"
Thu Jun 11 14:48:47 2020 rev:5 rq:801794 version:1.0.13
Changes:
--------
--- /work/SRC/openSUSE:Factory/octave-forge-netcdf/octave-forge-netcdf.changes
2018-06-29 22:26:04.362498442 +0200
+++
/work/SRC/openSUSE:Factory/.octave-forge-netcdf.new.3606/octave-forge-netcdf.changes
2020-06-11 14:49:06.934166411 +0200
@@ -1,0 +2,7 @@
+Thu May 7 17:47:08 UTC 2020 - Stefan BrĂ¼ns <[email protected]>
+
+- Update to version 1.0.13:
+ * Update to depend on Octave 3.8+
+ * Update for Octave 5 and newer
+
+-------------------------------------------------------------------
Old:
----
netcdf-1.0.12.tar.gz
New:
----
netcdf-1.0.13.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ octave-forge-netcdf.spec ++++++
--- /var/tmp/diff_new_pack.FtuqJy/_old 2020-06-11 14:49:08.130170250 +0200
+++ /var/tmp/diff_new_pack.FtuqJy/_new 2020-06-11 14:49:08.134170263 +0200
@@ -1,7 +1,7 @@
#
# spec file for package octave-forge-netcdf
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,23 +12,23 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define octpkg netcdf
Name: octave-forge-%{octpkg}
-Version: 1.0.12
+Version: 1.0.13
Release: 0
Summary: NetCDF interface for Octave
License: GPL-2.0-or-later
Group: Productivity/Scientific/Math
-Url: http://octave.sourceforge.net
-Source0:
http://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz
+URL: https://octave.sourceforge.io
+Source0:
https://downloads.sourceforge.net/octave/%{octpkg}-%{version}.tar.gz
BuildRequires: gcc-c++
BuildRequires: netcdf-devel
-BuildRequires: octave-devel
-Requires: octave-cli >= 3.4.0
+BuildRequires: octave-devel >= 3.8.0
+Requires: octave-cli >= 3.8.0
%description
A MATLAB compatible NetCDF interface for Octave.
@@ -54,7 +54,6 @@
%octave --eval "pkg rebuild"
%files
-%defattr(-,root,root)
%{octpackages_dir}/%{octpkg}-%{version}
%{octlib_dir}/%{octpkg}-%{version}
++++++ netcdf-1.0.12.tar.gz -> netcdf-1.0.13.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/DESCRIPTION
new/netcdf-1.0.13/DESCRIPTION
--- old/netcdf-1.0.12/DESCRIPTION 2018-04-12 17:00:38.000000000 +0200
+++ new/netcdf-1.0.13/DESCRIPTION 2020-03-13 17:04:56.000000000 +0100
@@ -1,12 +1,12 @@
Name: netcdf
-Version: 1.0.12
-Date: 2018-04-12
+Version: 1.0.13
+Date: 2020-03-13
Author: Alexander Barth <[email protected]>
Maintainer: Alexander Barth <[email protected]>, John Donoghue
<[email protected]>
Title: netcdf
Description: A NetCDF interface for Octave
-Depends: octave (>= 3.4.0)
+Depends: octave (>= 3.8.0)
BuildRequires: netcdf-devel [Fedora]
libnetcdf-dev [Debian], netcdf-bin [Debian]
License: GPLv2+
-Url: https://github.com/Alexander-Barth/octave-netcdf/wiki,
http://octave.sf.net
+Url: http://octave.sf.net
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/Makefile new/netcdf-1.0.13/Makefile
--- old/netcdf-1.0.12/Makefile 2018-04-12 17:00:38.000000000 +0200
+++ new/netcdf-1.0.13/Makefile 2020-03-13 17:04:56.000000000 +0100
@@ -8,6 +8,7 @@
## are permitted in any medium without royalty provided the copyright
## notice and this notice are preserved. This file is offered as-is,
## without any warranty.
+TOPDIR := $(shell pwd)
## Some basic tools (can be overriden using environment variables)
SED ?= sed
@@ -48,6 +49,9 @@
## Command used to set permissions before creating tarballs
FIX_PERMISSIONS ?= chmod -R a+rX,u+w,go-w,ug-s
+GIT := git
+GIT_TIMESTAMP := $(firstword $(shell $(GIT) log -n1 --date=unix
--format="%ad"))
+
## Detect which VCS is used
vcs := $(if $(wildcard .hg),hg,$(if $(wildcard .git),git,unknown))
ifeq ($(vcs),hg)
@@ -57,6 +61,8 @@
release_dir_dep := .git/index
endif
+TAR_REPRODUCIBLE_OPTIONS := --sort=name --mtime="@$(GIT_TIMESTAMP)" --owner=0
--group=0 --numeric-owner
+TAR_OPTIONS := --format=ustar $(TAR_REPRODUCIBLE_OPTIONS)
## .PHONY indicates targets that are not filenames
## (https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html)
@@ -95,7 +101,7 @@
## An implicit rule with a recipe to build the tarballs correctly.
%.tar.gz: %
- $(TAR) -c -f - --posix -C "$(target_dir)/" "$(notdir $<)" | gzip -9n >
"$@"
+ $(TAR) -cf - $(TAR_OPTIONS) -C "$(target_dir)/" "$(notdir $<)" | gzip
-9n > "$@"
clean-tarballs:
@echo "## Cleaning release tarballs (package + html)..."
@@ -214,10 +220,9 @@
## Test package.
octave_test_commands = \
-' dirs = {"inst", "src"}; \
- dirs(cellfun (@ (x) ! isdir (x), dirs)) = []; \
- if (isempty (dirs)) error ("no \"inst\" or \"src\" directory"); exit (1); \
- else __run_test_suite__ (dirs, {}); endif '
+' pkgs = pkg("list", "$(package)"); \
+ dirs = {pkgs{1}.dir}; \
+ __run_test_suite__ (dirs, {}); '
## the following works, too, but provides no overall summary output as
## __run_test_suite__ does:
##
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/NEWS new/netcdf-1.0.13/NEWS
--- old/netcdf-1.0.12/NEWS 2018-04-12 17:00:38.000000000 +0200
+++ new/netcdf-1.0.13/NEWS 2020-03-13 17:04:56.000000000 +0100
@@ -1,3 +1,10 @@
+Summary of important user-visible changes for netcdf 1.0.13:
+-------------------------------------------------------------------
+
+ ** Update to depend on Octave 3.8+
+
+ ** Update for Octave 5 and newer
+
Summary of important user-visible changes for netcdf 1.0.12:
-------------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/inst/ncwriteatt.m
new/netcdf-1.0.13/inst/ncwriteatt.m
--- old/netcdf-1.0.12/inst/ncwriteatt.m 2018-04-12 17:00:38.000000000 +0200
+++ new/netcdf-1.0.13/inst/ncwriteatt.m 2020-03-13 17:04:56.000000000 +0100
@@ -19,7 +19,7 @@
## Defines the attribute @var{attname} of the variable @var{varname} in the
file
## @var{filename} with the value @var{val}.
##
-## Gobal attributes can be defined by using "/" or the group name as
+## Global attributes can be defined by using "/" or the group name as
## @var{varname}. The type of value is mapped to the NetCDF data types.
## (see @code{ncinfo}).
##
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/netcdf-1.0.12/inst/private/test_netcdf_high_level_interface.m
new/netcdf-1.0.13/inst/private/test_netcdf_high_level_interface.m
--- old/netcdf-1.0.12/inst/private/test_netcdf_high_level_interface.m
2018-04-12 17:00:38.000000000 +0200
+++ new/netcdf-1.0.13/inst/private/test_netcdf_high_level_interface.m
2020-03-13 17:04:56.000000000 +0100
@@ -130,8 +130,3 @@
assert(isequal(data,data2))
delete(fname)
-
-
-% test case for bug 47014
-
-bug_47014
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/inst/test_netcdf.m
new/netcdf-1.0.13/inst/test_netcdf.m
--- old/netcdf-1.0.12/inst/test_netcdf.m 2018-04-12 17:00:38.000000000
+0200
+++ new/netcdf-1.0.13/inst/test_netcdf.m 2020-03-13 17:04:56.000000000
+0100
@@ -16,7 +16,8 @@
'test_netcdf_ncwriteschema',...
'test_netcdf_ncwriteschema_unlim',...
'test_netcdf_ncwriteschema_chunking',...
- 'test_netcdf_ncwriteschema_group'...
+ 'test_netcdf_ncwriteschema_group',...
+ 'bug_47014'...
};
maxlen = max(cellfun(@(s) length(s),tests));
@@ -37,7 +38,7 @@
end
end
-%% Copyright (C) 2013-2018 Alexander Barth
+%% Copyright (C) 2013-2019 Alexander Barth
%%
%% 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
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/octave-netcdf.metainfo.xml
new/netcdf-1.0.13/octave-netcdf.metainfo.xml
--- old/netcdf-1.0.12/octave-netcdf.metainfo.xml 1970-01-01
01:00:00.000000000 +0100
+++ new/netcdf-1.0.13/octave-netcdf.metainfo.xml 2020-03-13
17:04:56.000000000 +0100
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2019 John Donoghue
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without any warranty.
+-->
+<component type="addon">
+ <id>octave-netcdf</id>
+ <extends>www.octave.org-octave.desktop</extends>
+ <name>NetCDF Toolkit</name>
+ <summary>Octave NetCDF toolkit</summary>
+ <description>
+ <p>Toolkit for Network Common Form (NetCDF) File I/O.</p>
+ </description>
+ <keywords>
+ <keyword>NetCDF</keyword>
+ <keyword>scientific</keyword>
+ </keywords>
+ <url type="homepage">http://octave.sourceforge.net/netcdf</url>
+ <url
type="bugtracker">https://savannah.gnu.org/bugs/?func=additem&group=octave</url>
+ <project_license>GPL-3.0+</project_license>
+ <developer_name>Octave-Forge Community</developer_name>
+ <update_contact>[email protected]</update_contact>
+ <metadata_license>FSFAP</metadata_license>
+</component>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/src/Makefile.in
new/netcdf-1.0.13/src/Makefile.in
--- old/netcdf-1.0.12/src/Makefile.in 2018-04-12 17:00:38.000000000 +0200
+++ new/netcdf-1.0.13/src/Makefile.in 2020-03-13 17:04:56.000000000 +0100
@@ -19,7 +19,15 @@
all: __netcdf__.oct ../PKG_ADD
netcdf_constants.h:
- $(AWK) -f netcdf_constants.awk $(NCHEADER) > netcdf_constants.h
+ $(info generating netcdf_constants.h)
+ @if [ -f $(NCHEADER) ]; then \
+ $(AWK) -f netcdf_constants.awk $(NCHEADER) > netcdf_constants.h; \
+ elif [ -f /usr/include/netcdf.h ]; then \
+ $(AWK) -f netcdf_constants.awk /usr/include/netcdf.h >
netcdf_constants.h; \
+ else \
+ echo >&2 "Couldnt find netcdf.h"; \
+ false; \
+ fi;
clean:
rm -f __netcdf__.o __netcdf__.oct netcdf_constants.h
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/src/__netcdf__.cc
new/netcdf-1.0.13/src/__netcdf__.cc
--- old/netcdf-1.0.12/src/__netcdf__.cc 2018-04-12 17:00:38.000000000 +0200
+++ new/netcdf-1.0.13/src/__netcdf__.cc 2020-03-13 17:04:56.000000000 +0100
@@ -256,12 +256,6 @@
int format = netcdf_get_constant(args(0)).int_value();
int old_format;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_set_default_format(format, &old_format));
return octave_value(old_format);
@@ -287,12 +281,6 @@
size_t nelems = to_size_t(args(1));
float preemption = args(2).scalar_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_set_chunk_cache(size, nelems, preemption));
return octave_value();
@@ -318,12 +306,6 @@
size_t nelems;
float preemption;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_get_chunk_cache(&size, &nelems, &preemption));
octave_value_list retval;
retval(0) = octave_value(size);
@@ -366,12 +348,6 @@
int mode = netcdf_get_constant(args(1)).int_value();
int ncid;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_create(filename.c_str(), mode, &ncid));
return octave_value(ncid);
@@ -395,12 +371,6 @@
int mode = netcdf_get_constant(args(1)).int_value();
int ncid;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_open(filename.c_str(), mode, &ncid));
return octave_value(ncid);
@@ -424,12 +394,6 @@
int ncid = args(0).scalar_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_abort(ncid));
return octave_value();
@@ -452,12 +416,6 @@
int ncid = args(0).scalar_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_sync(ncid));
return octave_value();
@@ -481,12 +439,6 @@
int fillmode = netcdf_get_constant(args(1)).int_value();
int old_mode;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err (nc_set_fill (ncid, fillmode, &old_mode));
return octave_value(old_mode);
@@ -514,12 +466,6 @@
int ndims, nvars, ngatts, unlimdimid;
octave_value_list retval;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq(ncid,&ndims,&nvars,&ngatts,&unlimdimid));
retval(0) = octave_value(ndims);
@@ -546,12 +492,6 @@
int ncid = args(0).scalar_value();
int nunlimdims;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_unlimdims(ncid, &nunlimdims, NULL));
OCTAVE_LOCAL_BUFFER(int,tmp,nunlimdims);
@@ -586,12 +526,6 @@
int ncid = args(0).scalar_value();
int format;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_format(ncid, &format));
if (format == NC_FORMAT_CLASSIC) {
@@ -628,12 +562,6 @@
size_t len = to_size_t(args(2));
int dimid;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_def_dim (ncid, name.c_str(), len, &dimid));
return octave_value(dimid);
@@ -661,12 +589,6 @@
int dimid = args(1).scalar_value();
std::string name = args(2).string_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_rename_dim (ncid, dimid, name.c_str()));
return octave_value();
@@ -693,12 +615,6 @@
std::string name = args(1).string_value ();
int xtype = netcdf_get_constant(args(2)).int_value();;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
Array<double> tmp;
if (!args(3).OV_ISEMPTY()) {
@@ -741,12 +657,6 @@
int varid = args(1).scalar_value();
std::string name = args(2).string_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_rename_var (ncid, varid, name.c_str()));
return octave_value();
@@ -775,12 +685,6 @@
octave_value fill_value = args(3);
nc_type xtype;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_vartype (ncid, varid, &xtype));
switch (xtype)
@@ -835,19 +739,8 @@
octave_value_list retval;
octave_value data;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_vartype (ncid, varid, &xtype));
- if (error_state)
- {
- return octave_value();
- }
-
switch (xtype)
{
#define OV_NETCDF_INQ_VAR_FILL(netcdf_type,c_type)
\
@@ -907,12 +800,6 @@
int deflate = args(3).scalar_value(); // boolean
int deflate_level = args(4).scalar_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_def_var_deflate (ncid, varid, shuffle, deflate, deflate_level));
return octave_value();
}
@@ -940,26 +827,24 @@
int shuffle, deflate, deflate_level;
octave_value_list retval;
- if (! error_state) {
- int format;
- check_err(nc_inq_format(ncid, &format));
-
- // nc_inq_var_deflate returns garbage for classic or 64bit files
- if (format == NC_FORMAT_CLASSIC || format == NC_FORMAT_64BIT) {
- shuffle = 0;
- deflate = 0;
- deflate_level = 0;
- }
- else {
- check_err(nc_inq_var_deflate(ncid, varid,
- &shuffle,&deflate,&deflate_level));
- }
-
- retval(0) = octave_value(shuffle);
- retval(1) = octave_value(deflate);
- retval(2) = octave_value(deflate_level);
+ int format;
+ check_err(nc_inq_format(ncid, &format));
+
+ // nc_inq_var_deflate returns garbage for classic or 64bit files
+ if (format == NC_FORMAT_CLASSIC || format == NC_FORMAT_64BIT) {
+ shuffle = 0;
+ deflate = 0;
+ deflate_level = 0;
+ }
+ else {
+ check_err(nc_inq_var_deflate(ncid, varid,
+ &shuffle,&deflate,&deflate_level));
}
+ retval(0) = octave_value(shuffle);
+ retval(1) = octave_value(deflate);
+ retval(2) = octave_value(deflate_level);
+
return retval;
}
@@ -986,29 +871,27 @@
std::string storagestr = args(2).string_value();
int storage;
- if (! error_state) {
- std::transform(storagestr.begin(), storagestr.end(),storagestr.begin(),
::toupper);
+ std::transform(storagestr.begin(), storagestr.end(),storagestr.begin(),
::toupper);
- if (storagestr == "CHUNKED") {
- storage = NC_CHUNKED;
- }
- else if (storagestr == "CONTIGUOUS") {
- storage = NC_CONTIGUOUS;
- }
- else {
- error("unknown storage %s",storagestr.c_str());
- return octave_value();
- }
+ if (storagestr == "CHUNKED") {
+ storage = NC_CHUNKED;
+ }
+ else if (storagestr == "CONTIGUOUS") {
+ storage = NC_CONTIGUOUS;
+ }
+ else {
+ error("unknown storage %s",storagestr.c_str());
+ return octave_value();
+ }
- if (args.length() == 4) {
- OCTAVE_LOCAL_BUFFER (size_t, chunksizes, args(3).numel());
- to_size_t_vector(args(3), args(3).numel(),chunksizes);
+ if (args.length() == 4) {
+ OCTAVE_LOCAL_BUFFER (size_t, chunksizes, args(3).numel());
+ to_size_t_vector(args(3), args(3).numel(),chunksizes);
- check_err(nc_def_var_chunking(ncid, varid, storage, chunksizes));
- }
- else {
- check_err(nc_def_var_chunking(ncid, varid, storage, NULL));
- }
+ check_err(nc_def_var_chunking(ncid, varid, storage, chunksizes));
+ }
+ else {
+ check_err(nc_def_var_chunking(ncid, varid, storage, NULL));
}
return octave_value();
@@ -1040,25 +923,22 @@
check_err(nc_inq_varndims (ncid, varid, &ndims));
OCTAVE_LOCAL_BUFFER (size_t, chunksizes, ndims);
- if (! error_state) {
- check_err(nc_inq_var_chunking(ncid, varid, &storage, chunksizes));
-
- if (storage == NC_CHUNKED) {
- retval(0) = octave_value("chunked");
- // should use uint32NDArray on 32-bit?
- uint64NDArray chunkSizes = uint64NDArray(dim_vector(1,ndims));
-
- for (int i = 0; i < ndims; i++)
- {
- chunkSizes(ndims-i-1) = chunksizes[i];
- }
- retval(1) = octave_value(chunkSizes);
- }
- else {
- retval(0) = octave_value("contiguous");
- retval(1) = octave_value(Array<double>());
- }
+ check_err(nc_inq_var_chunking(ncid, varid, &storage, chunksizes));
+ if (storage == NC_CHUNKED) {
+ retval(0) = octave_value("chunked");
+ // should use uint32NDArray on 32-bit?
+ uint64NDArray chunkSizes = uint64NDArray(dim_vector(1,ndims));
+
+ for (int i = 0; i < ndims; i++)
+ {
+ chunkSizes(ndims-i-1) = chunksizes[i];
+ }
+ retval(1) = octave_value(chunkSizes);
+ }
+ else {
+ retval(0) = octave_value("contiguous");
+ retval(1) = octave_value(Array<double>());
}
return retval;
@@ -1083,12 +963,6 @@
int varid = args(1).scalar_value();
int checksum = netcdf_get_constant(args(2)).int_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_def_var_fletcher32(ncid, varid, checksum));
return octave_value();
@@ -1114,12 +988,6 @@
int varid = args(1).scalar_value();
int checksum;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_var_fletcher32(ncid, varid, &checksum));
if (checksum == NC_FLETCHER32)
@@ -1149,12 +1017,6 @@
int ncid = args(0).scalar_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_enddef (ncid));
return octave_value();
@@ -1175,12 +1037,6 @@
int ncid = args(0).scalar_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_redef (ncid));
return octave_value();
@@ -1212,12 +1068,6 @@
int varid = args(1).scalar_value ();
octave_value data = args(args.length()-1);
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
int ndims;
check_err(nc_inq_varndims (ncid, varid, &ndims));
@@ -1231,11 +1081,6 @@
check_err(nc_inq_vartype (ncid, varid, &xtype));
//int sliced_numel = tmp.numel();
- if (error_state)
- {
- return octave_value();
- }
-
start_count_stride(ncid, varid, args, args.length()-1, ndims, start, count,
stride);
// check if count matched size(data)
@@ -1299,28 +1144,12 @@
octave_value data;
nc_type xtype;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_vartype (ncid, varid, &xtype));
- if (error_state)
- {
- return octave_value();
- }
-
check_err(nc_inq_varndims (ncid, varid, &ndims));
//std::cout << "ndims " << ndims << std::endl;
- if (error_state)
- {
- return octave_value();
- }
-
OCTAVE_LOCAL_BUFFER (size_t, start, ndims);
OCTAVE_LOCAL_BUFFER (size_t, count, ndims);
OCTAVE_LOCAL_BUFFER (ptrdiff_t, stride, ndims);
@@ -1345,13 +1174,6 @@
// std::cout << "start " << start[0] << std::endl;
// std::cout << "stide " << stride[0] << std::endl;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
-
// total size sz
for (int i=0; i<ndims; i++) {
sz = sz * count[i];
@@ -1423,12 +1245,6 @@
int ncid = args(0).scalar_value();
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_close(ncid));
return octave_value ();
}
@@ -1457,12 +1273,6 @@
int attnum = args(2).scalar_value();
char name[NC_MAX_NAME+1];
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_attname(ncid, varid, attnum, name));
return octave_value(std::string(name));
@@ -1488,12 +1298,6 @@
std::string attname = args(2).string_value();
int attnum;
- if (error_state)
- {
- print_usage ();
- return octave_value ();
- }
-
check_err (nc_inq_attid (ncid, varid, attname.c_str(), &attnum));
return octave_value(attnum);
@@ -1523,12 +1327,6 @@
size_t len;
octave_value_list retval;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_att(ncid, varid, name.c_str(), &xtype, &len));
retval(0) = octave_value(xtype);
@@ -1560,19 +1358,8 @@
size_t len;
octave_value data;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_att(ncid, varid, attname.c_str(), &xtype, &len));
- if (error_state)
- {
- return octave_value();
- }
-
#define OV_NETCDF_GET_ATT_CASE(netcdf_type,c_type)
\
if (xtype == netcdf_type)
\
{
\
@@ -1623,12 +1410,6 @@
nc_type xtype;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
// get matching netcdf type
if (data.is_string())
@@ -1711,12 +1492,6 @@
int ncid_out = args(3).scalar_value();
int varid_out = args(4).scalar_value();
- if (error_state)
- {
- print_usage ();
- return octave_value ();
- }
-
check_err (nc_copy_att (ncid, varid, name.c_str(),
ncid_out, varid_out));
@@ -1744,12 +1519,6 @@
std::string old_name = args(2).string_value();
std::string new_name = args(3).string_value();
- if (error_state)
- {
- print_usage ();
- return octave_value ();
- }
-
check_err(nc_rename_att (ncid, varid, old_name.c_str(), new_name.c_str()));
return octave_value ();
@@ -1775,12 +1544,6 @@
int varid = args(1).scalar_value();
std::string name = args(2).string_value();
- if (error_state)
- {
- print_usage ();
- return octave_value ();
- }
-
check_err(nc_del_att (ncid, varid, name.c_str()));
return octave_value ();
@@ -1805,12 +1568,6 @@
std::string varname = args(1).string_value();
int varid;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_varid(ncid,varname.c_str(), &varid));
return octave_value(varid);
@@ -1834,19 +1591,8 @@
int ncid = args(0).scalar_value();
int nvars;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_varids(ncid, &nvars, NULL));
- if (error_state)
- {
- return octave_value();
- }
-
OCTAVE_LOCAL_BUFFER(int,tmp,nvars);
NETCDF_INT_ARRAY varids = NETCDF_INT_ARRAY(dim_vector(1,nvars));
check_err(nc_inq_varids(ncid, &nvars, tmp));
@@ -1882,20 +1628,9 @@
nc_type xtype;
octave_value_list retval;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_varndims(ncid, varid, &ndims));
OCTAVE_LOCAL_BUFFER (int, dimids, ndims);
- if (error_state)
- {
- return octave_value();
- }
-
check_err(nc_inq_var(ncid, varid, name, &xtype,
&ndims, dimids, &natts));
@@ -1935,15 +1670,12 @@
int dimid = args(1).scalar_value();
octave_value_list retval;
- if (! error_state)
- {
- char name[NC_MAX_NAME+1];
- size_t length;
- check_err(nc_inq_dim(ncid, dimid, name, &length));
+ char name[NC_MAX_NAME+1];
+ size_t length;
+ check_err(nc_inq_dim(ncid, dimid, name, &length));
- retval(0) = octave_value(std::string(name));
- retval(1) = octave_value(length);
- }
+ retval(0) = octave_value(std::string(name));
+ retval(1) = octave_value(length);
return retval;
}
@@ -1968,11 +1700,8 @@
int id;
octave_value_list retval;
- if (! error_state)
- {
- check_err(nc_inq_dimid(ncid, dimname.c_str(), &id));
- retval(0) = octave_value(id);
- }
+ check_err(nc_inq_dimid(ncid, dimname.c_str(), &id));
+ retval(0) = octave_value(id);
return retval;
}
@@ -2001,12 +1730,6 @@
include_parents = args(0).scalar_value();
}
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
int ndims;
check_err(nc_inq_ndims(ncid, &ndims));
@@ -2045,12 +1768,6 @@
std::string name = args(1).string_value();
int new_ncid;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_def_grp(parent_ncid, name.c_str(), &new_ncid));
return octave_value(new_ncid);
}
@@ -2073,19 +1790,8 @@
int ncid = args(0).scalar_value();
int numgrps;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_grps(ncid, &numgrps, NULL));
- if (error_state)
- {
- return octave_value();
- }
-
OCTAVE_LOCAL_BUFFER(int,tmp,numgrps);
NETCDF_INT_ARRAY ncids = NETCDF_INT_ARRAY(dim_vector(1,numgrps));
check_err(nc_inq_grps(ncid, NULL, tmp));
@@ -2114,19 +1820,8 @@
int ncid = args(0).scalar_value();
char name[NC_MAX_NAME+1];
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_grpname(ncid, name));
- if (error_state)
- {
- return octave_value();
- }
-
return octave_value(std::string(name));
}
@@ -2147,31 +1842,18 @@
int ncid = args(0).scalar_value();
size_t len;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_grpname_len(ncid,&len));
- if (error_state)
+ OCTAVE_LOCAL_BUFFER(char, name, len+1);
+ if (name == 0)
{
- return octave_value();
+ error ("netcdf: error allocating buffer for name\n");
+ return octave_value ();
}
-
- char* name = new char[len+1];
octave_value retval;
check_err(nc_inq_grpname_full(ncid, &len, name));
- if (error_state)
- {
- delete[] name;
- return octave_value();
- }
-
retval = octave_value(std::string(name));
- delete[] name;
return retval;
}
@@ -2192,12 +1874,6 @@
int ncid = args(0).scalar_value();
int parent_ncid;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_grp_parent(ncid, &parent_ncid));
return octave_value(parent_ncid);
}
@@ -2220,20 +1896,9 @@
std::string name = args(1).string_value();
int grp_ncid;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
int format;
check_err(nc_inq_format(ncid, &format));
- if (error_state)
- {
- return octave_value();
- }
-
if (format == NC_FORMAT_CLASSIC || format == NC_FORMAT_64BIT)
{
if (name == "/")
@@ -2273,12 +1938,6 @@
std::string name = args(1).string_value();
int grp_ncid;
- if (error_state)
- {
- print_usage ();
- return octave_value();
- }
-
check_err(nc_inq_ncid(ncid, name.c_str(), &grp_ncid));
return octave_value(grp_ncid);
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/src/aclocal.m4
new/netcdf-1.0.13/src/aclocal.m4
--- old/netcdf-1.0.12/src/aclocal.m4 2018-04-16 22:33:18.668545757 +0200
+++ new/netcdf-1.0.13/src/aclocal.m4 2020-03-13 17:04:56.000000000 +0100
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/src/configure
new/netcdf-1.0.13/src/configure
--- old/netcdf-1.0.12/src/configure 2018-04-16 22:33:18.820544992 +0200
+++ new/netcdf-1.0.13/src/configure 2020-03-13 17:04:56.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for octave netcdf package 1.0.12.
+# Generated by GNU Autoconf 2.69 for octave netcdf package 1.0.13.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -576,8 +576,8 @@
# Identity of this package.
PACKAGE_NAME='octave netcdf package'
PACKAGE_TARNAME='octave-netcdf-package'
-PACKAGE_VERSION='1.0.12'
-PACKAGE_STRING='octave netcdf package 1.0.12'
+PACKAGE_VERSION='1.0.13'
+PACKAGE_STRING='octave netcdf package 1.0.13'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1198,7 +1198,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures octave netcdf package 1.0.12 to adapt to many kinds of
systems.
+\`configure' configures octave netcdf package 1.0.13 to adapt to many kinds of
systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1261,7 +1261,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of octave netcdf package
1.0.12:";;
+ short | recursive ) echo "Configuration of octave netcdf package
1.0.13:";;
esac
cat <<\_ACEOF
@@ -1340,7 +1340,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-octave netcdf package configure 1.0.12
+octave netcdf package configure 1.0.13
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1395,7 +1395,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by octave netcdf package $as_me 1.0.12, which was
+It was created by octave netcdf package $as_me 1.0.13, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2572,7 +2572,6 @@
LIBS=$save_altsyms_LIBS
-
ac_config_files="$ac_config_files Makefile"
@@ -2997,7 +2996,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by octave netcdf package $as_me 1.0.12, which was
+This file was extended by octave netcdf package $as_me 1.0.13, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -3059,7 +3058,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //;
s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-octave netcdf package config.status 1.0.12
+octave netcdf package config.status 1.0.13
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/src/configure.ac
new/netcdf-1.0.13/src/configure.ac
--- old/netcdf-1.0.12/src/configure.ac 2018-04-12 17:00:38.000000000 +0200
+++ new/netcdf-1.0.13/src/configure.ac 2020-03-13 17:04:56.000000000 +0100
@@ -2,10 +2,26 @@
dnl and the various configure.add files in the source tree. Edit
dnl configure.base and reprocess rather than modifying ./configure.
+### Copyright (C) 2018-2020 John Donoghue <[email protected]>
+###
+### 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 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
+### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 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, see
+### <http://www.gnu.org/licenses/>.
+
dnl autoconf 2.13 certainly doesn't work! What is the minimum requirement?
AC_PREREQ(2.2)
-AC_INIT([octave netcdf package],[1.0.12])
+AC_INIT([octave netcdf package],[1.0.13])
AC_CONFIG_HEADERS([config.h])
# Avoid warnings for redefining AH-generated preprocessor symbols of
@@ -92,7 +108,6 @@
dnl **********************************************************
-
AC_OUTPUT(Makefile)
AC_MSG_RESULT([
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/netcdf-1.0.12/src/netcdf_constants.awk
new/netcdf-1.0.13/src/netcdf_constants.awk
--- old/netcdf-1.0.12/src/netcdf_constants.awk 2018-04-12 17:00:38.000000000
+0200
+++ new/netcdf-1.0.13/src/netcdf_constants.awk 2020-03-13 17:04:56.000000000
+0100
@@ -18,7 +18,7 @@
BEGIN {
print "// generated by netcdf_constants.awk";
}
-/\#define[ \t]+NC_[0-9a-zA-Z_]*[ \t]+/ {
+/#define[ \t]+NC_[0-9a-zA-Z_]*[ \t]+/ {
constant=$2;
ov = constant;