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