mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
cleanup of whitespace in include directory
This commit is contained in:
parent
298e8dc737
commit
58a801c91a
@ -24,30 +24,30 @@ static int total_err = 0, err = 0;
|
||||
|
||||
/* This macro prints an error message with line number and name of
|
||||
* test program. */
|
||||
#define ERR do { \
|
||||
fflush(stdout); /* Make sure our stdout is synced with stderr. */ \
|
||||
err++; \
|
||||
fprintf(stderr, "Sorry! Unexpected result, %s, line: %d\n", \
|
||||
__FILE__, __LINE__); \
|
||||
fflush(stderr); \
|
||||
return 2; \
|
||||
} while (0)
|
||||
#define ERR do { \
|
||||
fflush(stdout); /* Make sure our stdout is synced with stderr. */ \
|
||||
err++; \
|
||||
fprintf(stderr, "Sorry! Unexpected result, %s, line: %d\n", \
|
||||
__FILE__, __LINE__); \
|
||||
fflush(stderr); \
|
||||
return 2; \
|
||||
} while (0)
|
||||
|
||||
/* Duplicate with different name. */
|
||||
#define ERR_RET ERR
|
||||
|
||||
#define ERR_GOTO do { \
|
||||
fflush(stdout); /* Make sure our stdout is synced with stderr. */ \
|
||||
fprintf(stderr, "Sorry! Unexpected result, %s, line: %d\n", \
|
||||
__FILE__, __LINE__); \
|
||||
goto error; \
|
||||
} while (0)
|
||||
#define ERR_GOTO do { \
|
||||
fflush(stdout); /* Make sure our stdout is synced with stderr. */ \
|
||||
fprintf(stderr, "Sorry! Unexpected result, %s, line: %d\n", \
|
||||
__FILE__, __LINE__); \
|
||||
goto error; \
|
||||
} while (0)
|
||||
|
||||
int ERR_report(int stat, const char* file, int line)
|
||||
{
|
||||
fflush(stdout);
|
||||
fprintf(stderr, "Sorry! Unexpected result, %s, line: %d; status=%d\n",
|
||||
file,line,stat);
|
||||
file,line,stat);
|
||||
fflush(stderr);
|
||||
return 1;
|
||||
}
|
||||
@ -56,39 +56,39 @@ int ERR_report(int stat, const char* file, int line)
|
||||
|
||||
/* After a set of tests, report the number of errors, and increment
|
||||
* total_err. */
|
||||
#define SUMMARIZE_ERR do { \
|
||||
if (err) \
|
||||
{ \
|
||||
printf("%d failures\n", err); \
|
||||
total_err += err; \
|
||||
err = 0; \
|
||||
} \
|
||||
else \
|
||||
printf("ok.\n"); \
|
||||
} while (0)
|
||||
#define SUMMARIZE_ERR do { \
|
||||
if (err) \
|
||||
{ \
|
||||
printf("%d failures\n", err); \
|
||||
total_err += err; \
|
||||
err = 0; \
|
||||
} \
|
||||
else \
|
||||
printf("ok.\n"); \
|
||||
} while (0)
|
||||
|
||||
/* This macro prints out our total number of errors, if any, and exits
|
||||
* with a 0 if there are not, or a 2 if there were errors. Make will
|
||||
* stop if a non-zero value is returned from a test program. */
|
||||
#define FINAL_RESULTS do { \
|
||||
if (total_err) \
|
||||
{ \
|
||||
printf("%d errors detected! Sorry!\n", total_err); \
|
||||
return 2; \
|
||||
} \
|
||||
printf("*** Tests successful!\n"); \
|
||||
return 0; \
|
||||
} while (0)
|
||||
#define FINAL_RESULTS do { \
|
||||
if (total_err) \
|
||||
{ \
|
||||
printf("%d errors detected! Sorry!\n", total_err); \
|
||||
return 2; \
|
||||
} \
|
||||
printf("*** Tests successful!\n"); \
|
||||
return 0; \
|
||||
} while (0)
|
||||
|
||||
/* This macro does the same as FINAL_RESULTS, but without the success
|
||||
* message. */
|
||||
#define FINAL_RESULTS_QUIET do { \
|
||||
if (total_err) \
|
||||
{ \
|
||||
printf("%d errors detected! Sorry!\n", total_err); \
|
||||
return 2; \
|
||||
} \
|
||||
return 0; \
|
||||
} while (0)
|
||||
#define FINAL_RESULTS_QUIET do { \
|
||||
if (total_err) \
|
||||
{ \
|
||||
printf("%d errors detected! Sorry!\n", total_err); \
|
||||
return 2; \
|
||||
} \
|
||||
return 0; \
|
||||
} while (0)
|
||||
|
||||
#endif /* _ERR_MACROS_H */
|
||||
|
@ -25,38 +25,38 @@
|
||||
/* Stuff below is for hdf4 files. */
|
||||
typedef struct NC_VAR_HDF4_INFO
|
||||
{
|
||||
int sdsid;
|
||||
int hdf4_data_type;
|
||||
int sdsid;
|
||||
int hdf4_data_type;
|
||||
} NC_VAR_HDF4_INFO_T;
|
||||
|
||||
typedef struct NC_HDF4_FILE_INFO
|
||||
{
|
||||
int sdid;
|
||||
int sdid;
|
||||
} NC_HDF4_FILE_INFO_T;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
extern int
|
||||
NC_HDF4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
|
||||
void *parameters, NC_Dispatch *, NC *);
|
||||
extern int
|
||||
NC_HDF4_open(const char *path, int mode, int basepe, size_t *chunksizehintp,
|
||||
void *parameters, NC_Dispatch *, NC *);
|
||||
|
||||
extern int
|
||||
NC_HDF4_abort(int ncid);
|
||||
extern int
|
||||
NC_HDF4_abort(int ncid);
|
||||
|
||||
extern int
|
||||
NC_HDF4_close(int ncid, void *ignore);
|
||||
extern int
|
||||
NC_HDF4_close(int ncid, void *ignore);
|
||||
|
||||
extern int
|
||||
NC_HDF4_inq_format(int ncid, int *formatp);
|
||||
extern int
|
||||
NC_HDF4_inq_format(int ncid, int *formatp);
|
||||
|
||||
extern int
|
||||
NC_HDF4_inq_format_extended(int ncid, int *formatp, int *modep);
|
||||
extern int
|
||||
NC_HDF4_inq_format_extended(int ncid, int *formatp, int *modep);
|
||||
|
||||
extern int
|
||||
NC_HDF4_get_vara(int ncid, int varid, const size_t *start, const size_t *count,
|
||||
void *value, nc_type);
|
||||
extern int
|
||||
NC_HDF4_get_vara(int ncid, int varid, const size_t *start, const size_t *count,
|
||||
void *value, nc_type);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
@ -18,40 +18,40 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
EXTERNL int
|
||||
NC4_HDF5_inq_att(int ncid, int varid, const char *name,
|
||||
nc_type *xtypep, size_t *lenp);
|
||||
EXTERNL int
|
||||
NC4_HDF5_inq_att(int ncid, int varid, const char *name,
|
||||
nc_type *xtypep, size_t *lenp);
|
||||
|
||||
EXTERNL int
|
||||
NC4_HDF5_inq_attid(int ncid, int varid, const char *name, int *idp);
|
||||
EXTERNL int
|
||||
NC4_HDF5_inq_attid(int ncid, int varid, const char *name, int *idp);
|
||||
|
||||
EXTERNL int
|
||||
NC4_HDF5_inq_attname(int ncid, int varid, int attnum, char *name);
|
||||
EXTERNL int
|
||||
NC4_HDF5_inq_attname(int ncid, int varid, int attnum, char *name);
|
||||
|
||||
EXTERNL int
|
||||
NC4_HDF5_rename_att(int ncid, int varid, const char *name, const char *newname);
|
||||
EXTERNL int
|
||||
NC4_HDF5_rename_att(int ncid, int varid, const char *name, const char *newname);
|
||||
|
||||
EXTERNL int
|
||||
NC4_HDF5_del_att(int ncid, int varid, const char*);
|
||||
EXTERNL int
|
||||
NC4_HDF5_del_att(int ncid, int varid, const char*);
|
||||
|
||||
EXTERNL int
|
||||
NC4_HDF5_put_att(int ncid, int varid, const char *name, nc_type datatype,
|
||||
size_t len, const void *value, nc_type);
|
||||
EXTERNL int
|
||||
NC4_HDF5_put_att(int ncid, int varid, const char *name, nc_type datatype,
|
||||
size_t len, const void *value, nc_type);
|
||||
|
||||
EXTERNL int
|
||||
NC4_HDF5_get_att(int ncid, int varid, const char *name, void *value, nc_type);
|
||||
EXTERNL int
|
||||
NC4_HDF5_get_att(int ncid, int varid, const char *name, void *value, nc_type);
|
||||
|
||||
EXTERNL int
|
||||
NC4_HDF5_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
|
||||
int *ndimsp, int *dimidsp, int *nattsp,
|
||||
int *shufflep, int *deflatep, int *deflate_levelp,
|
||||
int *fletcher32p, int *contiguousp, size_t *chunksizesp,
|
||||
int *no_fill, void *fill_valuep, int *endiannessp,
|
||||
unsigned int *idp, size_t *nparamsp, unsigned int *params);
|
||||
EXTERNL int
|
||||
NC4_HDF5_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
|
||||
int *ndimsp, int *dimidsp, int *nattsp,
|
||||
int *shufflep, int *deflatep, int *deflate_levelp,
|
||||
int *fletcher32p, int *contiguousp, size_t *chunksizesp,
|
||||
int *no_fill, void *fill_valuep, int *endiannessp,
|
||||
unsigned int *idp, size_t *nparamsp, unsigned int *params);
|
||||
|
||||
EXTERNL int
|
||||
NC4_HDF5_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems,
|
||||
float preemption);
|
||||
EXTERNL int
|
||||
NC4_HDF5_set_var_chunk_cache(int ncid, int varid, size_t size, size_t nelems,
|
||||
float preemption);
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
* code outside libhdf5.
|
||||
*
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef _HDF5INTERNAL_
|
||||
#define _HDF5INTERNAL_
|
||||
@ -54,47 +54,47 @@
|
||||
/** Strut to hold HDF5-specific info for the file. */
|
||||
typedef struct NC_HDF5_FILE_INFO
|
||||
{
|
||||
hid_t hdfid;
|
||||
hid_t hdfid;
|
||||
} NC_HDF5_FILE_INFO_T;
|
||||
|
||||
/* This is a struct to handle the dim metadata. */
|
||||
typedef struct NC_HDF5_DIM_INFO
|
||||
{
|
||||
hid_t hdf_dimscaleid; /* Non-zero if a DIM_WITHOUT_VARIABLE dataset is in use (no coord var). */
|
||||
HDF5_OBJID_T hdf5_objid;
|
||||
hid_t hdf_dimscaleid; /* Non-zero if a DIM_WITHOUT_VARIABLE dataset is in use (no coord var). */
|
||||
HDF5_OBJID_T hdf5_objid;
|
||||
} NC_HDF5_DIM_INFO_T;
|
||||
|
||||
/** Strut to hold HDF5-specific info for attributes. */
|
||||
typedef struct NC_HDF5_ATT_INFO
|
||||
{
|
||||
hid_t native_hdf_typeid; /* Native HDF5 datatype for attribute's data */
|
||||
hid_t native_hdf_typeid; /* Native HDF5 datatype for attribute's data */
|
||||
} NC_HDF5_ATT_INFO_T;
|
||||
|
||||
/* Struct to hold HDF5-specific info for a group. */
|
||||
typedef struct NC_HDF5_GRP_INFO
|
||||
{
|
||||
hid_t hdf_grpid;
|
||||
hid_t hdf_grpid;
|
||||
} NC_HDF5_GRP_INFO_T;
|
||||
|
||||
/* Struct to hold HDF5-specific info for a variable. */
|
||||
typedef struct NC_HDF5_VAR_INFO
|
||||
{
|
||||
hid_t hdf_datasetid;
|
||||
HDF5_OBJID_T *dimscale_hdf5_objids;
|
||||
hid_t hdf_datasetid;
|
||||
HDF5_OBJID_T *dimscale_hdf5_objids;
|
||||
} NC_HDF5_VAR_INFO_T;
|
||||
|
||||
/* Struct to hold HDF5-specific info for a field. */
|
||||
typedef struct NC_HDF5_FIELD_INFO
|
||||
{
|
||||
hid_t hdf_typeid;
|
||||
hid_t native_hdf_typeid;
|
||||
hid_t hdf_typeid;
|
||||
hid_t native_hdf_typeid;
|
||||
} NC_HDF5_FIELD_INFO_T;
|
||||
|
||||
/* Struct to hold HDF5-specific info for a type. */
|
||||
typedef struct NC_HDF5_TYPE_INFO
|
||||
{
|
||||
hid_t hdf_typeid;
|
||||
hid_t native_hdf_typeid;
|
||||
hid_t hdf_typeid;
|
||||
hid_t native_hdf_typeid;
|
||||
} NC_HDF5_TYPE_INFO_T;
|
||||
|
||||
/* Logging and debugging. */
|
||||
@ -120,7 +120,7 @@ int nc4_open_var_grp2(NC_GRP_INFO_T *grp, int varid, hid_t *dataset);
|
||||
NC_TYPE_INFO_T *nc4_rec_find_hdf_type(NC_FILE_INFO_T* h5,
|
||||
hid_t target_hdf_typeid);
|
||||
int nc4_get_hdf_typeid(NC_FILE_INFO_T *h5, nc_type xtype,
|
||||
hid_t *hdf_typeid, int endianness);
|
||||
hid_t *hdf_typeid, int endianness);
|
||||
|
||||
/* Enddef and closing files. */
|
||||
int nc4_close_hdf5_file(NC_FILE_INFO_T *h5, int abort, NC_memio *memio);
|
||||
|
Loading…
Reference in New Issue
Block a user