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

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

r53 | svn | 2008-10-21 09:13:49 +0200 (Di, 21 Okt 2008) | 1 line

implemented special channels (++) with translation tables

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