Changeset 44


Ignore:
Timestamp:
10/30/2008 10:48:47 PM (14 years ago)
Author:
marcus
Message:

r29 | svn | 2008-02-23 23:02:22 +0100 (Sa, 23 Feb 2008) | 1 line

implemented trailer string in sfdb requests necessary for ingres

Location:
SH_SHM/trunk/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • SH_SHM/trunk/source/globalparams.c

    r16 r44  
    33 *      ============== 
    44 * 
    5  * version 25, 2-Mar-2007 
     5 * $Revision: 29 $, $Date: 2008-02-23 23:02:22 +0100 (Sa, 23 Feb 2008) $ 
    66 * 
    77 * Management of global parameters 
     
    333333        "sfdb_command", 
    334334        "sfdb_exec_qual", 
     335        "sfdb_trailer", 
    335336        "s_last_parameter" 
    336337}; 
     
    371372        "mysql sfdb",                    /* sfdb_command */ 
    372373        "-B -e",                         /* sfdb_exec_qual */ 
     374        "",                              /* sfdb_trailer */ 
    373375        "s_last_parameter"               /* last parameter */ 
    374376}; 
  • SH_SHM/trunk/source/globalparams.h

    r16 r44  
    33 *      ============== 
    44 * 
    5  * version 25, 1-Mar-2007 
     5 * $Revision: 29 $, $Date: 2008-02-23 23:02:22 +0100 (Sa, 23 Feb 2008) $ 
    66 * 
    77 * Management of global parameters 
     
    212212        cGpS_sfdb_command, 
    213213        cGpS_sfdb_exec_qual, 
     214        cGpS_sfdb_trailer, 
    214215        cGpS_last 
    215216} TGpStringIndex; 
  • SH_SHM/trunk/source/motif/cbutil.c

    r43 r44  
    33 *      ======== 
    44 * 
    5  * version 100, 11-Jan-2007 
     5 * $Revision: 29 $, $Date: 2008-02-23 23:02:22 +0100 (Sa, 23 Feb 2008) $ 
    66 * 
    77 * utility routines for callbacks 
     
    16321632 
    16331633        XtManageChild( w ); 
     1634 
     1635        if  (GpGetInt(cGpI_debug_level) > 3) 
     1636                printf( "SHM-dbg4: cu_alert_message: after XtManageChild\n" ); 
    16341637 
    16351638} /* end of cu_alert_message */ 
  • SH_SHM/trunk/source/sqliface.c

    r16 r44  
    33 *      ========== 
    44 * 
    5  * version 5, 6-Feb-2007 
     5 * $Revision: 29 $, $Date: 2008-02-23 23:02:22 +0100 (Sa, 23 Feb 2008) $ 
    66 * 
    77 * Interface to SQL databases 
     
    214214                        + (double)entime.sec + (double)entime.ms/1000.0; 
    215215                sprintf( shellcmd, 
    216                         "\\rm %s; %s %s \"select %s from sftab where (((edate > %d) OR (edate = %d AND etime >= %10.3lf)) AND ((sdate < %d) OR (sdate = %d AND stime <= %10.3lf))) ORDER BY sdate,stime\" >%s", 
     216                        "\\rm %s; %s %s \"select %s from sftab where (((edate > %d) OR (edate = %d AND etime >= %10.3lf)) AND ((sdate < %d) OR (sdate = %d AND stime <= %10.3lf))) ORDER BY sdate,stime\" %s >%s", 
    217217                        sqlv_sfdb_tmp, GpGetString(cGpS_sfdb_command), 
    218218                        GpGetString(cGpS_sfdb_exec_qual), TABLE_ELEMENTS, rd1date, rd1date, 
    219                         rd1time, rd2date, rd2date, rd2time, sqlv_sfdb_tmp ); 
     219                        rd1time, rd2date, rd2date, rd2time, GpGetString(cGpS_sfdb_trailer), 
     220                        sqlv_sfdb_tmp ); 
    220221                if  (GpGetInt(cGpI_debug_level) > 2) 
    221222                        printf( "SH-dbg3: executing %s\nSH-dbg3: command line length %d\n", 
     
    379380                /* not in cache, get it from database */ 
    380381                sprintf( shellcmd, 
    381                         "\\rm %s; %s %s \"select rootpath from pathtab where id = \'%d\'\" >%s", 
     382                        "\\rm %s; %s %s \"select rootpath from pathtab where id = \'%d\'\" %s >%s", 
    382383                        tmpfileb, GpGetString(cGpS_sfdb_command), 
    383                         GpGetString(cGpS_sfdb_exec_qual), pathid, tmpfileb ); 
     384                        GpGetString(cGpS_sfdb_exec_qual), pathid, 
     385                        GpGetString(cGpS_sfdb_trailer), tmpfileb ); 
    384386                if  (GpGetInt(cGpI_debug_level) > 2) 
    385387                        printf( "SH-dbg3: executing %s\n", shellcmd ); 
     
    616618                if  (strcmp(namptr,"all") == 0 || strcmp(namptr,"ALL") == 0)  { 
    617619                        /* get really all stations from database */ 
    618                         sprintf( sql, "\\rm %s; %s %s \"select station from staadm order by netpri,station\" >%s", 
     620                        sprintf( sql, "\\rm %s; %s %s \"select station from staadm order by netpri,station\" %s >%s", 
    619621                                scrfil, GpGetString(cGpS_sfdb_command), 
    620                                 GpGetString(cGpS_sfdb_exec_qual), scrfil ); 
     622                                GpGetString(cGpS_sfdb_exec_qual), GpGetString(cGpS_sfdb_trailer), 
     623                                scrfil ); 
    621624                } else if  (strncmp(namptr,"net:",4) == 0 || strncmp(namptr,"NET:",4) == 0)  { 
    622625                        /* get stations of a net from database */ 
    623626                        namptr += 4; 
    624                         sprintf( sql, "\\rm %s; %s %s \"select station from staadm where netpri='%s' order by netpri,station\" >%s", 
     627                        sprintf( sql, "\\rm %s; %s %s \"select station from staadm where netpri='%s' order by netpri,station\" %s >%s", 
    625628                                scrfil, GpGetString(cGpS_sfdb_command), 
    626                                 GpGetString(cGpS_sfdb_exec_qual), namptr, scrfil ); 
     629                                GpGetString(cGpS_sfdb_exec_qual), namptr, 
     630                                GpGetString(cGpS_sfdb_trailer), scrfil ); 
    627631                } else { 
    628632 
    629633                        /* assume name is a attribute name, request value */ 
    630                         sprintf( sql, "\\rm %s; %s %s \"select attrflag from staattr where attrname='%s'\" >%s", 
     634                        sprintf( sql, "\\rm %s; %s %s \"select attrflag from staattr where attrname='%s'\" %s >%s", 
    631635                                scrfil, GpGetString(cGpS_sfdb_command), 
    632                                 GpGetString(cGpS_sfdb_exec_qual), namptr, scrfil ); 
     636                                GpGetString(cGpS_sfdb_exec_qual), namptr, 
     637                                GpGetString(cGpS_sfdb_trailer), scrfil ); 
    633638                        if  (GpGetInt(cGpI_debug_level) > 2) 
    634639                                printf( "SH-dbg3: execute %s\n", sql ); 
     
    653658 
    654659                        /* get flagged stations from database */ 
    655                         sprintf( sql, "\\rm %s; %s %s \"select station from staadm where staflags&%d order by netpri,station\" >%s", 
     660                        sprintf( sql, "\\rm %s; %s %s \"select station from staadm where staflags&%d order by netpri,station\" %s >%s", 
    656661                                scrfil, GpGetString(cGpS_sfdb_command), 
    657                                 GpGetString(cGpS_sfdb_exec_qual), flagval, scrfil ); 
     662                                GpGetString(cGpS_sfdb_exec_qual), flagval, 
     663                                GpGetString(cGpS_sfdb_trailer), scrfil ); 
    658664 
    659665                } /*endif*/ 
Note: See TracChangeset for help on using the changeset viewer.