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

Revision 344, 11.2 KB checked in by marcus, 12 years ago (diff)

r183 | walther | 2011-03-10 15:03:12 +0100 (Do, 10 Mär 2011) | 1 line

Added configuration parameter show_evt_info

Line 
1
2/* file globalparams.h
3 *      ==============
4 *
5 * $Revision: 183 $, $Date: 2011-03-10 15:03:12 +0100 (Do, 10 MÀr 2011) $
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_show_evt_info,
243        cGpB_last
244} TGpBooleanIndex;
245
246
247/* string list variables
248 * ---------------------
249 */
250
251typedef enum {
252        cGpL_station_info_file,
253        cGpL_filter_lookup_table,
254        cGpL_sensitivity_file,
255        cGpL_channel_translation,
256        cGpL_defpath_filter,
257        cGpL_defpath_command,
258        cGpL_defpath_globals,
259        cGpL_last
260} TGpStringListIndex;
261
262
263/* text list definition */
264
265typedef struct {
266        int      numelem; /* number of elements */
267        char     **elem;  /* elements of list*/
268        char     *mem;    /* memory for all elements of text list */
269} TGpTextList;
270
271
272
273/*----------------------------------------------------------------------------*/
274
275
276void GpReadParfile( void );
277
278/* Reads parameters from file
279 *
280 * no parameters passed
281 */
282
283
284/*----------------------------------------------------------------------------*/
285
286
287int GpGetInt( TGpIntIndex idx );
288
289/* Returns integer valued global
290 *
291 * parameters of routine
292 * TGpIntIndex   idx;       input; index of variable
293 *                          returns value of variable
294 */
295
296
297/*----------------------------------------------------------------------------*/
298
299
300float GpGetFloat( TGpFloatIndex idx );
301
302/* Returns float valued global
303 *
304 * parameters of routine
305 * TGpFloatIndex   idx;     input; index of variable
306 *                          returns value of variable
307 */
308
309
310/*----------------------------------------------------------------------------*/
311
312
313char GpGetChar( TGpCharIndex idx );
314
315/* Returns char valued global
316 *
317 * parameters of routine
318 * TGpCharIndex   idx;      input; index of variable
319 *                          returns value of variable
320 */
321
322
323/*----------------------------------------------------------------------------*/
324
325
326char *GpGetString( TGpStringIndex idx );
327
328/* Returns pointer to string valued global
329 *
330 * parameters of routine
331 * TGpStringIndex   idx;    input; index of variable
332 *                          returns value of variable
333 */
334
335
336/*----------------------------------------------------------------------------*/
337
338
339int GpGetBoolean( TGpBooleanIndex idx );
340
341/* Returns boolean valued global
342 *
343 * parameters of routine
344 * TGpBooleanIndex   idx;   input; index of variable
345 *                          returns value of variable
346 */
347
348
349/*----------------------------------------------------------------------------*/
350
351
352char *GpGetStringElem( TGpStringListIndex idx, int elemnum );
353
354/* returns string element number elemnum from string list idx
355 *
356 * parameters of routine
357 * TGpStringListIndex idx;     input; index numer of string list
358 * int                elemnum; input; number of string in list (start with 0)
359 *                             returns string address or NULL
360 */
361
362
363/*----------------------------------------------------------------------------*/
364
365
366void GpSetInt( TGpIntIndex idx, int value );
367
368/* Sets integer valued global
369 *
370 * parameters of routine
371 * TGpIntIndex   idx;       input; index of variable
372 * int           value;     input; new value of variable
373 */
374
375
376/*----------------------------------------------------------------------------*/
377
378
379void GpSetFloat( TGpFloatIndex idx, float value );
380
381/* Sets float valued global
382 *
383 * parameters of routine
384 * TGpFloatIndex   idx;     input; index of variable
385 * float           value;   input; new value of variable
386 */
387
388
389/*----------------------------------------------------------------------------*/
390
391
392void GpSetChar( TGpCharIndex idx, char value );
393
394/* Sets char valued global
395 *
396 * parameters of routine
397 * TGpCharIndex   idx;      input; index of variable
398 * char           value;    input; new value of variable
399 */
400
401
402/*----------------------------------------------------------------------------*/
403
404
405void GpSetString( TGpStringIndex idx, char str[], int *ok );
406
407/* Sets value of string valued global variable
408 *
409 * parameters of routine
410 * TGpStringIndex   idx;    input; index of variable
411 * char             str[];  input; new value of variable
412 * int              *ok;    output (if not NULL); 1 = ok, 0 = failure
413 */
414
415
416/*----------------------------------------------------------------------------*/
417
418
419void GpSetBoolean( TGpBooleanIndex idx, int value );
420
421/* Sets boolean valued global
422 *
423 * parameters of routine
424 * TGpBooleanIndex   idx;   input; index of variable
425 * int               value; input; new value of variable
426 */
427
428
429/*----------------------------------------------------------------------------*/
430
431
432void GpReadParameter( char parname[], int maxlth, char value[], int *ok );
433
434/* Reads parameter of name parname from parameter file.
435 *
436 * parameters of routine
437 * char       parname[]; input, name of parameter
438 * int        maxlth; input; maximum length of output string
439 * char       value[]; output; value of parameter
440 * int        *ok; output; 1=ok, 0=not found or string too short
441 */
442
443
444/*----------------------------------------------------------------------------*/
445
446
447void GpParseTextList( char str[], TGpTextList *tl );
448
449/* Parses comma separated text string and returns pointers to elements of list.
450 * Returns data structure must be freed after use (GpFreeTextList).
451 *
452 * parameters of routine
453 * char       str[];    input; input string to be parsed
454 * GpTextList *tl;      output; elements of list
455 */
456
457
458/*----------------------------------------------------------------------------*/
459
460
461void GpParseStringList( TGpStringListIndex idx, char line[] );
462
463/* parses string list and puts result to list number idx
464 *
465 * parameters of routine
466 * TGpStringListIndex idx;    input; string list variable index
467 * char               line[]; input; line to be parsed
468 */
469
470
471/*----------------------------------------------------------------------------*/
472
473
474void GpFreeTextList( TGpTextList *tl );
475
476/* Frees memory of textlist
477 *
478 * parameters of routine
479 * TGpTextList         modify; text list to be freed
480 */
481
482
483/*----------------------------------------------------------------------------*/
484
485
486void GpDumpParams( void );
487
488/* write all parameters out to stdout
489 *
490 * no parameters passed
491 *
492 */
493
494
495/*----------------------------------------------------------------------------*/
Note: See TracBrowser for help on using the repository browser.