source: SH_SHM/trunk/source/globalparams.h @ 64

Revision 64, 11.1 KB checked in by marcus, 15 years ago (diff)

r49 | svn | 2008-10-14 22:36:40 +0200 (Di, 14 Okt 2008) | 1 line

autoevt: filter depending on distance; appropriate variables in globalparams.h

Line 
1
2/* file globalparams.h
3 *      ==============
4 *
5 * $Revision: 49 $, $Date: 2008-10-14 22:36:40 +0200 (Di, 14 Okt 2008) $
6 *
7 * Management of global parameters
8 * K. Stammler, 9-May-2006
9 */
10
11
12/*
13 *
14 *  SeismicHandler, seismic analysis software
15 *  Copyright (C) 1996,  Klaus Stammler, Federal Institute for Geosciences
16 *                                       and Natural Resources (BGR), Germany
17 *
18 *  This program is free software; you can redistribute it and/or modify
19 *  it under the terms of the GNU General Public License as published by
20 *  the Free Software Foundation; either version 2 of the License, or
21 *  (at your option) any later version.
22 *
23 *  This program is distributed in the hope that it will be useful,
24 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
25 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26 *  GNU General Public License for more details.
27 *
28 *  You should have received a copy of the GNU General Public License
29 *  along with this program; if not, write to the Free Software
30 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
31 *
32 */
33
34
35#define cGp_TEXTVARLTH 131
36#define cGp_VERSION 1
37#define cGp_SUBVERSION 0
38
39/* normalisation modes */
40#define cGp_NORM_UNDEF  0
41#define cGp_NORM_CONST  1
42#define cGp_NORM_AW     2
43#define cGp_NORM_SW     3
44#define cGp_NORM_MAXVAL 3
45
46
47/* integer variables
48 * -----------------
49 */
50
51typedef enum {
52        cGpI_debug_level,
53        cGpI_parfile_version,
54        cGpI_parfile_subversion,
55        cGpI_min_drag_box_width,
56        cGpI_double_click_time,
57        cGpI_x_max_drawlth,
58        cGpI_drag_box_rubber_val,
59        cGpI_default_quality,
60        cGpI_default_event_type,
61        cGpI_default_phase_flags,
62        cGpI_default_depth_type,
63        cGpI_default_loc_quality,
64        cGpI_max_cursor_form,
65        cGpI_top_margin,
66        cGpI_parameter_box_x,
67        cGpI_parameter_box_y,
68        cGpI_parameter_box_w,
69        cGpI_parameter_box_h,
70        cGpI_phase_box_x,
71        cGpI_phase_box_y,
72        cGpI_phase_box_w,
73        cGpI_phase_box_h,
74        cGpI_window_main_x,
75        cGpI_window_main_y,
76        cGpI_window_main_w,
77        cGpI_window_main_h,
78        cGpI_single_trace_box_x,
79        cGpI_single_trace_box_y,
80        cGpI_single_trace_box_w,
81        cGpI_single_trace_box_h,
82        cGpI_window_border,
83        cGpI_draw_area_width,
84        cGpI_draw_area_height,
85        cGpI_trace_normalisation,
86        cGpI_spectrogram_width,
87        cGpI_spectrogram_step,
88        cGpI_keysym_arrow_up,
89        cGpI_keysym_arrow_down,
90        cGpI_keysym_arrow_left,
91        cGpI_keysym_arrow_right,
92        cGpI_last
93} TGpIntIndex;
94
95
96/* float variables
97 * -----------------
98 */
99
100typedef enum {
101        cGpF_close_phase_resol,
102        cGpF_phase_ampl_diff,
103        cGpF_trace_zoom_base,
104        cGpF_trace_zoom_exp,
105        cGpF_area_zoom_base,
106        cGpF_area_zoom_exp,
107        cGpF_move_wdw_step,
108        cGpF_default_depth,
109        cGpF_colour_fg_red,
110        cGpF_colour_fg_green,
111        cGpF_colour_fg_blue,
112        cGpF_colour_bg_red,
113        cGpF_colour_bg_green,
114        cGpF_colour_bg_blue,
115        cGpF_colour_dialog_fg_red,
116        cGpF_colour_dialog_fg_green,
117        cGpF_colour_dialog_fg_blue,
118        cGpF_colour_dialog_bg0_red,
119        cGpF_colour_dialog_bg0_green,
120        cGpF_colour_dialog_bg0_blue,
121        cGpF_colour_dialog_bg1_red,
122        cGpF_colour_dialog_bg1_green,
123        cGpF_colour_dialog_bg1_blue,
124        cGpF_colour_dialog_bg2_red,
125        cGpF_colour_dialog_bg2_green,
126        cGpF_colour_dialog_bg2_blue,
127        cGpF_colour_mark_red,
128        cGpF_colour_mark_green,
129        cGpF_colour_mark_blue,
130        cGpF_colour_mark0_red,
131        cGpF_colour_mark0_green,
132        cGpF_colour_mark0_blue,
133        cGpF_colour_theo_red,
134        cGpF_colour_theo_green,
135        cGpF_colour_theo_blue,
136        cGpF_colour_auto_red,
137        cGpF_colour_auto_green,
138        cGpF_colour_auto_blue,
139        cGpF_colour_crsr_red,
140        cGpF_colour_crsr_green,
141        cGpF_colour_crsr_blue,
142        cGpF_colour_alert_red,
143        cGpF_colour_alert_green,
144        cGpF_colour_alert_blue,
145        cGpF_colour_addfil_red,
146        cGpF_colour_addfil_green,
147        cGpF_colour_addfil_blue,
148        cGpF_calib_wdw_width,
149        cGpF_calib_wdw_height,
150        cGpF_calib_azimuth_grid,
151        cGpF_calib_slowness_grid,
152        cGpF_sn_noise_start,
153        cGpF_sn_noise_end,
154        cGpF_sn_signal_start,
155        cGpF_sn_signal_end,
156        cGpF_idphases_tol_trav,
157        cGpF_idphases_tol_travsurf,
158        cGpF_idphases_tol_slow,
159        cGpF_idphases_tol_azim,
160        cGpF_axis_label_rounding,
161        cGpF_autofilter_sepdist,
162        cGpF_last
163} TGpFloatIndex;
164
165
166/* char variables
167 * -----------------
168 */
169
170typedef enum {
171        cGpC_filter_type,
172        cGpC_last
173} TGpCharIndex;
174
175
176/* string variables
177 * -----------------
178 */
179
180typedef enum {
181        cGpS_defpath_events,
182        cGpS_defpath_gse,
183        cGpS_defpath_ah,
184        cGpS_defpath_q,
185        cGpS_defpath_evid,
186        cGpS_defpath_evtout,
187        cGpS_defpath_data,
188        cGpS_defpath_help,
189        cGpS_defpath_errors,
190        cGpS_defpath_userdir,
191        cGpS_defpath_extprog,
192        cGpS_analyst,
193        cGpS_list_of_analysts,
194        cGpS_texteditor,
195        cGpS_refstation,
196        cGpS_list_of_refstations,
197        cGpS_default_filter,
198        cGpS_minmax_format,
199        cGpS_default_source,
200        cGpS_auto_phase,
201        cGpS_depth_phase_list,
202        cGpS_theo_phase_list,
203        cGpS_diff_phase_list,
204        cGpS_event_check_proc,
205        cGpS_screendump_proc,
206        cGpS_evtview_proc,
207        cGpS_reformat_proc,
208        cGpS_final_proc,
209        cGpS_motif_log,
210        cGpS_ftp_address,
211        cGpS_ftp_path,
212        cGpS_exclusive_agency,
213        cGpS_sfdb_command,
214        cGpS_sfdb_exec_qual,
215        cGpS_sfdb_trailer,
216        cGpS_autofilter_local,
217        cGpS_autofilter_tele,
218        cGpS_last
219} TGpStringIndex;
220
221
222/* boolean variables
223 * -----------------
224 */
225
226typedef enum {
227        cGpB_top_down_order,
228        cGpB_autopick_first,
229        cGpB_auto_scaling,
230        cGpB_prompt_analyst,
231        cGpB_reverse_xors,
232        cGpB_full_phase_names,
233        cGpB_own_accelerators,
234        cGpB_small_menu_font,
235        cGpB_recover_evid,
236        cGpB_overwrite_string_lists,
237        cGpB_ignore_data_lock,
238        cGpB_reads_swap,
239        cGpB_reads_invhdr,
240        cGpB_autosort_by_distance,
241        cGpB_autofilter_by_distance,
242        cGpB_last
243} TGpBooleanIndex;
244
245
246/* string list variables
247 * ---------------------
248 */
249
250typedef enum {
251        cGpL_station_info_file,
252        cGpL_filter_lookup_table,
253        cGpL_sensitivity_file,
254        cGpL_defpath_filter,
255        cGpL_defpath_command,
256        cGpL_defpath_globals,
257        cGpL_last
258} TGpStringListIndex;
259
260
261/* text list definition */
262
263typedef struct {
264        int      numelem; /* number of elements */
265        char     **elem;  /* elements of list*/
266        char     *mem;    /* memory for all elements of text list */
267} TGpTextList;
268
269
270
271/*----------------------------------------------------------------------------*/
272
273
274void GpReadParfile( void );
275
276/* Reads parameters from file
277 *
278 * no parameters passed
279 */
280
281
282/*----------------------------------------------------------------------------*/
283
284
285int GpGetInt( TGpIntIndex idx );
286
287/* Returns integer valued global
288 *
289 * parameters of routine
290 * TGpIntIndex   idx;       input; index of variable
291 *                          returns value of variable
292 */
293
294
295/*----------------------------------------------------------------------------*/
296
297
298float GpGetFloat( TGpFloatIndex idx );
299
300/* Returns float valued global
301 *
302 * parameters of routine
303 * TGpFloatIndex   idx;     input; index of variable
304 *                          returns value of variable
305 */
306
307
308/*----------------------------------------------------------------------------*/
309
310
311char GpGetChar( TGpCharIndex idx );
312
313/* Returns char valued global
314 *
315 * parameters of routine
316 * TGpCharIndex   idx;      input; index of variable
317 *                          returns value of variable
318 */
319
320
321/*----------------------------------------------------------------------------*/
322
323
324char *GpGetString( TGpStringIndex idx );
325
326/* Returns pointer to string valued global
327 *
328 * parameters of routine
329 * TGpStringIndex   idx;    input; index of variable
330 *                          returns value of variable
331 */
332
333
334/*----------------------------------------------------------------------------*/
335
336
337int GpGetBoolean( TGpBooleanIndex idx );
338
339/* Returns boolean valued global
340 *
341 * parameters of routine
342 * TGpBooleanIndex   idx;   input; index of variable
343 *                          returns value of variable
344 */
345
346
347/*----------------------------------------------------------------------------*/
348
349
350char *GpGetStringElem( TGpStringListIndex idx, int elemnum );
351
352/* returns string element number elemnum from string list idx
353 *
354 * parameters of routine
355 * TGpStringListIndex idx;     input; index numer of string list
356 * int                elemnum; input; number of string in list (start with 0)
357 *                             returns string address or NULL
358 */
359
360
361/*----------------------------------------------------------------------------*/
362
363
364void GpSetInt( TGpIntIndex idx, int value );
365
366/* Sets integer valued global
367 *
368 * parameters of routine
369 * TGpIntIndex   idx;       input; index of variable
370 * int           value;     input; new value of variable
371 */
372
373
374/*----------------------------------------------------------------------------*/
375
376
377void GpSetFloat( TGpFloatIndex idx, float value );
378
379/* Sets float valued global
380 *
381 * parameters of routine
382 * TGpFloatIndex   idx;     input; index of variable
383 * float           value;   input; new value of variable
384 */
385
386
387/*----------------------------------------------------------------------------*/
388
389
390void GpSetChar( TGpCharIndex idx, char value );
391
392/* Sets char valued global
393 *
394 * parameters of routine
395 * TGpCharIndex   idx;      input; index of variable
396 * char           value;    input; new value of variable
397 */
398
399
400/*----------------------------------------------------------------------------*/
401
402
403void GpSetString( TGpStringIndex idx, char str[], int *ok );
404
405/* Sets value of string valued global variable
406 *
407 * parameters of routine
408 * TGpStringIndex   idx;    input; index of variable
409 * char             str[];  input; new value of variable
410 * int              *ok;    output (if not NULL); 1 = ok, 0 = failure
411 */
412
413
414/*----------------------------------------------------------------------------*/
415
416
417void GpSetBoolean( TGpBooleanIndex idx, int value );
418
419/* Sets boolean valued global
420 *
421 * parameters of routine
422 * TGpBooleanIndex   idx;   input; index of variable
423 * int               value; input; new value of variable
424 */
425
426
427/*----------------------------------------------------------------------------*/
428
429
430void GpReadParameter( char parname[], int maxlth, char value[], int *ok );
431
432/* Reads parameter of name parname from parameter file.
433 *
434 * parameters of routine
435 * char       parname[]; input, name of parameter
436 * int        maxlth; input; maximum length of output string
437 * char       value[]; output; value of parameter
438 * int        *ok; output; 1=ok, 0=not found or string too short
439 */
440
441
442/*----------------------------------------------------------------------------*/
443
444
445void GpParseTextList( char str[], TGpTextList *tl );
446
447/* Parses comma separated text string and returns pointers to elements of list.
448 * Returns data structure must be freed after use (GpFreeTextList).
449 *
450 * parameters of routine
451 * char       str[];    input; input string to be parsed
452 * GpTextList *tl;      output; elements of list
453 */
454
455
456/*----------------------------------------------------------------------------*/
457
458
459void GpParseStringList( TGpStringListIndex idx, char line[] );
460
461/* parses string list and puts result to list number idx
462 *
463 * parameters of routine
464 * TGpStringListIndex idx;    input; string list variable index
465 * char               line[]; input; line to be parsed
466 */
467
468
469/*----------------------------------------------------------------------------*/
470
471
472void GpFreeTextList( TGpTextList *tl );
473
474/* Frees memory of textlist
475 *
476 * parameters of routine
477 * TGpTextList         modify; text list to be freed
478 */
479
480
481/*----------------------------------------------------------------------------*/
482
483
484void GpDumpParams( void );
485
486/* write all parameters out to stdout
487 *
488 * no parameters passed
489 *
490 */
491
492
493/*----------------------------------------------------------------------------*/
Note: See TracBrowser for help on using the repository browser.