Changeset 44
- Timestamp:
- 10/30/2008 10:48:47 PM (14 years ago)
- Location:
- SH_SHM/trunk/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
SH_SHM/trunk/source/globalparams.c
r16 r44 3 3 * ============== 4 4 * 5 * version 25, 2-Mar-20075 * $Revision: 29 $, $Date: 2008-02-23 23:02:22 +0100 (Sa, 23 Feb 2008) $ 6 6 * 7 7 * Management of global parameters … … 333 333 "sfdb_command", 334 334 "sfdb_exec_qual", 335 "sfdb_trailer", 335 336 "s_last_parameter" 336 337 }; … … 371 372 "mysql sfdb", /* sfdb_command */ 372 373 "-B -e", /* sfdb_exec_qual */ 374 "", /* sfdb_trailer */ 373 375 "s_last_parameter" /* last parameter */ 374 376 }; -
SH_SHM/trunk/source/globalparams.h
r16 r44 3 3 * ============== 4 4 * 5 * version 25, 1-Mar-20075 * $Revision: 29 $, $Date: 2008-02-23 23:02:22 +0100 (Sa, 23 Feb 2008) $ 6 6 * 7 7 * Management of global parameters … … 212 212 cGpS_sfdb_command, 213 213 cGpS_sfdb_exec_qual, 214 cGpS_sfdb_trailer, 214 215 cGpS_last 215 216 } TGpStringIndex; -
SH_SHM/trunk/source/motif/cbutil.c
r43 r44 3 3 * ======== 4 4 * 5 * version 100, 11-Jan-20075 * $Revision: 29 $, $Date: 2008-02-23 23:02:22 +0100 (Sa, 23 Feb 2008) $ 6 6 * 7 7 * utility routines for callbacks … … 1632 1632 1633 1633 XtManageChild( w ); 1634 1635 if (GpGetInt(cGpI_debug_level) > 3) 1636 printf( "SHM-dbg4: cu_alert_message: after XtManageChild\n" ); 1634 1637 1635 1638 } /* end of cu_alert_message */ -
SH_SHM/trunk/source/sqliface.c
r16 r44 3 3 * ========== 4 4 * 5 * version 5, 6-Feb-20075 * $Revision: 29 $, $Date: 2008-02-23 23:02:22 +0100 (Sa, 23 Feb 2008) $ 6 6 * 7 7 * Interface to SQL databases … … 214 214 + (double)entime.sec + (double)entime.ms/1000.0; 215 215 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", 217 217 sqlv_sfdb_tmp, GpGetString(cGpS_sfdb_command), 218 218 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 ); 220 221 if (GpGetInt(cGpI_debug_level) > 2) 221 222 printf( "SH-dbg3: executing %s\nSH-dbg3: command line length %d\n", … … 379 380 /* not in cache, get it from database */ 380 381 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", 382 383 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 ); 384 386 if (GpGetInt(cGpI_debug_level) > 2) 385 387 printf( "SH-dbg3: executing %s\n", shellcmd ); … … 616 618 if (strcmp(namptr,"all") == 0 || strcmp(namptr,"ALL") == 0) { 617 619 /* 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", 619 621 scrfil, GpGetString(cGpS_sfdb_command), 620 GpGetString(cGpS_sfdb_exec_qual), scrfil ); 622 GpGetString(cGpS_sfdb_exec_qual), GpGetString(cGpS_sfdb_trailer), 623 scrfil ); 621 624 } else if (strncmp(namptr,"net:",4) == 0 || strncmp(namptr,"NET:",4) == 0) { 622 625 /* get stations of a net from database */ 623 626 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", 625 628 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 ); 627 631 } else { 628 632 629 633 /* 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", 631 635 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 ); 633 638 if (GpGetInt(cGpI_debug_level) > 2) 634 639 printf( "SH-dbg3: execute %s\n", sql ); … … 653 658 654 659 /* 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", 656 661 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 ); 658 664 659 665 } /*endif*/
Note: See TracChangeset
for help on using the changeset viewer.