Changeset 306
- Timestamp:
- 01/13/2011 05:00:19 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/source/seed_io/seed_tidy.c
r168 r306 74 74 #define F_YQFIXNAMES 0x100000 75 75 #define F_TBFIXNAMES 0x200000 76 #define F_SETLOCATION 0x400000 76 77 77 78 … … 84 85 static char tdv_newchan[cBcLineLth+1]=""; /* new channel name */ 85 86 static char tdv_newnetwork[cBcLineLth+1]=""; /* new network code */ 87 static char tdv_newlocation[cBcLineLth+1]=""; /* new location code */ 86 88 static int tdv_max_recsamp=0; /* maximum number of samples per rec*/ 87 89 static int tdv_timecorr=0; /* time correction */ … … 155 157 fprintf( stderr, " -chan=<chan> replaces channel by <chan> (bhz)\n" ); 156 158 fprintf( stderr, " -network=<net> replaces network code by <net>\n" ); 159 fprintf( stderr, " -location=<loc> replaces location code by <loc>\n" ); 157 160 fprintf( stderr, " -b1000 insert blockette 1000 (Sparc=big-endian)\n" ); 158 161 fprintf( stderr, " -b1000l insert blockette 1000 (intel=little-endian)\n" ); … … 202 205 if (pa_qspecified( "-network" )) { 203 206 flags |= F_SETNETWORK; 204 strcpy( tdv_newnetwork, pa_qvalue("-network") ); 207 strncpy( tdv_newnetwork, pa_qvalue("-network"), 2 ); 208 } /*endif*/ 209 if (pa_qspecified( "-location" )) { 210 flags |= F_SETLOCATION; 211 strncpy( tdv_newlocation, pa_qvalue("-location"), 2 ); 205 212 } /*endif*/ 206 213 if (pa_qspecified( "-maxgapfac" )) … … 824 831 } /*endif*/ 825 832 if (F_SETNETWORK & flags) { 826 shdr->network[0] = tdv_newnetwork[0]; 827 shdr->network[1] = tdv_newnetwork[1]; 833 shdr->network[0] = Cap(tdv_newnetwork[0]); 834 shdr->network[1] = Cap(tdv_newnetwork[1]); 835 } /*endif*/ 836 if (F_SETLOCATION & flags) { 837 shdr->locid[0] = Cap(tdv_newlocation[0]); 838 shdr->locid[1] = Cap(tdv_newlocation[1]); 828 839 } /*endif*/ 829 840 /* set time correction if requested */ … … 886 897 switch_days = switch_hours = FALSE; 887 898 888 /* new file if the record len th changes */899 /* new file if the record length changes */ 889 900 this_reclth = SeedGetReclth( (SeedDataHeaderT *)rec, FALSE ); 890 901 if (last_reclth > 0 && this_reclth != last_reclth)
Note: See TracChangeset
for help on using the changeset viewer.