Commit Graph

308 Commits

Author SHA1 Message Date
dmh
1739c50622 Modified a number of tests
to make use of remotetest.unidata.ucar.edu
optional. Purpose is purely for testing
new dts and thredds servers.
2014-10-04 15:59:16 -06:00
dmh
92121f5ad5 Conflict resolution 2014-08-29 14:52:16 -06:00
dmh
be329e7a23 Add ability to programmatically
extract info from libnetcdf.settings
API is below.
I have made this API public yet
by adding it to netcdf.h. I will
do that when everyone is agreed on the
proper API.

extern const char* nc_settings(const char* key); /*get value of a specific key */
extern const char** nc_settings_all(); /*get all settings in envv format */
extern void nc_settings_reclaim(); /* reclaim all space and clean up */

Envv format is
{key,value}*,NULL

Also added test: nc_test/tst_settings.c
2014-08-29 14:51:14 -06:00
Russ Rew
430fe00c22 Remove premature ncsettings stuff 2014-08-28 14:44:24 -06:00
dmh
9e43180470 JIRA: NCF-311
Initial attempt to make libnsetcdf.settings
accessible programatically.
Added libdispatch/ncsettings.hdr
used to construct ncsettings.c
See end of libdispatch/Makefile.am to
see how ncsettings.c is constructed.
2014-08-26 12:28:38 -06:00
Ward Fisher
b43813d821 When using the '-ansi' flag with gcc, netcdf would fail to build because of the use of '//' for one-line comments. I've addressed this by replacing instances of // with enclosing comment blocks. 2014-08-26 11:19:32 -06:00
Ward Fisher
88d01e4c08 Coverity: 715198. Removed redundant goto fail() stanzas. 2014-08-26 10:36:06 -06:00
Ward Fisher
b25dbcd24a Added an explicit error message string to nc_strerror for NC_ECANTEXTEND. 2014-08-18 14:24:16 -06:00
dmh
18eb1c1126 Coverity fixing 2014-08-17 12:03:23 -06:00
Ward Fisher
6c071be031 Corrected issues where functions were not available in Windows. Specifically strndup. Also accomodated an included needed for getcwd. 2014-08-07 17:03:27 -06:00
Ward Fisher
b92c26943d Coverity: 1229473 2014-08-01 10:47:20 -06:00
Ward Fisher
ab7883897b Coverity: 1198195 2014-07-31 16:39:12 -06:00
Ward Fisher
dcf8ad365e Coverity: 711838 2014-07-31 16:32:50 -06:00
Ward Fisher
506440920f Coverity: 711834, 711833, 711832 2014-07-31 16:20:50 -06:00
Ward Fisher
f42202029a Cleaning up Doxygen warnings, reorganization of top-level documentation. 2014-07-14 16:56:42 -06:00
Ward Fisher
840d80f490 More doxygen tweaks. 2014-07-09 16:45:13 -06:00
Ward Fisher
7f812b367e Manual merge of pull request https://github.com/Unidata/netcdf-c/pull/64 contributed by nschloe. Assorted CMake improvements. 2014-06-11 15:51:31 -06:00
Ward Fisher
16649f8184 Started adopting syntax used by attributes in organizing dimensions documentation. 2014-05-16 13:44:12 -06:00
Ward Fisher
d0c958cd27 Merge branch 'sub_doc'
Working on reformatting the netcdf documents. Not complete yet, but off to a good start.
2014-04-23 11:04:57 -06:00
Dennis Heimbigner
8ed76e9ded Merge branch 'master' of https://github.com/Unidata/netcdf-c 2014-04-22 14:00:26 -06:00
Dennis Heimbigner
70b58a0ad5 ckp 2014-04-22 13:59:47 -06:00
Russ Rew
b4a191578c Documented limit on number of groups per file (32767). 2014-04-22 13:36:29 -06:00
Ward Fisher
2fd1195b82 Merge branch 'master' into sub_doc
Conflicts:
	man4/CMakeLists.txt
2014-04-21 14:19:55 -06:00
Ward Fisher
44fae42214 Cleaned up indentation, white space in multiple CMakeLists.txt files. 2014-04-21 11:15:33 -06:00
Ward Fisher
01598ae610 Fixed clang-reported issue: memory leak. 2014-04-19 17:55:01 -06:00
dmh
fb00c88763 fix bugs introduced by previous coverity fixes 2014-04-07 14:01:40 -06:00
dmh
389d2ea394 fix some coverity complaints 2014-04-07 13:00:47 -06:00
Dennis Heimbigner
464d5fc8bb 1. Add then remove some debugging info
for testing jna
2. add some personal scripts (*jna)
   to support creating jna dlls.
2014-04-03 15:46:12 -06:00
Ward Fisher
2a2d880002 Merge branch 'sub_doc' of https://github.com/Unidata/netcdf-c into sub_doc
Conflicts:
	man4/CMakeLists.txt
2014-03-31 16:27:37 -06:00
dmh
af566dd300 In preparation for adding dap4 support, I have cleaned up
the libdap2 code to make it dap2 protocol + netcdf classic
only.
2014-03-24 14:02:52 -06:00
Ward Fisher
5e3d265743 Removed vestigal function related to currently-inactive multiple-open functionality. 2014-03-19 16:14:22 -06:00
Ward Fisher
dcb30d2a15 Merge branch 'sub_doc' of https://github.com/Unidata/netcdf-c into sub_doc 2014-03-17 13:45:44 -06:00
dmh
b524e151ef Remove last vestiges of thredds-test 2014-03-14 14:07:35 -06:00
Ward Fisher
43e3c28d64 Merge branch 'sub_doc' of https://github.com/Unidata/netcdf-c into sub_doc 2014-03-11 13:14:22 -06:00
Ward Fisher
1e9f243f85 Fixed netcdf-c issue #30 (on github) related to cmake-generated nc-config script.
Initial split of Guide from rest of documentation.  Using 'tagfiles' to cross-reference from one documentation set to the other works, but then it drags all of the 'external' related pages into the index of the other.

Modified visability of the external groups and pages.

Adding proper section names to 'Example' sections, to avoid Doxygen warnings.

Initial split of Guide from rest of documentation.  Using 'tagfiles' to cross-reference from one documentation set to the other works, but then it drags all of the 'external' related pages into the index of the other.

Modified visability of the external groups and pages.

Adding proper section names to 'Example' sections, to avoid Doxygen warnings.

Reorganizing documentation into two separate doxygen projects.

Moved .texi documents into an old directory.

Pulled the tutorial document into a separate document, similar to the guide document.

Turned on treeview
2014-03-11 13:07:04 -06:00
dmh
c7086dd04b Add support to detect authorization errors to DAP 2014-03-11 11:58:22 -06:00
dmh
19d377e87a conflict resolution 2014-03-10 12:13:16 -06:00
dmh
9d5c8ba308 1. Previous ci of conversion fixes in libdispatch
was incomplete; complete the fix.
2. There is an inconsistency in the netcdfh interface
   about whether rank (# dimensions) is an int or
   size_t. I inadvertently assumed the latter and that
   breaks some API calls; so revert back.
2014-03-10 12:09:36 -06:00
Ward Fisher
513cb29ea4 The replacement of 'int' with 'size_t' caused a number of errors across multiple platforms in our CI system. The culprit is not obvious, so I am reverting the commit until we can take a closer look at the underlying issue.
Revert "1. Attempted to reduce the number of conversion errors"

This reverts commit 1b941d342d.
2014-03-10 10:04:37 -06:00
dmh
1b941d342d 1. Attempted to reduce the number of conversion errors
when -Wconversion is set. Fixed libdispatch, but
   rest of netcdf remains to be done.
2014-03-09 15:51:45 -06:00
dmh
a189b98b0b 1. Any test that references nctestserver/NC_findtestserver
should be under ENABLE_DAP_REMOTE_TESTS.
   Fixed to make sure that this is so.
   Also attempted to fix ncdap_test/CMakeLists.txt,
   but probably got it wrong.
   HT to Nico Schlomer.
2. Attempted to reduce the number of conversion errors
   when -Wconversion is set. Fixed oc2, but
   rest of netcdf remains to be done.
   HT to Nico Schlomer.
3. When doing #2, I discovered an error in ncgen.y
   that has remained hidden. This required some other
   test case fixes.
2014-03-08 20:41:30 -07:00
dmh
deeca5fb83 disable refcounting until semantics are decided 2014-03-07 14:56:52 -07:00
dmh
e3545bf88d 1. Allow files to be opened by name multiple
times, but returning the same ncid.
2. Separate out the dap auth tests
   and make them disabled by default.
3. turn of ncdap_test/test_varm3 until
   we can find a copy of coads_climatology.nc
2014-03-07 12:04:38 -07:00
Ward Fisher
e68710d465 Added a new cmake-based option, ENABLE_DOXYGEN_TODO_LIST. When used, the generated documentation will include a 'todo' page. This is generally for internal consumption only, so that pages and sections that need review or editing can be flagged. 2014-02-27 14:19:28 -07:00
Ward Fisher
75a71ffcf0 Reorganized doxygen documents, renamed .doc files as .dox.
Bumped revision to 4.3.1.2.  There may not be a 4.3.1.2 release, but I didn't want to leave it as 4.3.1.1.
Removed CMake-specific doxygen/documentation template, made changes required so that
CMake and autotools-based builds can use the same template (Doxyfile.in).
2014-02-19 16:32:26 -07:00
Quincey Koziol
b98a475f37 Minor tweaks to comments and LOG messages. 2014-02-17 13:34:05 -06:00
Quincey Koziol
fd981824c1 Correct handling of variablen-length sequences for attributes, plus uncomment a
bunch of tests that stress this area of the library.

Also clean up some compiler warnings in the dispatch code.
2014-02-14 08:07:14 -06:00
Quincey Koziol
b2dfacbcfa Big clean up to type handling in libsrc4, which makes fill-values work
correctly for variables with string datatype, plus a few other minor changes.
2014-02-11 17:12:08 -06:00
dmh
582410a407 [NCF-273]/HZY-708311
Add a new function called nc_inq_format_extended that
returns more detailed format information (vis-a-vis
nc_inq_format) about an open dataset.

Note that the netcdf API will present the file as if it had
the format specified by nc_inq_format.  The true file
format, however, may not even be a netcdf file; it might be
DAP, HDF4, or PNETCDF, for example. This function returns
that true file type.  It also returns the effective mode for
the file.

signature: nc_inq_format_extended(int ncid, int* formatp, int* modep)
where
* ncid is the NetCDF ID from a previous call to nc_open() or
  nc_create().
* formatp is a pointer to a location for returned true format.
* modep is a pointer to a location for returned mode flags.

Refer to the actual list in the file netcdf.h to see the
currently defined set.

Also added test cases (tst_formatx*).
2013-12-22 12:53:20 -07:00
dmh
a35d3c04d8 dfile.c:NC_open has a couple of
uninitialized local variables.
Fix was to initialize them.
2013-10-15 14:33:30 -06:00
Ward Fisher
f43bf8f1da Addressed a handful of issues identified by
Coverity static analysis.
2013-08-05 20:36:33 +00:00
Ward Fisher
909f569de0 Changed argument list of nc_rename_grp to match definition of nc_rename_grp,
changed invocation of nc_rename_grp in renamegroup.c.
2013-07-22 17:27:43 +00:00
Ward Fisher
0401fafb3b Changed argument list of nc_rename_grp to match definition of nc_rename_grp,
changed invocation of nc_rename_grp in renamegroup.c.
2013-07-22 17:04:54 +00:00
Dennis Heimbigner
b85d3568ec Added the necessary code to support
group renaming. The primary API
is 'nc_rename_grp(int grpid, const char* name)'.
No test cases provided yet.
This also required adding a rename_grp entry
to the dispatch tables.
2013-07-19 21:48:37 +00:00
Russ Rew
6cd8fca60d Quincey's fixes for NCF-250, netCDF-4 parallel independent access with
unlimited dimension hanging.  Extending the size of an unlimited
dimension in HDF5 must be a collective operation, so now an error is
returned if trying to extend in independent access mode.

Quincey's bug fixes for parallel build portability, particularly
OpenMPI on MacOS-X.
2013-07-08 21:31:13 +00:00
Russ Rew
58a63708cc Fix contributed by Nath Gopalaswamy to large file problem reading
netCDF classic or 64-bit offset files that have a UINT32_MAX flag for
large last record size of a variable that has values larger than 1
byte.  This problem had previously been fixed for *writing* such data,
but was only tested with an ncbyte variable.  Fixed test to
demonstrate problem and the fix.

More updates to chunking documentation, cosmetic fixes for some
"--option=" documentation that doxygen turns into mdash.
2013-06-25 17:04:10 +00:00
Ward Fisher
33d3d06971 Added initial 'make dist', 'make distcheck' support to
CMake-based builds.
2013-06-03 16:42:04 +00:00
Ward Fisher
1df00fa579 Re-added fix for very small files. 2013-05-22 18:56:52 +00:00
Dennis Heimbigner
228e8439d2 1. The code to parse a constraint
was losing the initial double quote
for a quoted string.
2. The code in ncuri.c was not properly
   handling occurrences of e.g. %xx
2013-05-16 21:37:58 +00:00
Dennis Heimbigner
253a26cb82 change format of url parameters in fragment part 2013-05-13 19:12:37 +00:00
Dennis Heimbigner
5be772b6c0 1. Moved all the PNETCDF code
(primarily from libsrc4)
   into its own dispatch library
   called libsrc5.

2. Fixed part of Jira NCF-253
   by removing the need for the
   pnetcdf_ndims field.
   For some reason, the original
   code tried to cache the variable
   ranks rather than computing them
   as needed. Fixed by doing
   an ...inq_varndims call as needed.

3. found some places where NC_MAX_DIMS
   was being stack allocated and changed
   to heap allocation.
   Still some cases in nc_test4.
2013-05-11 20:04:33 +00:00
Dennis Heimbigner
de34ed2d5b merge from netcdf/trunk prior to merge back to trunk 2013-05-11 19:37:38 +00:00
Dennis Heimbigner
cc7cd9a142 Fix part of JIRA NCF-253.
libdispatch/dv2i.c
now heap allocates rs[NC_MAX_VARS]
instead of stack allocation.
2013-05-10 18:15:11 +00:00
Dennis Heimbigner
c583f91992 merge with trunk and fix conflicts 2013-05-10 17:04:28 +00:00
Ward Fisher
2d0dbcfa1d Merged latest from CMake branche.
Fixed an error on very small files (< 4 bytes) that was only occuring on sol. Updated CMake configuration file.
2013-05-01 23:55:24 +00:00
Dennis Heimbigner
19c1c11f1d It turns out that my dap code
is not properly checking the incoming
count argument for nc_get_vars.
It is treating the count as pre-stride
rather than post-stride.
2013-05-01 22:31:01 +00:00
Ward Fisher
67f96188ff Merged latest from netCDF-cmake branch in preparation for 4.3.0 release. 2013-04-23 21:50:07 +00:00
Ward Fisher
b113f6f8b6 Merged a handful of changes from netcdf-cmake branch.
Addressed the following coverity issues:

711762
711763
711766
711788
711933
711934
711935
2013-04-16 23:02:54 +00:00
Dennis Heimbigner
c659633d2e merge from trunk 2013-03-26 16:45:02 +00:00
Dennis Heimbigner
ab17dded89 Caron says to use thredds-test
as the default test server.
2013-03-25 18:01:32 +00:00
Dennis Heimbigner
b15a7b1191 Make some initial changes to support move to thredds.ucar.edu 2013-03-25 17:44:08 +00:00
Dennis Heimbigner
9b4db7a039 Make some things static that do not need to be externally visible 2013-03-24 17:33:17 +00:00
Dennis Heimbigner
11c2083b1c Add note about nc_put/get_varm to discourage their use 2013-03-17 21:23:28 +00:00
Dennis Heimbigner
dea3c726c8 merge trunk into this branch 2013-03-15 20:31:07 +00:00
Dennis Heimbigner
1abb2ecb56 Fix jira NCF-243
Problem was that the NC_create
code was not checking for the NC_CLASSIC_MODEL
mode flag in deciding what dispatch table to use.
This meant that it was then defaulting to use
the default format, and if that was changed
to e.g. NC_FORMAT_NETCDF4, then it would try
to create a netcdf-4 format file, even is
NC_CLASSIC_MODEL mode flag was set.
2013-03-15 20:03:59 +00:00
Dennis Heimbigner
9eaac2a595 Apply Wei-Keng's fix
for JIRA issue NCF-241.
This is only temporary
until I can make pnetcdf
operate as a separate dispatch table.

Also, fix nc_test4/tst_pnetcdf
to open with nc_open_par;
this is necessary because a pnetcdf
created file cannot be opened
as a netcdf classic file.
2013-03-13 17:34:47 +00:00
Ward Fisher
0444a6c711 Fixed a couple of tests on Windows,
Fixed some compile errors on Windows.
2013-02-21 23:56:15 +00:00
Ward Fisher
ddf3c31bb0 Corrected a handful of syntax issues in CMake config files,
probably introduced more.  

Added CMake-related files to Makefile.am files for inclusion
when creating a distribution package.
2013-02-20 23:28:28 +00:00
Dennis Heimbigner
b0b6c77a3e 1. corrected the nc_get_varm/put_varm documentation
to indicate that they only work for atomic types,
   not user defined types.

2. modified NCDEFAULT_{get/put}_vars to no longer use
   nc_get/put_varm. They now directly use nc_get/put_vara
   directly. This means that nc_get/put_vars now work
   properly for user defined types as well as atomic types.

3. Added test cases for get_vars/put_vars with a
   user defined type. Tests placed into
   nc_test/tst_compounds.c
2013-02-17 23:42:15 +00:00
Russ Rew
ba1a494579 Fix bug NCF-226 2013-02-11 18:04:03 +00:00
Dennis Heimbigner
4109174d00 Add quick check for Error {...} at start of the datadds data part 2013-02-07 22:14:57 +00:00
Ward Fisher
ff062bb588 Fixed a windows-specific issue in nc_open. When attempting to
read 4 bytes from a 3 byte file, Windows would fail with an
error 22, "Invalid Operation". This would happen when trying to
read the 4-byte magic number from a very small file.

This problem was uncovered by nc_test/tst_misc.c.  

When fread returns 0 and errno is 22, NC_ENOTNC is returned.
2013-01-24 20:23:18 +00:00
Russ Rew
2e29d2876e Distinguish between NC_MAX_DIMS and NC_MAX_VAR_DIMS 2013-01-23 23:31:34 +00:00
Russ Rew
c7e69906a5 Finish fix of Jira ticket NCF-216, modifying nc_copy_var() limitation so that dimension IDs in output don't have to match dimension IDs in input. 2013-01-23 21:46:22 +00:00
Dennis Heimbigner
0d8c0b9276 more pnetcdf fixes 2013-01-18 02:25:12 +00:00
Ward Fisher
91188cea7a Merging CMake branch into trunk. Changes include:
CMake related changes in CMakeLists.txt files,
cmake_config.h.in. Other changes relate to 
Windows-specific issues, and changes made
when regenerating generated source files.
2013-01-15 22:43:09 +00:00
Ward Fisher
7b91248723 Merged changes from netcdf-branch.
o Changed variable names 'typeid' to 'typeid1' to avoid a namespace conflict
in visual studio.
o Cleaned up a handful of warnings in Visual Studio.
o Addressed a few Coverity-discovered issuesl
o Made changes to CMake-based builds.
2012-12-13 22:09:41 +00:00
Russ Rew
068b35cb4d Updated doxygen and texinfo documentation for nc_var_copy function. 2012-12-13 18:00:03 +00:00
Dennis Heimbigner
fc91587e26 Fix weird code in nc.c/free_NC; wonder how it got that way? 2012-12-11 23:51:05 +00:00
Dennis Heimbigner
6bed1e932e fix previous change to ensure proper return code 2012-12-07 02:25:57 +00:00
Dennis Heimbigner
c114861e68 fix dfile.c error reporting 2012-12-06 21:17:36 +00:00
Ward Fisher
81280c7878 Merge from latest netcdf-cmake branch.
- Fixes for Windows.
- CMake-based changes (functionality, tests).
- Smattering of coverity-informed bug-fixes.
2012-12-05 18:35:42 +00:00
Ward Fisher
027e503c3e Fixed a dangling pointer post-free. Marcos uncovered this issue
when using netcdf on linux via JNI.
2012-11-27 23:56:36 +00:00
Russ Rew
592a120a55 Fixed bug NCF-206 (Fix strided access for NC_STRING type). Verified
fix with new test for strided access for NC_STRING type.
2012-11-19 17:20:53 +00:00
Ward Fisher
7a226dd3f1 Merging the win_netcdf branch into the trunk. 2012-09-27 22:50:41 +00:00
Ward Fisher
f2d2ddf435 2012-09-26 20:30:19 +00:00
Ward Fisher
98675a8047 Merged with latest trunk. 2012-09-26 17:08:23 +00:00
Russ Rew
a92c7c98a0 Fixed DOS line endings in source file.
Fixed minor memory leak found by Coverity.
Fixed misleading error message in configure.
2012-09-25 21:48:14 +00:00
Ward Fisher
f820e5e5ee 2012-09-10 21:19:57 +00:00
Ward Fisher
54a3c8290a 2012-09-07 16:34:23 +00:00