Changeset 334
- Timestamp:
- 03/02/2011 05:59:37 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/source/motif/seismics.c
r319 r334 1094 1094 curdep = 33.0; 1095 1095 } /*endif*/ 1096 if (lptr[0] == 'm' && lptr[1] == 'b' && lptr[2] == ' ') { 1097 lptr += 3; 1096 while (*lptr == ' ') lptr++; /* now we should come to magnitude */ 1097 if (*lptr >= '0' && *lptr <= '9') { 1098 /* here we found magnitude */ 1098 1099 sscanf( lptr, "%f", &curmag ); 1099 while (*lptr != ' ' && *lptr != '\n') lptr++; /* skip over magnitude */1100 while (*lptr == ' ') lptr++;1100 } else { 1101 curmag = -1.0; 1101 1102 } /*endif*/ 1102 if (lptr[0] == 'M' && lptr[1] == 'L' && lptr[2] == ' ') { 1103 lptr += 3; 1104 sscanf( lptr, "%f", &curmag ); 1105 while (*lptr != ' ' && *lptr != '\n') lptr++; /* skip over magnitude */ 1106 while (*lptr == ' ') lptr++; 1107 } /*endif*/ 1108 if (lptr[0] == 'M' && lptr[1] == 'S' && lptr[2] == ' ') { 1109 lptr += 3; 1110 sscanf( lptr, "%f", &curmag ); 1111 while (*lptr != ' ' && *lptr != '\n') lptr++; /* skip over magnitude */ 1112 while (*lptr == ' ') lptr++; 1113 } /*endif*/ 1114 if (lptr[0] == 'M' && lptr[1] == ' ' && lptr[2] >= '0' && lptr[2] <= '9') { 1115 lptr += 2; 1116 sscanf( lptr, "%f", &curmag ); 1117 while (*lptr != ' ' && *lptr != '\n') lptr++; /* skip over magnitude */ 1118 while (*lptr == ' ') lptr++; 1119 } /*endif*/ 1103 while (*lptr != ' ' && *lptr != '\n') lptr++; /* skip over mangitude */ 1104 while (*lptr == ' ') lptr++; /* now we should come to magnitude type */ 1105 while (*lptr != ' ' && *lptr != '\n') lptr++; /* skip over mangitude type */ 1120 1106 tchar = *lptr; 1121 1107 if (tchar == 'A') { … … 1148 1134 /* if exclusive agency is set, accept only this */ 1149 1135 if (*excl_agency != '\0' 1150 && strcasecmp(excl_agency,infsrc[*evno]) != 0) 1136 && strcasecmp(excl_agency,infsrc[*evno]) != 0) { 1137 if (GpGetInt(cGpI_debug_level) > 3) 1138 printf( "SHM-dbg4: skipped agency %s\n", infsrc[*evno] ); 1151 1139 continue; 1152 sprintf( tmpstr, "-%c", tchar ); 1153 strcat( infsrc[*evno], tmpstr ); 1140 } /*endif*/ 1141 if (tchar == 'M' || tchar == 'A') { 1142 sprintf( tmpstr, "-%c", tchar ); 1143 strcat( infsrc[*evno], tmpstr ); 1144 } /*endif*/ 1154 1145 trav[*evno] = curtrav; 1155 1146 lat[*evno] = curlat;
Note: See TracChangeset
for help on using the changeset viewer.