Changeset 46
- Timestamp:
- 10/30/2008 10:54:18 PM (14 years ago)
- Location:
- SH_SHM/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/command/SHSTRTUP.SHC
r16 r46 134 134 fct ferindex |"path|fereg.dat| 135 135 fct inci_table |"path|pinci.dat| 136 fct locfile |"path|statinf.dat|136 !fct locfile |"path|statinf.dat| 137 137 138 138 ! define logicals … … 160 160 fct ferindex shc_inputs:fereg.dat 161 161 fct inci_table shc_inputs:pinci.dat 162 fct locfile shc_inputs:statinf.dat162 !fct locfile shc_inputs:statinf.dat 163 163 fct tt_table shc_inputs: 164 164 fct path inputs shc_inputs: -
SH_SHM/trunk/errors/ERR_1400.MSG
r16 r46 8 8 ! 9 9 *** SQL-01 error creating unique scratch file *** 10 *** SQL-02 string oveflow *** 10 *** SQL-02 string overflow *** 11 *** SQL-03 error parsing sftab line *** 12 *** SQL-04 error reading from scratch file *** 11 13 -
SH_SHM/trunk/source/seed_io/seed_lib.c
r45 r46 3 3 * ========== 4 4 * 5 * $Revision: 3 0 $, $Date: 2008-02-23 23:36:22 +0100 (Sa, 23 Feb2008) $5 * $Revision: 31 $, $Date: 2008-03-03 20:47:24 +0100 (Mo, 03 MÀr 2008) $ 6 6 * 7 7 * SEED library … … 683 683 char xaddinf[Seed_C_AddinfLth+1]; /* netcode+locid searched */ 684 684 TSyBoolean from_db; /* DB file instead of sfdfile */ 685 TSyBoolean is_ingres; /* we have here wordy ingres output */ 685 686 TSyBoolean firstline; /* first line of sfdfile */ 686 687 … … 737 738 min_tdiff = 1.0e10; 738 739 fdescr->t_start[0] = '\0'; 740 is_ingres = FALSE; 739 741 while (fgets(line,Seed_C_SFDLINELTH,sfd) != NULL) { 740 742 if (*line == '!') continue; 743 /* if ingres writes something like (223 rows) then stop */ 744 if (is_ingres && strstr(line," rows)\n")) break; 741 745 if (firstline) { 742 746 firstline = FALSE; 747 is_ingres = FALSE; 743 748 if (strncmp(line,"station",7) == 0) { 744 749 from_db = TRUE; 750 is_ingres = FALSE; 745 751 continue; /* first line in db file contains no data */ 746 752 } else if (strncmp(line,"INGRES TERMINAL",15) == 0) { 747 753 from_db = TRUE; 754 is_ingres = TRUE; 748 755 /* this is ingres output; skip this stupid header */ 749 756 fgets(line,Seed_C_SFDLINELTH,sfd); /* this is: Ingres 2006 Linux ... */ -
SH_SHM/trunk/source/sqliface.c
r44 r46 3 3 * ========== 4 4 * 5 * $Revision: 29 $, $Date: 2008-02-23 23:02:22 +0100 (Sa, 23 Feb2008) $5 * $Revision: 31 $, $Date: 2008-03-03 20:47:24 +0100 (Mo, 03 MÀr 2008) $ 6 6 * 7 7 * Interface to SQL databases … … 308 308 char *rootpath; /* pointer to root path */ 309 309 char tmpfileb[cBcFileLth+1]; /* second scratch file */ 310 char xline[cBcLineLth+1]; /* current line of file */ 310 char xline[cBcLongStrLth+1]; /* current line of file */ 311 char tmpstr[cBcLongStrLth+1]; /* strip blanks from original string */ 311 312 char shellcmd[cBcVeryLongStrLth+1]; /* shell command */ 312 313 FILE *fp; /* pointer to file */ 313 314 int i; /* counter */ 315 TSyBoolean is_ingres; /* talk to an ingres database */ 314 316 315 317 /* executable code */ … … 396 398 } /*endif*/ 397 399 /* read off header */ 398 fgets( xline, cBcLineLth, fp ); 400 is_ingres = FALSE; 401 fgets( xline, cBcLongStrLth, fp ); 402 if (strncmp(xline,"INGRES TERMINAL ",16) == 0) { 403 is_ingres = TRUE; 404 /* there are several lines to read off for INGRES ... */ 405 fgets( xline, cBcLongStrLth, fp ); /* this is: Ingres 2006 Linux ... */ 406 fgets( xline, cBcLongStrLth, fp ); /* this is: date */ 407 fgets( xline, cBcLongStrLth, fp ); /* this is: blank line */ 408 fgets( xline, cBcLongStrLth, fp ); /* this is: continue */ 409 fgets( xline, cBcLongStrLth, fp ); /* this is: * Executing ... */ 410 fgets( xline, cBcLongStrLth, fp ); /* this is: blank line */ 411 fgets( xline, cBcLongStrLth, fp ); /* this is: blank line */ 412 fgets( xline, cBcLongStrLth, fp ); /* this is: header */ 413 } /*endif*/ 399 414 fgets( descr->name, cBcFileLth, fp ); 400 415 i = strlen( descr->name ); 401 416 if (i > 0 && descr->name[i-1] == '\n') descr->name[i-1] = '\0'; 402 417 fclose( fp ); 418 if (is_ingres) { 419 /* strip blanks */ 420 sscanf( descr->name, "%s", tmpstr ); 421 strcpy( descr->name, tmpstr ); 422 } /*endif*/ 403 423 /* put it to cache */ 424 if (GpGetInt(cGpI_debug_level) > 5) 425 printf( "SH-dbg6: caching rootpath >%s<\n", descr->name ); 404 426 SqlCacheRootPath( pathid, descr->name, status ); 405 427 sy_fdelete( tmpfileb ); -
SH_SHM/trunk/util/check_evt.c
r16 r46 39 39 #include BC_SYSBASE 40 40 #include "eventdsc.h" 41 #include "tcusrdef.h" 41 42 42 43 … … 68 69 static float efv_magn=0.0; /* max. magnitude found */ 69 70 static int efv_pkp_count=0; /* number of PKP phases */ 71 static BOOLEAN efv_illegal_origin; /* illegal origin time */ 70 72 71 73 … … 99 101 /* efv_infile is used for messages, directory will be removed */ 100 102 i = strlen( infile ) - 1; 101 while (infile[i] != '/' && i > 0) i--; 102 strcpy( efv_infile, infile+i+1 ); 103 while (infile[i] != '/' && i > 0) 104 i--; 105 strcpy( efv_infile, infile+i ); 103 106 104 107 status = EveNOERROR; … … 133 136 BOOLEAN is_p_phase; /* phase is P or (P) */ 134 137 BOOLEAN loc_given; /* location given in this record */ 138 NTIME ntime; /* numeric origin time */ 135 139 136 140 /* executable code */ … … 181 185 efv_uncorr_loc = TRUE; 182 186 strcpy( efv_uncorrphase, event->phase ); 187 } /*endif*/ 188 189 /* is there an origin time from 1970? */ 190 if (loc_given) { 191 tc_t2n( event->origin_time, &ntime, status ); 192 if (SySevere(status)) { 193 efv_illegal_origin = TRUE; 194 } else if (ntime.year == 1970) { 195 efv_illegal_origin = TRUE; 196 } /*endif*/ 183 197 } /*endif*/ 184 198 -
SH_SHM/trunk/util/ev2view.c
r16 r46 240 240 if (event->mag[EvcMagMs] != EvEMPTY_MAGNITUDE) { 241 241 fprintf( view, " MS: %3.1f", event->mag[EvcMagMs] ); 242 } /*endif*/ 243 if (event->mag[EvcMagMbb] != EvEMPTY_MAGNITUDE) { 244 fprintf( view, " Mbb: %3.1f", event->mag[EvcMagMbb] ); 242 245 } /*endif*/ 243 246 } /*endif*/ -
SH_SHM/trunk/util/locate_by_ttfit.csh
r16 r46 4 4 # =================== 5 5 # 6 # version 14, 4-Jun-20076 # $Revision: 31 $, $Date: 2008-03-03 20:47:24 +0100 (Mo, 03 MÀr 2008) $ 7 7 # 8 8 # Locate event via travel time fit. … … 52 52 53 53 chdir $SH_SCRATCH 54 # set units for plot, want to change this to cm 55 gmtdefaults -Du >.gmtdefaults 54 56 55 57 # delete previously existing result file … … 296 298 #$PSVIEW -right $PWD/$psfile & # this dies after the shell terminates (on Sun) 297 299 298 set xtmp=`whoami | cut -c1-6` 299 300 if ("$xtmp" == "tmpusr") then 301 302 $PSVIEW $PWD/$psfile & 303 304 else 305 306 set pos="" 307 if ("`hostname`" == "ersn24") set pos="-geometry 940x780+0+0" 308 309 rsh -n `hostname` "$PSVIEW -right -display $DISPLAY $pos $PWD/$psfile" & 310 311 endif 300 $PSVIEW $PWD/$psfile & 312 301 313 302 #\rm $fitxyz
Note: See TracChangeset
for help on using the changeset viewer.