File: dumplib.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 (72 lines) | stat: -rw-r--r-- 2,113 bytes parent folder | download | duplicates (9)
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
61
62
63
64
65
66
67
68
69
70
71
72
/*********************************************************************
 *   Copyright 1993, University Corporation for Atmospheric Research
 *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
 *   $Header: /private-cvsroot/minc/progs/mincdump/dumplib.h,v 1.1 2004-04-27 15:35:15 bert Exp $
 *********************************************************************/

extern char *progname;		/* for error messages */

#define NO_NETCDF_2		/* assert we aren't using any netcdf-2 stuff */

#ifndef EXIT_FAILURE
#ifndef vms
#define EXIT_SUCCESS 0
#define EXIT_FAILURE 1
#else
#define EXIT_SUCCESS 1
#define EXIT_FAILURE 0
#endif
#endif

#define FLT_DIGITS 7		/* default sig. digits for float data */
#define DBL_DIGITS 15		/* default sig. digits for double data */

extern int float_precision_specified; /* -p option specified float precision */
extern int double_precision_specified; /* -p option specified double precision */
extern char float_var_fmt[];
extern char double_var_fmt[];
extern char float_att_fmt[];
extern char double_att_fmt[];

#ifdef __cplusplus
extern "C" {
#endif

/* Print error message to stderr and exit */
extern void	error ( const char *fmt, ... );

/* set position in line before lput() calls */
extern void	set_indent ( int indent );

/* set maximum line length */
extern void	set_max_len ( int len );

/* splits lines to keep them short */
extern void	lput ( const char *string );

/* In case different formats specified with -d option, set them here. */
extern void	set_formats ( int flt_digs, int dbl_digs );

/* Determine print format to use for each value for this variable. */
char *		get_fmt ( int ncid, int varid, nc_type type );

/* structure for list of variables specified with -v option */
struct vnode
{
    struct vnode* next;
    int id;
};
typedef struct vnode vnode;

/* Get new variable list */
extern vnode*	newvlist ( void );

/* Add a variable id to variable list */
extern void	varadd ( vnode* vlist, int varid );

/* Test if a variable id is in variable list */
extern int	varmember ( const vnode* vlist, int varid );

#ifdef __cplusplus
}
#endif