Changeset 303
- Timestamp:
- 01/11/2011 11:21:30 PM (13 years ago)
- Location:
- SH_SHM/trunk/source/seed_io
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/source/seed_io/sfdline.c
r16 r303 27 27 28 28 #define TIMECORRUNIT 1000.0 29 30 29 31 30 … … 46 45 int sfd_recno; /* number of records in file */ 47 46 char sfd_stream[BC_LINELTH+1]; /* stream string */ 47 char sfd_netloc[5]; /* network and location code string */ 48 48 BOOLEAN sfd_swap_hdr; /* swap header necessary */ 49 49 int i; /* counter */ … … 58 58 TSyBoolean include_bad; /* include bad data files */ 59 59 TSyBoolean use_timecorr; /* use time correction */ 60 TSyBoolean netloc; /* display network/location code */ 60 61 61 62 /* executable code */ … … 109 110 if (pa_qspecified("-timecorr")) 110 111 use_timecorr = TRUE; 112 113 /* output network and location code */ 114 netloc = TRUE; 115 if (pa_qspecified("-nonetloc")) 116 netloc = FALSE; 111 117 112 118 /* open seed file */ … … 204 210 if (chanstr[1] <= ' ' || chanstr[1] > 'z') chanstr[1] = '\0'; 205 211 ut_uncap( chanstr ); 206 #ifdef XXX 207 if (strcmp(chanstr,"bh") == 0) { strcat( sfd_stream, "vbb-" ); 208 } else if (strcmp(chanstr,"hh") == 0) { strcat( sfd_stream, "vsp-" ); 209 } else if (strcmp(chanstr,"lh") == 0) { strcat( sfd_stream, "lp-" ); 210 } else { 211 strcat( sfd_stream, chanstr ); 212 strcat( sfd_stream, "-" ); 213 } /*endif*/ 214 #endif 215 strcat( sfd_stream, chanstr ); 212 213 strcat( sfd_stream, chanstr ); 216 214 strcat( sfd_stream, "-" ); 217 215 i = (int)strlen( sfd_stream ); … … 221 219 sfd_stream[i+1] = '\0'; 222 220 ut_uncap( sfd_stream ); 221 222 /* network and location code */ 223 sfd_netloc[0] = Cap(seedhdr->network[0]); 224 sfd_netloc[1] = Cap(seedhdr->network[1]); 225 sfd_netloc[2] = Cap(seedhdr->locid[0]); 226 sfd_netloc[3] = Cap(seedhdr->locid[1]); 227 sfd_netloc[4] = '\0'; 228 229 /* blanks are masked by dots */ 230 for (i=0; i<4; i++) 231 if (sfd_netloc[i] == ' ') 232 sfd_netloc[i] = '.'; 223 233 224 234 /* get sample distance */ … … 305 315 fclose( fp ); 306 316 307 fprintf( out, "%c>%s %c>%s %c>%s %c>%s %c>%d %c>%d %c>%d %c>%d \n",317 fprintf( out, "%c>%s %c>%s %c>%s %c>%s %c>%d %c>%d %c>%d %c>%d", 308 318 Seed_C_SfdStream, sfd_stream, Seed_C_SfdName, seedfile, 309 319 Seed_C_SfdTStart, sfd_t_start, Seed_C_SfdTEnd, sfd_t_end, 310 320 Seed_C_SfdRecno, sfd_recno, Seed_C_SfdSwapH, sfd_swap_hdr, 311 321 Seed_C_SfdReclth, recsize, Seed_C_SfdOffset, byteoff ); 322 323 if (netloc) 324 fprintf( out, " %c>%s", 325 Seed_C_SfdAddinf, sfd_netloc); 326 327 fprintf(out, "\n"); 312 328 313 329 if (out != stdout) fclose( out );
Note: See TracChangeset
for help on using the changeset viewer.