mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-12-03 08:01:25 +08:00
99eef24bc2
- Fix NCF-157 to modify DAP code to support partial variable retrieval. - Fix of NCF-154 to solve problem of ncgen improperly processing data lists for variables of size greater than 2**18 bytes. - Fix ncgen processing of char variables that have multiple unlimited dimensions. - Partly fix Jira issue: NCF-145 (vlen issues). - Benchmark program nc_test4/tst_ar4_*) requires arguments and should only be invoked inside a shell script; fixed so that they terminate cleanly if invoked with no arguments. - Fix the Doxygen processing so it will work with make distcheck. - Begin switchover to using an alternative to ncio. - Begin support for in-memory (diskless) files.
61 lines
1.7 KiB
C
61 lines
1.7 KiB
C
/*
|
|
* Copyright 2012, University Corporation for Atmospheric Research
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
|
*/
|
|
|
|
#ifndef _NCSTDIO_H_
|
|
#define _NCSTDIO_H_
|
|
|
|
typedef struct ncstdio ncstdio; /* forward reference */
|
|
/*
|
|
* netcdf i/o abstraction
|
|
*/
|
|
struct ncstdio {
|
|
int ioflags; /* make visible for fIsSet macro access*/
|
|
/* Internal state of the stdio dispatcher */
|
|
void* state;
|
|
/* dispatch functions; never called directly by any higher-level code */
|
|
struct ncstdio_ops {
|
|
int (*read)(ncstdio*,void*,const size_t,size_t*);
|
|
int (*write)(ncstdio*,const void*,const size_t,size_t*);
|
|
int (*free)(ncstdio*);
|
|
int (*close)(ncstdio*,int);
|
|
int (*flush)(ncstdio*)
|
|
int (*seek)(ncstdio*,off_t);
|
|
int (*sync)(ncstdio*);
|
|
int (*uid)(ncstdio*,int*);
|
|
} ops;
|
|
};
|
|
|
|
extern int
|
|
ncstdio_close(ncstdio* ncstdiop, int deletefile);
|
|
|
|
extern int
|
|
ncstdio_flush(ncstdio* ncstdiop);
|
|
|
|
extern int
|
|
ncstdio_seek(ncstdio* ncstdiop, off_t pos);
|
|
|
|
extern int
|
|
ncstdio_sync(ncstdio* ncstdiop);
|
|
|
|
extern int
|
|
ncstdio_read(ncstdio* ncstdiop, void* memory, const size_t size, size_t* actual);
|
|
|
|
extern int
|
|
ncstdio_write(ncstdio* ncstdiop, const void* memory, const size_t size, size_t* actual);
|
|
|
|
extern int
|
|
ncstdio_uid(ncstdio* ncstdiop,int*);
|
|
|
|
/* export all known ncstdio implementation create/open procedures */
|
|
extern int ncFile_create(const char *path, int ioflags, ncstdio** filepp);
|
|
extern int ncFile_open(const char *path, int ioflags, ncstdio** filepp);
|
|
|
|
#ifdef USE_DISKLESS
|
|
extern int ncMemory_create(const char *path, int ioflags, ncstdio** filepp);
|
|
extern int ncMemory_open(const char *path, int ioflags, ncstdio** filepp);
|
|
#endif
|
|
|
|
#endif /* _NCSTDIO_H_* /
|