Changeset 3157


Ignore:
Timestamp:
11/15/07 10:23:45 (13 years ago)
Author:
paulf
Message:

fix of big-endian swapping by Matteo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/archiving/tankplayer_tools/sac2tb.c

    r3155 r3157  
    8686  } 
    8787 
    88   /* mtheo 2007/10/19 */ 
    89   if(swapIsNeeded == 1) { 
    90       for (i = 0; i < npts; i++) 
    91           SwapLong( (long *) &(seis[i])); 
    92   } 
    93    
    9488  if (sh.delta < 0.001) 
    9589  { 
     
    112106  strib(trh->net); 
    113107   
    114   if (memcmp(sh.khole, sac_undef, TRACE2_LOC_LEN-1) != 0 && strncmp(sh.khole, "  ", 2) != 0) { 
     108  if (memcmp(sh.khole, sac_undef, TRACE2_LOC_LEN-1) != 0 && strncmp(sh.khole, "  ", 2) != 0 ) { 
    115109      strncpy(trh->loc, sh.khole, TRACE2_LOC_LEN); 
    116110      trh->loc[TRACE2_LOC_LEN-1] = '\0'; 
     
    145139  } 
    146140  fclose(fp); 
     141 
     142  /* mtheo 2007/11/15 */ 
     143  if(swapIsNeeded == 1) { 
     144      for (i = 0; i < npts; i++) 
     145          SwapLong( (long *) &(seis[i])); 
     146  } 
    147147   
    148148  sp = seis; 
Note: See TracChangeset for help on using the changeset viewer.