mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
3c7ffcc6d1
Fix https://github.com/Unidata/netcdf-c/issues/962 1. remove the --disable-diskless option since it is no longer needed. Similarly for CMakeLists.txt. 2. Fixed nc4files.c where BAIL and return were mixed leading to situation where cleanup code was not being invoked. This probably occurs elsewhere, but I did not find any specifically.
59 lines
1.6 KiB
C
59 lines
1.6 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);
|
|
|
|
extern int ncMemory_create(const char *path, int ioflags, ncstdio** filepp);
|
|
extern int ncMemory_open(const char *path, int ioflags, ncstdio** filepp);
|
|
|
|
#endif /* _NCSTDIO_H_* /
|