File: ncgen.h

package info (click to toggle)
minc 2.1.10-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,160 kB
  • sloc: ansic: 82,507; sh: 10,666; yacc: 1,187; perl: 612; makefile: 586; lex: 319
file content (60 lines) | stat: -rw-r--r-- 2,407 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef NC_NCGEN_H
#define NC_NCGEN_H
/*********************************************************************
 *   Copyright 1993, UCAR/Unidata
 *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
 *   $Header: /private-cvsroot/minc/progs/mincgen/ncgen.h,v 1.2 2007-02-02 18:49:36 baghdadi Exp $
 *********************************************************************/

#define MAX_NC_ATTSIZE    500000     /* max size of attribute (for ncgen) */
#define MAXTRST		  100000     /* max size of string value (for ncgen) */

/* True if string a equals string b*/
#define	STREQ(a, b)	(*(a) == *(b) && strcmp((a), (b)) == 0)

#include "generic.h"

extern int ncid;		/* handle for netCDF */
extern int ndims;		/* number of dimensions declared for netcdf */
extern int nvars;		/* number of variables declared for netcdf */
extern int natts;		/* number of attributes */
extern int nvdims;		/* number of dimensions for variables */
extern int dimnum;		/* dimension number index for variables */
extern int varnum;		/* variable number index for attributes */
extern int valnum;		/* number of values specified for variable */
extern int rec_dim;		/* number of the unlimited dimension, if any */
extern size_t rec_len;		/* number of elements for a record of data */
extern size_t var_len;		/* variable length (product of dimensions) */
extern size_t var_size;		/* size of each element of variable */
extern int is_hdf5;

extern struct dims {
    size_t size;
    char *name;
    char *lname;		/* with no "-" characters, for C and Fortran */
} *dims;			/* table of dimensions */

extern struct vars {
    char *name;
    nc_type type;
    int ndims;
    int *dims;			/* array of dimension ids */
    union generic fill_value;	/* set to value of _FillValue attribute */
    int has_data;		/* 1 if data specified, 0 otherwise */
    size_t nrecs;		/* for record variables, number of records
				 * of data in CDL */
    char *data_stmnt;		/* for record variables, to avoid
				 * two passes with -f option */
    char *lname;		/* with no "-" characters, for C and Fortran */
} *vars;			/* table of variables */


extern struct atts {
    int var;			/* number of variable for this attribute */
    char *name;
    nc_type type;
    size_t len;
    void *val;
    char *lname;		/* with no "-" characters, for C and Fortran */
} *atts;			/* table of variable and global attributes */
#endif /*!NC_NCGEN_H*/