1 /*********************************************************************
2  *   Copyright 1993, University Corporation for Atmospheric Research
3  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
4  *   $Header: /private-cvsroot/minc/progs/mincdump/dumplib.h,v 1.1 2004-04-27 15:35:15 bert Exp $
5  *********************************************************************/
6 
7 extern char *progname;		/* for error messages */
8 
9 #define NO_NETCDF_2		/* assert we aren't using any netcdf-2 stuff */
10 
11 #ifndef EXIT_FAILURE
12 #ifndef vms
13 #define EXIT_SUCCESS 0
14 #define EXIT_FAILURE 1
15 #else
16 #define EXIT_SUCCESS 1
17 #define EXIT_FAILURE 0
18 #endif
19 #endif
20 
21 #define FLT_DIGITS 7		/* default sig. digits for float data */
22 #define DBL_DIGITS 15		/* default sig. digits for double data */
23 
24 extern int float_precision_specified; /* -p option specified float precision */
25 extern int double_precision_specified; /* -p option specified double precision */
26 extern char float_var_fmt[];
27 extern char double_var_fmt[];
28 extern char float_att_fmt[];
29 extern char double_att_fmt[];
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34 
35 /* Print error message to stderr and exit */
36 extern void	error ( const char *fmt, ... );
37 
38 /* set position in line before lput() calls */
39 extern void	set_indent ( int indent );
40 
41 /* set maximum line length */
42 extern void	set_max_len ( int len );
43 
44 /* splits lines to keep them short */
45 extern void	lput ( const char *string );
46 
47 /* In case different formats specified with -d option, set them here. */
48 extern void	set_formats ( int flt_digs, int dbl_digs );
49 
50 /* Determine print format to use for each value for this variable. */
51 char *		get_fmt ( int ncid, int varid, nc_type type );
52 
53 /* structure for list of variables specified with -v option */
54 struct vnode
55 {
56     struct vnode* next;
57     int id;
58 };
59 typedef struct vnode vnode;
60 
61 /* Get new variable list */
62 extern vnode*	newvlist ( void );
63 
64 /* Add a variable id to variable list */
65 extern void	varadd ( vnode* vlist, int varid );
66 
67 /* Test if a variable id is in variable list */
68 extern int	varmember ( const vnode* vlist, int varid );
69 
70 #ifdef __cplusplus
71 }
72 #endif
73