netcdf-c/libdispatch
Dennis Heimbigner ccc70d640b re: esupport MQO-415619
and https://github.com/Unidata/netcdf-c/issues/708

Expand the NC_INMEMORY capabilities to support writing and accessing
the final modified memory.

Three new functions have been added:
nc_open_memio, nc_create_mem, and nc_close_memio.

The following new capabilities were added.
1. nc_open_memio() allows the NC_WRITE mode flag
   so a chunk of memory can be passed in and be modified
2. nc_create_mem() allows the NC_INMEMORY flag to be set
   to cause the created file to be kept in memory.
3. nc_close_mem() allows the final in-memory contents to be
   retrieved at the time the file is closed.
4. A special flag, NC_MEMIO_LOCK, is provided to ensure that
   the provided memory will not be freed or reallocated.

Note the following.
1. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is not set,
   then the netcdf-c library will take control of the incoming memory.
   This means that the original memory block should not be freed
   but the block returned by nc_close_mem() must be freed.
2. If nc_open_memio() is called with NC_WRITE, and NC_MEMIO_LOCK is set,
   then modifications to the original memory may fail if the space available
   is insufficient.

Documentation is provided in the file docs/inmemory.md.
A test case is provided: nc_test/tst_inmemory.c driven by
nc_test/run_inmemory.sh

WARNING: changes were made to the dispatch table for
the close entry. From int (*close)(int) to int (*close)(int,void*).
2018-02-25 21:45:31 -07:00
..
u Resolves Github issue https://github.com/Unidata/netcdf-c/issues/349. 2017-02-16 14:27:54 -07:00
CMakeLists.txt Merge branch 'master' into filters.dmh 2017-11-13 11:15:02 -07:00
datt.c added return code documentation for dtype.c and datt.c 2017-11-15 04:08:58 -07:00
dattget.c fixed doxygen warnings for this file 2017-11-13 06:27:05 -07:00
dattinq.c fixed doxygen warnings in dattinq.c 2017-11-14 11:22:48 -07:00
dattput.c Reverting global fillvalue behavior. 2017-10-05 18:15:27 -06:00
dauth.c Fix build on pre-C99 compilers 2017-11-26 01:47:54 +05:30
dcompound.c Fixed netcdf-c issue #30 (on github) related to cmake-generated nc-config script. 2014-03-11 13:07:04 -06:00
dcopy.c more docs 2017-12-04 13:11:54 -07:00
ddim.c This is the initial step in moving to the new higher performance 2018-02-08 19:53:40 -07:00
ddispatch.c fixed warnings 2017-11-09 06:24:18 -07:00
defcheck.c Modified a number of tests 2014-10-04 15:59:16 -06:00
denum.c doxygen work on netcdf4 functions 2011-07-14 12:21:03 +00:00
derror.c re: esupport MQO-415619 2018-02-25 21:45:31 -07:00
dfile.c re: esupport MQO-415619 2018-02-25 21:45:31 -07:00
dfilter.c re: GH Issue https://github.com/Unidata/netcdf-c/issues/806 2018-01-25 13:51:42 -07:00
dgroup.c Filled in short description for group-related functions in support of https://github.com/Unidata/netcdf-c/issues/277 full documentation still pending. 2016-07-11 16:55:30 -06:00
dinternal.c Add szip support via libaec 2017-08-27 13:35:20 -06:00
doffsets.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
dopaque.c doxygen work on netcdf4 functions 2011-07-14 12:21:03 +00:00
dparallel.c fixed doxygen warnings by adding docs 2017-11-14 06:48:38 -07:00
drc.c This is the initial step in moving to the new higher performance 2018-02-08 19:53:40 -07:00
dstring.c Begin changing over to use strlcat instead of strncat because 2017-11-23 10:55:24 -07:00
dtype.c further test development, added documentation for uncommitted user-defined types, fixed check of return value 2018-01-18 06:47:50 -07:00
dutf8.c re: pull request https://github.com/Unidata/netcdf-c/pull/364 2017-06-06 15:23:59 -06:00
dutil.c re: esupport MQO-415619 2018-02-25 21:45:31 -07:00
dv2i.c more docs, more cleaning 2017-12-04 12:21:14 -07:00
dvar.c re: esupport MQO-415619 2018-02-25 21:45:31 -07:00
dvarget.c more docs, more cleaning 2017-12-04 12:21:14 -07:00
dvarinq.c documentation fixes for dvarinq.c 2017-11-15 04:50:28 -07:00
dvarput.c more docs, more cleaning 2017-12-04 12:21:14 -07:00
dvlen.c Minor tweaks to comments and LOG messages. 2014-02-17 13:34:05 -06:00
dwinpath.c re e-support UBS-599337 2017-10-24 16:25:09 -06:00
heap Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
json.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
Make0 Fix pull request https://github.com/Unidata/netcdf-c/pull/374 (dap4.dmh) 2017-04-03 21:39:44 -06:00
Makefile.am removed non-working BUILD_DLL target 2017-11-30 05:40:17 -07:00
nc.c re e-support UBS-599337 2017-10-24 16:25:09 -06:00
ncaux.c Coverity: 711838 2014-07-31 16:32:50 -06:00
ncbytes.c This is the initial step in moving to the new higher performance 2018-02-08 19:53:40 -07:00
nchashmap.c This is the initial step in moving to the new higher performance 2018-02-08 19:53:40 -07:00
nclist.c This is the initial step in moving to the new higher performance 2018-02-08 19:53:40 -07:00
nclistmgr.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
nclog.c Primary change: add dap4 support 2017-03-08 17:01:10 -07:00
ncsettings.hdr Add ability to programmatically 2014-08-29 14:51:14 -06:00
nctime.c Solve issue https://github.com/Unidata/netcdf-c/issues/359 2017-07-24 18:59:16 -06:00
ncuri.c Eliminate warning from clang compilers. 2018-01-11 10:31:13 -07:00
netcdf.m4 In preparation for adding dap4 support, I have cleaned up 2014-03-24 14:02:52 -06:00
stubdef.c rebuilt dap constraints 2011-04-16 20:56:36 +00:00
test_ncuri.c Error in ncuri in handling user:pwd@ in url 2017-07-05 14:39:23 -06:00
test_pathcvt.c found a few more easy warnings 2017-11-09 06:39:43 -07:00
u8.c Resolves Github issue https://github.com/Unidata/netcdf-c/issues/349. 2017-02-16 14:27:54 -07:00
u8.h Resolves Github issue https://github.com/Unidata/netcdf-c/issues/349. 2017-02-16 14:27:54 -07:00
utf8proc_data.c Refactored additional constants. 2017-02-28 11:15:51 -07:00
utf8proc.c Fix build on pre-C99 compilers 2017-11-26 01:47:54 +05:30
utf8proc.h Use refactored variable names introduced by 773fe807 2017-11-26 01:47:46 +05:30