Changeset 68
- Timestamp:
- 10/30/2008 11:09:34 PM (14 years ago)
- Location:
- SH_SHM/trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/errors/ERR_5900.MSG
r16 r68 2 2 ! ============ 3 3 ! 4 ! version 2, 24-Aug-944 ! version 3, 20-Oct-2008 5 5 ! 6 6 ! error messages of module cblib4.h … … 11 11 *** CL4-03 negative phase difference *** 12 12 *** CL4-04 no phase pairs found *** 13 *** CL4-05 no reference location *** 14 *** CL4-06 error in get_geo *** 15 *** CL4-07 string overflow *** 16 *** CL4-08 error opening output file *** 17 *** CL4-09 error opening input file *** 18 *** CL4-10 illegal reference station number *** 19 *** CL4-11 filter mismatch *** 20 *** CL4-12 no dummy phase allowed *** 21 *** CL4-13 illegal sample index *** 22 *** CL4-14 illegal order of markers *** 23 *** CL4-15 no drag window *** 24 *** CL4-16 unfiltered traces required *** 25 *** CL4-17 no beam trace found *** 26 *** CL4-18 too less traces *** 27 *** CL4-19 no environment defined *** 28 *** CL4-20 illegal DRM id *** 29 *** CL4-21 no private AutoDRM setup *** 30 *** CL4-22 illegal read length *** -
SH_SHM/trunk/source/globalparams.c
r64 r68 3 3 * ============== 4 4 * 5 * $Revision: 49 $, $Date: 2008-10-14 22:36:40 +0200 (Di, 14Okt 2008) $5 * $Revision: 53 $, $Date: 2008-10-21 09:13:49 +0200 (Di, 21 Okt 2008) $ 6 6 * 7 7 * Management of global parameters … … 425 425 "filter_lookup_table", 426 426 "sensitivity_file", 427 "channel_translation", 427 428 "defpath_filter", 428 429 "defpath_command", … … 435 436 {NULL,"default",7}, /* filter_lookup_table */ 436 437 {NULL,"default",7}, /* sensitivity_file */ 438 {NULL,"default",7}, /* channel_translation */ 437 439 {NULL,"default",7}, /* defpath_filter */ 438 440 {NULL,"default",7}, /* defpath_command */ … … 618 620 strcat( gpv_l_glob[cGpL_sensitivity_file].string, "sensitivities.txt" ); 619 621 gpv_l_glob[cGpL_sensitivity_file].strlth = i+17; 622 } /*endif*/ 623 } /*endif*/ 624 if (strcmp(gpv_l_glob[cGpL_channel_translation].string,"default") == 0) { 625 cptr = (char *)getenv( "SH_INPUTS" ); 626 if (cptr != NULL) { 627 i = strlen( cptr ); 628 /*free( gpv_l_glob[cGpL_channel_translation].string );*/ 629 gpv_l_glob[cGpL_channel_translation].string = 630 (char *)malloc( (int)sizeof(char)*(i+14) ); 631 strcpy( gpv_l_glob[cGpL_channel_translation].string, cptr ); 632 strcat( gpv_l_glob[cGpL_channel_translation].string, "chantrans.txt" ); 633 gpv_l_glob[cGpL_channel_translation].strlth = i+13; 620 634 } /*endif*/ 621 635 } /*endif*/ -
SH_SHM/trunk/source/globalparams.h
r64 r68 3 3 * ============== 4 4 * 5 * $Revision: 49 $, $Date: 2008-10-14 22:36:40 +0200 (Di, 14Okt 2008) $5 * $Revision: 53 $, $Date: 2008-10-21 09:13:49 +0200 (Di, 21 Okt 2008) $ 6 6 * 7 7 * Management of global parameters … … 252 252 cGpL_filter_lookup_table, 253 253 cGpL_sensitivity_file, 254 cGpL_channel_translation, 254 255 cGpL_defpath_filter, 255 256 cGpL_defpath_command, -
SH_SHM/trunk/source/motif/mfexec.c
r67 r68 3 3 * ======== 4 4 * 5 * $Revision: 5 2 $, $Date: 2008-10-17 12:57:15 +0200 (Fr, 17Okt 2008) $5 * $Revision: 53 $, $Date: 2008-10-21 09:13:49 +0200 (Di, 21 Okt 2008) $ 6 6 * 7 7 * execution of SH commands … … 207 207 exit( 1 ); 208 208 } /*endif*/ 209 ut_cap( statlist ); 209 210 if (*statlist != '\0') 210 211 mx_remove_double_elements( statlist ); … … 1385 1386 } /*endif*/ 1386 1387 } /*endfor*/ 1387 1388 #ifdef XXX1389 /* check buttons */1390 if (XmToggleButtonGetState(w[k_widget_read_grsn_1hz])) {1391 strcpy( rg->chanstr[rg->channum], "LH" );1392 (rg->channum)++;1393 } /*endif*/1394 if (XmToggleButtonGetState(w[k_widget_read_grsn_20hz])) {1395 strcpy( rg->chanstr[rg->channum], "BH" );1396 (rg->channum)++;1397 } /*endif*/1398 if (XmToggleButtonGetState(w[k_widget_read_grsn_80hz])) {1399 strcpy( rg->chanstr[rg->channum], "HH" );1400 (rg->channum)++;1401 } /*endif*/1402 if (XmToggleButtonGetState(w[k_widget_read_grsn_edit_hz])) {1403 str = cu_get_string( w[k_widget_read_grsn_hz_text] );1404 if (strlen(str) <= MXC_CHANLTH && strlen(str) > 0) {1405 strcpy( rg->chanstr[rg->channum], str );1406 } else {1407 printf( "*SHM: illegal channel string %s\n", str );1408 } /*endif*/1409 (rg->channum)++;1410 } /*endif*/1411 #endif1412 1388 1413 1389 } /* end of mx_get_chanlist */ -
SH_SHM/trunk/source/seed_io/seed_lib.c
r48 r68 3 3 * ========== 4 4 * 5 * $Revision: 33 $, $Date: 2008-05-19 20:03:26 +0200 (Mo, 19 Mai2008) $5 * $Revision: 53 $, $Date: 2008-10-21 09:13:49 +0200 (Di, 21 Okt 2008) $ 6 6 * 7 7 * SEED library … … 4178 4178 4179 4179 4180 void SeedTranslateChan( char station[], char inchan[], char outchan[] ) 4181 4182 /* Translates channel name, e.g. '++' depending on station name 4183 * 4184 * parameters of routine 4185 * char station[]; input; station name, e.g. 'bfo' 4186 * char inchan[]; input; channel name (length 2+term), e.g. '++' 4187 * char outchan[]; output; translated name (length 2 + term) 4188 */ 4189 { 4190 /* local variables */ 4191 int pathcnt; /* path counter (to transl. files) */ 4192 char *transpath; /* name of translation file */ 4193 FILE *fp; /* pointer to file */ 4194 char fstr[cBcLineLth+1]; /* station+chan name */ 4195 int fstrlen; /* length of fstr */ 4196 char dstr[cBcLineLth+1]; /* default station+chan name */ 4197 int dstrlen; /* length of dstr */ 4198 char line[cBcLineLth+1]; /* current line of file */ 4199 char *cptr; /* moving pointer */ 4200 char defchan[cBcShortStrLth+1]; /* default channel */ 4201 TSyBoolean default_found; /* default string found */ 4202 4203 /* executable code */ 4204 4205 strcpy( outchan, inchan ); 4206 default_found = FALSE; 4207 4208 /* skip this of no special channel given */ 4209 if (strcmp(inchan,"++") != 0) 4210 return; 4211 4212 /* prepare search strings */ 4213 if (strlen(station)+3 > cBcLineLth) { 4214 printf( "*Seed: station name too long. Cannot translate chan\n" ); 4215 return; 4216 } /*endif*/ 4217 /* get string to search in file (station-inchan) */ 4218 sprintf( fstr, "%s-%s", station, inchan ); 4219 ut_uncap( fstr ); 4220 fstrlen = strlen( fstr ); 4221 /* default setting is also needed (*-inchan) */ 4222 sprintf( dstr, "*-%s", inchan ); 4223 ut_uncap( dstr ); 4224 dstrlen = strlen( dstr ); 4225 4226 for (pathcnt=0;;pathcnt++) { 4227 transpath = GpGetStringElem( cGpL_channel_translation, pathcnt ); 4228 if (transpath == NULL) break; 4229 fp = fopen( transpath, "r" ); 4230 if (fp == NULL) 4231 continue; 4232 while (fgets(line,cBcLineLth,fp) != NULL) { 4233 if (strncmp(line,fstr,fstrlen) == 0) { 4234 /* found entry for this station, read it and return */ 4235 cptr = line+fstrlen; 4236 while (*cptr == ' ' || *cptr == ':') 4237 cptr++; 4238 outchan[0] = (cptr[0] > ' ') ? cptr[0] : '\0'; 4239 outchan[1] = (cptr[1] > ' ') ? cptr[1] : '\0'; 4240 outchan[2] = '\0'; 4241 fclose( fp ); 4242 return; 4243 } else if (strncmp(line,dstr,dstrlen) == 0) { 4244 /* found at least a default entry, save this */ 4245 cptr = line+dstrlen; 4246 while (*cptr == ' ' || *cptr == ':') 4247 cptr++; 4248 defchan[0] = (cptr[0] > ' ') ? cptr[0] : '\0'; 4249 defchan[1] = (cptr[1] > ' ') ? cptr[1] : '\0'; 4250 defchan[2] = '\0'; 4251 default_found = TRUE; 4252 } /*endif*/ 4253 } /*endwhile*/ 4254 fclose( fp ); 4255 } /*endif*/ 4256 4257 if (default_found) 4258 strcpy( outchan, defchan ); 4259 4260 } /* end of SeedTranslateChan */ 4261 4262 4263 4264 /*---------------------------------------------------------------------*/ 4265 4266 4267 4180 4268 /* FORTRAN interface routine */ 4181 4269 -
SH_SHM/trunk/source/seed_io/seed_lib.h
r16 r68 3 3 * ========== 4 4 * 5 * version 26, 21-Dec-20065 * $Revision: 53 $, $Date: 2008-10-21 09:13:49 +0200 (Di, 21 Okt 2008) $ 6 6 * 7 7 * header file of module seed_lib.c … … 640 640 641 641 /*---------------------------------------------------------------------*/ 642 643 644 void SeedTranslateChan( char station[], char inchan[], char outchan[] ); 645 646 /* Translates channel name, e.g. '++' depending on station name 647 * 648 * parameters of routine 649 * char station[]; input; station name, e.g. 'bfo' 650 * char inchan[]; input; channel name (length 2+term), e.g. '++' 651 * char outchan[]; output; translated name (length 2 + term) 652 */ 653 654 655 /*---------------------------------------------------------------------*/ -
SH_SHM/trunk/source/shmenuio.c
r16 r68 1284 1284 char cmpl[BC_SHORTSTRLTH+1]; /* component list */ 1285 1285 char stream[BC_SHORTSTRLTH+1]; /* stream name */ 1286 char tstream[cBcShortStrLth+1];/* translated stream name (from '++') */ 1286 1287 char stream_str[BC_LINELTH+1]; /* complete stream name */ 1287 1288 float dt; /* sample distance in sec */ … … 1426 1427 *tstart = '\0'; 1427 1428 for (s=0; s<statno; s++) { 1429 SeedTranslateChan( stations[s], stream, tstream ); 1428 1430 for (c=0; c<cmpno; c++) { 1429 if (cmpl[c] == 'N' || cmpl[c] == 'E') { 1430 /*if (strcmp(stations[s],"GRA2") == 0) continue;*/ 1431 /*if (strcmp(stations[s],"GRA3") == 0) continue;*/ 1432 /*if (strcmp(stations[s],"GRA4") == 0) continue;*/ 1433 /*if (strcmp(stations[s],"GRB2") == 0) continue;*/ 1434 /*if (strcmp(stations[s],"GRB3") == 0) continue;*/ 1435 /*if (strcmp(stations[s],"GRB4") == 0) continue;*/ 1436 /*if (strcmp(stations[s],"GRB5") == 0) continue;*/ 1437 /*if (strcmp(stations[s],"GRC2") == 0) continue;*/ 1438 /*if (strcmp(stations[s],"GRC3") == 0) continue;*/ 1439 /*if (strcmp(stations[s],"GRC4") == 0) continue;*/ 1440 } /*endif*/ 1441 sprintf( stream_str, "%s-%s-%c", stations[s], stream, cmpl[c] ); 1431 sprintf( stream_str, "%s-%s-%c", stations[s], tstream, cmpl[c] ); 1442 1432 SeedGetTimeSpan( sfdcfile, stream_str, msg, act_start, status ); 1443 1433 if (*act_start == '\0') {*status = BC_NOERROR; continue;} … … 1460 1450 last_dt = 0.0; 1461 1451 for (s=0; s<statno; s++) { 1452 SeedTranslateChan( stations[s], stream, tstream ); 1462 1453 for (c=0; c<cmpno; c++) { 1463 if (cmpl[c] == 'N' || cmpl[c] == 'E') { 1464 /*if (strcmp(stations[s],"GRA2") == 0) continue;*/ 1465 /*if (strcmp(stations[s],"GRA3") == 0) continue;*/ 1466 /*if (strcmp(stations[s],"GRA4") == 0) continue;*/ 1467 /*if (strcmp(stations[s],"GRB2") == 0) continue;*/ 1468 /*if (strcmp(stations[s],"GRB3") == 0) continue;*/ 1469 /*if (strcmp(stations[s],"GRB4") == 0) continue;*/ 1470 /*if (strcmp(stations[s],"GRB5") == 0) continue;*/ 1471 /*if (strcmp(stations[s],"GRC2") == 0) continue;*/ 1472 /*if (strcmp(stations[s],"GRC3") == 0) continue;*/ 1473 /*if (strcmp(stations[s],"GRC4") == 0) continue;*/ 1474 } /*endif*/ 1475 sprintf( stream_str, "%s-%s-%c", stations[s], stream, cmpl[c] ); 1454 sprintf( stream_str, "%s-%s-%c", stations[s], tstream, cmpl[c] ); 1476 1455 /* build sfd-name if reading from jukebox */ 1477 1456 if (read_jukebox || autoread) {
Note: See TracChangeset
for help on using the changeset viewer.