Ignore:
Timestamp:
02/22/2011 11:38:21 AM (13 years ago)
Author:
marcus
Message:

r172 | klaus | 2011-02-18 11:35:16 +0100 (Fr, 18 Feb 2011) | 1 line

modified sfd2db for renaming of han0,han3 eh channels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SH_SHM/trunk/source/seed_io/sfd2db.c

    r311 r333  
    33 *      ======== 
    44 * 
    5  * $Revision: 153 $, $Date: 2011-01-27 11:12:54 +0100 (Do, 27 Jan 2011) $ 
     5 * $Revision: 172 $, $Date: 2011-02-18 11:35:16 +0100 (Fr, 18 Feb 2011) $ 
    66 * 
    77 * reads lines from sfdfile and creates commands to insert into sfdb database 
     
    6060        TSyBoolean invhdr;                  /* invert header info in sfd entry */ 
    6161        TSyBoolean baynet;                  /* convert SH to BH for Bayernnetz */ 
    62         TSyBoolean modgec2;                 /* modify gec2a and gec2b to gec2 */ 
     62        TSyBoolean modgec2;                 /* modify gec2a and gec2b to gec2 */ 
     63        TSyBoolean genesys;                 /* modify genesys stream names */ 
    6364        TSyBoolean go;                      /* end tmpfile with insert statements with \g */ 
    6465 
     
    7980        invhdr = pa_qspecified( "-invhdr" ); 
    8081        baynet = pa_qspecified( "-baynet" ); 
     82        genesys = pa_qspecified( "-genesys" ); 
    8183        go = pa_qspecified( "-go" ); 
    8284        modgec2 = 1; 
     
    272274                        if  (strncmp(descr.stream,"rotz-sh",7) == 0)  descr.stream[5] = 'b'; 
    273275                } /*endif*/ 
     276                if  (genesys)  { 
     277            char tmpstr[3]; 
     278                        int tmplen; 
     279                        /* store component */ 
     280                        tmplen = strlen(descr.stream); 
     281                        tmpstr[0] = descr.stream[tmplen-2]; 
     282                        tmpstr[1] = descr.stream[tmplen-1]; 
     283                        tmpstr[2] = '\0'; 
     284                        if  (strncmp(descr.stream,"han0-eh",7) == 0)  { 
     285                                strcpy( descr.stream, "han0d-dh" ); 
     286                                strcat( descr.stream, tmpstr ); 
     287                        } /*endif*/ 
     288                        if  (strncmp(descr.stream,"han3-eh",7) == 0)  { 
     289                                strcpy( descr.stream, "han3s-dh" ); 
     290                                strcat( descr.stream, tmpstr ); 
     291                        } /*endif*/ 
     292                } /*endif*/ 
    274293                if  (modgec2)  { 
    275294                        char tmpstr[cBcLineLth+1]; 
Note: See TracChangeset for help on using the changeset viewer.