Changeset 352 for SH_SHM/trunk
- Timestamp:
- 03/28/2011 10:49:42 AM (13 years ago)
- Location:
- SH_SHM/trunk/source/seed_io
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/source/seed_io/seed_lib.c
r341 r352 3 3 * ========== 4 4 * 5 * $Revision: 18 0 $, $Date: 2011-03-09 16:27:03 +0100 (Mi, 09MÀr 2011) $5 * $Revision: 189 $, $Date: 2011-03-25 18:54:37 +0100 (Fr, 25 MÀr 2011) $ 6 6 * 7 7 * SEED library … … 3316 3316 UWORD *uw; /* pointer to UWORD */ 3317 3317 char *cp; /* pointer to char */ 3318 int offset; /* offset from record start */ 3319 WORD *next; /* next blockette */ 3320 int blkcnt; /* blockette counter */ 3318 3321 3319 3322 /* executable code */ … … 3328 3331 return 0; 3329 3332 } /*endif*/ 3330 if (b1000) {3331 uw = (UWORD *)((char *)rec + (int)(rec->first));3332 if (*uw != 1000 && *uw != 59395) b1000 = FALSE;3333 } /*endif*/3334 3333 if (!b1000) return 0; 3335 3336 cp = (char *)rec + (int)(rec->first) + 4; 3334 b1000 = FALSE; 3335 offset = (int)(rec->first); 3336 blkcnt = 0; 3337 while (!b1000) { 3338 uw = (UWORD *)((char *)rec + offset); 3339 if (*uw == 1000 || *uw == 59395) { 3340 b1000 = TRUE; 3341 break; 3342 } /*endif*/ 3343 next = (WORD *)((char *)rec + offset + 2); 3344 if ((int)(*next) <= offset || (int)(*next) > 4096) break; 3345 offset = (int)(*next); 3346 blkcnt++; 3347 if (blkcnt >= rec->no_of_blockettes) break; 3348 } /*endwhile*/ 3349 if (!b1000) return 0; 3350 3351 cp = (char *)rec + offset + 4; 3337 3352 return (int)(*cp); 3338 3353 -
SH_SHM/trunk/source/seed_io/seedquickdump.c
r341 r352 3 3 * =============== 4 4 * 5 * $Revision: 18 0 $, $Date: 2011-03-09 16:27:03 +0100 (Mi, 09MÀr 2011) $5 * $Revision: 189 $, $Date: 2011-03-25 18:54:37 +0100 (Fr, 25 MÀr 2011) $ 6 6 * 7 7 * Dumps out Headerinfo of SEED files. … … 83 83 int jitter_count=0; /* counts very small 'gaps' (<dt/2) */ 84 84 BOOLEAN write_newline; /* write a new line after record */ 85 int compression; /* compression ID of record data */ 85 86 86 87 /* executable code */ … … 238 239 gaplth = tc_tdiff( sfd_t_start, lasttime, &status ); 239 240 241 compression = SeedGetCompression( (SeedDataHeaderT *)seedrec ); 240 242 b1000found = FALSE; 241 243 time_quality = -1; … … 305 307 } else if (strcmp(showinfo,"b1000") == 0) { 306 308 printf( "%d ", b1000found ); 309 } else if (strcmp(showinfo,"compression") == 0) { 310 printf( "%d ", compression ); 307 311 } else { 308 312 write_newline = FALSE;
Note: See TracChangeset
for help on using the changeset viewer.