Update version info for release v4.6.1 (#2122)
[WRF.git] / tools / protos.h
blob04811e14183897333c31a4bed7afd1ebf4137de6
1 #ifndef PROTOS_H
2 #include "registry.h"
3 #include "data.h"
5 int init_dim_table() ;
6 int make_lower( char * s1 ) ;
7 int reg_parse( FILE * infile ) ;
8 int set_dim_len ( char * dimspec , node_t * dim_entry ) ;
9 int set_dim_order ( char * dimorder , node_t * dim_entry ) ;
10 int set_dim_orient ( char * dimorient , node_t * dim_entry ) ;
11 int add_node_to_end ( node_t * node , node_t ** list ) ;
12 int add_node_to_end_4d ( node_t * node , node_t ** list ) ;
13 int init_type_table() ;
14 int set_state_type ( char * typename , node_t * node ) ;
15 int set_state_dims ( char * dims , node_t * node ) ;
16 int gen_state_struct ( char * fname ) ;
18 #if 0
19 int show_node( node_t * p ) ;
20 int show_node1( node_t * p, int indent ) ;
21 int show_nodelist( node_t * p ) ;
22 int show_nodelist1( node_t * p , int indent ) ;
23 #endif
25 int gen_state_struct ( char * fname ) ;
26 int gen_decls ( FILE * fp , node_t * node , int sw_ranges, int sw_point , int mask , int layer ) ;
27 int gen_state_subtypes ( char * fname ) ;
28 int gen_state_subtypes1 ( FILE * fp , node_t * node , int sw_ranges, int sw_point , int mask ) ;
29 int print_warning( FILE * fp , char * fname ) ;
30 int close_the_file( FILE * fp ) ;
31 int make_entries_uniq ( char * fname ) ;
32 int add_warning ( char * fname ) ;
33 int gen_dummy_decls ( char * dn );
34 int gen_dummy_decls_new ( char * dn );
35 int gen_i1_decls ( char * dn );
37 node_t * get_type_entry ( char * typename ) ;
38 node_t * get_rconfig_entry( char * name ) ;
39 node_t * get_entry ( char * name , node_t * node ) ;
40 node_t * get_entry_r ( char * name , char * use , node_t * node ) ;
41 node_t * get_dim_entry( char *s ) ;
42 node_t * new_node ( int kind ) ;
44 node_t * get_4d_entry ( char * name ) ;
45 node_t * get_dimnode_for_coord ( node_t * node , int coord_axis ) ;
46 int get_index_for_coord ( node_t * node , int coord_axis ) ;
48 char * my_strtok( char * s1 ) ;
49 char * strtok_rentr( char * s1 , char * s2, char ** tokpos ) ;
51 char * bdy_indicator( int bdy ) ;
53 char * field_name( char * tmp, node_t * p , int tag ) ;
54 char * field_name_bdy( char * tmp, node_t * p , int tag, int bdy ) ;
55 char * dimension_with_colons( char * pre, char * tmp, node_t * p, char * post) ;
56 char * dimension_with_ones( char * pre, char * tmp, node_t * p, char * post) ;
57 char * dimension_with_ranges( char * ref , char * pre, int bdy , char * tmp, node_t * p, char * post, char * nlstructname ) ;
58 char * arrray_size_expression( char * refarg , char * pre , int bdy , char * tmp , node_t * p , char * post , char * nlstructname ) ;
59 char * index_with_firstelem( char * pre , char * dref , int bdy , char * tmp , node_t * p , char * post ) ;
61 char * declare_array_as_pointer( char * tmp, node_t * p ) ;
62 char * field_type( char * tmp , node_t * p ) ;
64 /* For typedef history -ajb */
65 int init_typedef_history() ;
66 int add_typedef_name ( char * name ) ;
67 int get_num_typedefs() ;
68 char * get_typedef_name ( char * name ) ;
69 char * get_typename_i(int i) ;
71 int gen_alloc ( char * dirname ) ;
72 int gen_alloc1 ( char * dirname ) ;
73 int gen_alloc2 ( FILE * fp , char * structname , char * structname2 , node_t * node, int start, int stop, int sw );
75 int gen_module_state_description ( char * dirname ) ;
76 int gen_module_state_description1 ( FILE * fp , node_t * node ) ;
78 int gen_scalar_indices ( char * dirname ) ;
79 int gen_scalar_indices1 ( FILE * fp, FILE ** fp2 ) ;
81 int gen_actual_args ( char * dirname ) ;
82 int gen_dummy_args ( char * dirname ) ;
83 int gen_dummy_decls ( char * dn ) ;
84 int gen_args ( char * dirname , int sw ) ;
85 int gen_args1 ( FILE * fp , char * outstr, char * structname , node_t * node , int *linelen , int sw , int deep ) ;
87 int gen_scalar_derefs ( char * dirname ) ;
88 int scalar_derefs ( char * dirname ) ;
89 int scalar_derefs1 ( FILE * fp , node_t * node, int direction ) ;
91 int set_mark ( int val , node_t * lst ) ;
92 int set_mark_4d ( int val , node_t * lst ) ;
94 int gen_i1_decls ( char * dn ) ;
95 int gen_get_nl_config ( char * dirname ) ;
97 int gen_config_assigns ( char * dirname ) ;
98 int gen_config_reads ( char * dirname ) ;
100 char * set_mem_order( node_t * node , char * str , int n ) ;
102 int gen_wrf_io ( char * dirname ) ;
103 int set_dim_strs ( node_t *node , char ddim[3][2][NAMELEN], char mdim[3][2][NAMELEN], char pdim[3][2][NAMELEN] , char * prepend, int sw_allow_stagger ) ;
104 int set_dim_strs2 ( node_t *node , char ddim[3][2][NAMELEN], char mdim[3][2][NAMELEN], char pdim[3][2][NAMELEN] , char * prepend, int sw_disregard_stag ) ;
105 int set_dim_strs3 ( node_t *node , char ddim[3][2][NAMELEN], char mdim[3][2][NAMELEN], char pdim[3][2][NAMELEN] , char * prepend, int sw_disregard_stag ) ;
106 int gen_wrf_io2 ( FILE * fp , char * fname , char * structname , char * fourdname , node_t * node , int sw_io ) ;
108 int gen_namelist_defines ( char * dirname , int sw_dimension ) ;
109 int gen_namelist_defaults ( char * dirname ) ;
110 int gen_namelist_script ( char * dirname ) ;
112 int gen_model_data_ord ( char * dirname ) ;
114 int get_elem ( char * structname , char * nlstructname , char * tx , int i , node_t * p , int first_last ) ;
116 int associated_with_4d_array( node_t * p ) ;
119 /* PGI Addition to resolve non-prototype function warnings */
120 char * array_size_expression ( char *, char *, int, char *, node_t *, char * ,char * );
121 int range_of_dimension ( char *, char * , int, node_t *, char * );
122 int dimension_size_expression ( char *, char *, int, node_t *, char *);
123 int gen_alloc_count ( char *);
124 int gen_alloc_count1 ( char *);
125 int gen_ddt_write ( char * );
126 int gen_ddt_write1 ( FILE *, char *, node_t *);
127 int gen_dealloc ( char * );
128 int gen_dealloc1 ( char * );
129 int gen_dealloc2 ( FILE *, char *, node_t *, int idx, int numFiles );
130 int gen_scalar_tables ( FILE *);
131 int AppendReg ( char *,int);
132 int irr_diag_scalar_indices ( char * );
133 int gen_scalar_tables_init ( FILE *);
134 int gen_scalar_indices_init ( FILE *);
135 int hash(char *);
136 int gen_nest_interp1 ( FILE *, node_t *, char *, int, int );
137 #if ( WRFPLUS == 1 )
138 int gen_packs_halo ( FILE *fp , node_t *p, char *shw, int xy /* 0=y,1=x */ , int pu /* 0=pack,1=unpack */, int nta /* 0=NLM,1=TLM,2=ADM */, char * packname, char * commname, int always_interp_mp /* 1 for ARW, varies for NMM */ );
139 #else
140 int gen_packs_halo ( FILE *fp , node_t *p, char *shw, int xy /* 0=y,1=x */ , int pu /* 0=pack,1=unpack */, char * packname, char * commname, int always_interp_mp /* 1 for ARW, varies for NMM */ );
141 #endif
142 int gen_packs ( FILE *fp , node_t *p, int shw, int xy /* 0=y,1=x */ , int pu /* 0=pack,1=unpack */, char * packname, char * commname );
143 int gen_periods ( char * dirname , node_t * periods );
144 int gen_swaps ( char * dirname , node_t * swaps );
145 int gen_cycles ( char * dirname , node_t * cycles );
146 int gen_xposes ( char * dirname );
147 int gen_comm_descrips ( char * dirname );
148 int gen_shift ( char * dirname );
149 int gen_datacalls ( char * dirname );
150 int gen_nest_packing ( char * dirname );
151 int gen_nest_pack ( char * dirname );
152 int gen_nest_unpack ( char * dirname );
153 int gen_nest_packunpack ( FILE *fp , node_t * node , int dir, int down_path );
154 int count_fields ( node_t * node , int * d2 , int * d3 ,
155 char * fourd_names, int down_path, int send_mp, int no_mp );
156 int gen_debug ( char * dirname );
158 void reset_mask ( unsigned int * mask , int e ) ;
159 void set_mask ( unsigned int * mask , int e ) ;
160 int get_mask ( unsigned int * mask , int e ) ;
161 int dims_ikj_inner(node_t *);
162 int dims_ij_inner(node_t *);
164 char *make_upper_case ( char * str );
165 char *make_lower_case ( char * str );
166 int sym_forget();
167 int init_parser();
168 int pre_parse( char * dir, FILE * infile, FILE * outfile );
169 int check_dimspecs();
170 int set_dim_order ( char * dimorder , node_t * dim_entry );
172 int gen_actual_args ( char * dirname );
173 int gen_actual_args_new ( char * dirname );
174 int gen_dummy_args ( char * dirname );
175 int gen_dummy_args_new ( char * dirname );
176 int gen_args ( char * dirname , int sw );
177 int gen_args1 ( FILE * fp , char * outstr , char * structname ,
178 node_t * node , int *linelen , int sw , int deep );
181 int gen_namelist_defines ( char * dirname , int sw_dimension );
182 int gen_namelist_defaults ( char * dirname );
183 int gen_namelist_statements ( char * dirname );
184 int gen_namelist_script ( char * dirname );
185 int gen_get_nl_config ( char * dirname );
186 int gen_config_assigns ( char * dirname );
187 int gen_config_reads ( char * dirname );
189 int as_long(char *str,long *l);
190 int as_finite_double(char *str,double *d);
191 int contains_str( char *s1, char *s2 );
192 int contains_tok( char *s1, char *s2, char *delims );
193 int gen_nest_v_interp ( char * dirname );
194 int gen_nest_interp ( char * dirname );
195 int gen_nest_interp1 ( FILE * fp , node_t * node, char * fourdname, int down_path , int use_nest_time_level );
196 int gen_nest_interp2 ( FILE * fp , node_t * node, char * fourdname, int down_path , int use_nest_time_level );
199 int gen_streams( char * dirname );
200 int gen_io_domain_defs ( FILE * fp );
201 int gen_set_timekeeping_defs ( FILE *fp );
202 int gen_io_form_for_dataset ( FILE *fp );
203 int gen_io_form_for_stream ( FILE *fp );
204 int gen_switches_and_alarms ( FILE *fp );
205 int gen_check_auxstream_alarms ( FILE *fp );
206 int gen_fine_stream_input ( FILE *fp );
207 int gen_med_auxinput_in ( FILE *fp );
208 int gen_med_hist_out_opens ( FILE *fp );
209 int gen_med_hist_out_closes ( FILE *fp );
210 int gen_med_auxinput_in_closes ( FILE *fp );
211 int gen_med_last_solve_io ( FILE *fp );
212 int gen_shutdown_closes ( FILE *fp );
213 int gen_med_open_esmf_calls ( FILE *fp );
214 int gen_med_find_esmf_coupling ( FILE *fp );
215 int gen_io_boilerplate ();
217 int gen_comms ( char * dirname );
219 int gen_set_timekeeping_alarms ( FILE * fp );
221 int create_ht(char *** p );
224 #define PROTOS_H
225 #endif