2010-06-03 21:24:43 +08:00
|
|
|
/*********************************************************************
|
2018-12-07 06:36:53 +08:00
|
|
|
* Copyright 2018, University Corporation for Atmospheric Research
|
2010-06-03 21:24:43 +08:00
|
|
|
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
|
2018-01-18 00:20:20 +08:00
|
|
|
* Russ Rew
|
2010-06-03 21:24:43 +08:00
|
|
|
*********************************************************************/
|
2018-01-18 00:20:20 +08:00
|
|
|
#ifndef _VARDATA_H
|
|
|
|
#define _VARDATA_H
|
2010-06-03 21:24:43 +08:00
|
|
|
|
|
|
|
extern char *progname; /* for error messages */
|
|
|
|
|
|
|
|
/* Display for user-defined fill values and default floating-point fill
|
|
|
|
values; should match what ncgen looks for in ../ncgen/ncgen.l */
|
|
|
|
#define FILL_STRING "_"
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Output the data for a single variable, in CDL syntax. */
|
|
|
|
extern int vardata ( const ncvar_t*, /* variable */
|
|
|
|
size_t [], /* variable dimension lengths */
|
|
|
|
int, /* netcdf id */
|
2011-09-01 02:28:08 +08:00
|
|
|
int /* variable id */
|
2010-06-03 21:24:43 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
/* Output the data for a single variable, in NcML syntax. */
|
|
|
|
extern int vardatax ( const ncvar_t*, /* variable */
|
|
|
|
size_t [], /* variable dimension lengths */
|
|
|
|
int, /* netcdf id */
|
2011-09-01 02:28:08 +08:00
|
|
|
int /* variable id */
|
2010-06-03 21:24:43 +08:00
|
|
|
);
|
|
|
|
|
|
|
|
/* set maximum line length */
|
|
|
|
extern void set_max_len ( int len );
|
|
|
|
|
|
|
|
/* print string with current indent and splitting long lines, if needed */
|
|
|
|
extern void lput( const char *string );
|
|
|
|
|
2011-09-01 02:28:08 +08:00
|
|
|
/* like lput, but with options to support formatting with appended comments */
|
2012-11-17 05:37:43 +08:00
|
|
|
extern void lput2( const char *string, bool_t first, bool_t wrap);
|
2011-09-01 02:28:08 +08:00
|
|
|
|
2010-06-03 21:24:43 +08:00
|
|
|
/* print values of an attribute */
|
2011-09-01 02:28:08 +08:00
|
|
|
extern void pr_any_att_vals( const ncatt_t *attp, const void *vals );
|
2010-06-03 21:24:43 +08:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2018-01-18 00:20:20 +08:00
|
|
|
|
|
|
|
#endif /* _VARDATA_H */
|