Changeset 30


Ignore:
Timestamp:
10/30/2008 10:35:00 PM (15 years ago)
Author:
marcus
Message:

r15 | svn | 2008-01-25 11:48:08 +0100 (Fr, 25 Jan 2008) | 1 line

command line parameter managment via cpar, deleted cmdargs.c

Location:
SH_SHM/trunk
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • SH_SHM/trunk/doc/html/sfdb.html

    r16 r30  
    5353</P> 
    5454<P> 
    55 Based on this concept on (A)-, (B)- and (C)-type fils an 
     55Based on this concept on (A)-, (B)- and (C)-type files an 
    5656<a href="sfdb_archiving.html">archiving system</a> is implemented at the SZGRF. 
    5757</P> 
  • SH_SHM/trunk/doc/html/sfdb_archiving.html

    r16 r30  
    9797<h3>Archiving routines</h3> 
    9898The routines for processing the archiving functions are <i>ArchAtoB.py</i> and 
    99 <i>archiver.py</i>.  Both Python scripts are in the directory <i>$SH_UTIL/sfdb</i>. 
     99<i>archiver.py</i>.  Both Python scripts are in the directory <i>$DPROG/sfdb</i>. 
    100100A typical crontab entry would look like 
    101101</p> 
    102102<p><i> 
    103 22 3,6,9 * * * /usr/local/SH/shlink/util/sfdb/ArchAtoB.py 12 >>log/ArchAtoB.log 2>&1<br> 
    104 59 15 * * * /usr/local/SH/shlink/util/sfdb/archiver.py >>log/archiver.log 2>&1 
     10322 3,6,9 * * * /programs/linux/dprog/sfdb/ArchAtoB.py 12 >>log/ArchAtoB.log 2>&1<br> 
     10459 15 * * * /programs/linux/dprog/sfdb/archiver.py >>log/archiver.log 2>&1 
    105105</i></p> 
    106106<p> 
     
    116116</p> 
    117117 
    118 <P><small>This page last modified 28-Feb-2007</small></P> 
     118<P><small>This page last modified 21-Jan-2008</small></P> 
    119119</BODY> 
    120120</HTML> 
  • SH_SHM/trunk/source/Makefile

    r20 r30  
    3232 
    3333LOCAL_SRCS      = \ 
    34         cmdargs.c   logplot.c   recfiltr.c  shlib.c     shmenuio.c  timeconv.c \ 
     34        logplot.c   recfiltr.c  shlib.c     shmenuio.c  timeconv.c \ 
    3535        cmdparse.c  matrixhd.c  shmath.c    shmenux.c   travtime.c  residual.c \ 
    3636        cpar.c      numres.c    shcorr.c    shmenu0.c   shmidlev.c  usrinpw.c \ 
  • SH_SHM/trunk/source/motif/shm.c

    r28 r30  
    33 *      ===== 
    44 * 
    5  * $Revision: 13 $, $Date: 2008-01-18 10:01:21 +0100 (Fr, 18 Jan 2008) $ 
     5 * $Revision: 15 $, $Date: 2008-01-25 11:48:08 +0100 (Fr, 25 Jan 2008) $ 
    66 * 
    77 * main module of shm 
     
    5757#include "shvars.h" 
    5858#include "shdirs.h" 
    59 #include "causrdef.h" 
     59#include "cpar.h" 
    6060#include "tcusrdef.h" 
    6161#include "earthloc.h" 
     
    594594static TSyBoolean     xmv_polar_on=FALSE;      /* particle motion switched on */ 
    595595static TSyBoolean     xmv_keeptrc_auto=FALSE; /* 'Keep Traces' Button autom. */ 
    596 static TSyBoolean     xmv_onlymainwdw=FALSE; /* open only main window */ 
     596static char           xmv_openwdw[cBcShortStrLth+1]; /* which windows to open */ 
    597597/*static char           xmv_filter_name[cBcShortStrLth+1][MAXFILNAME];*/ /* filter names */ 
    598598/* theoretical phases (must be same sequence as in dialog box) */ 
     
    678678        /* executable code */ 
    679679 
    680  
    681680        printf( "\n" ); 
    682681        printf( "SeismicHandler version 2.4i (16-Jan-2008), Copyright (C) 2006\n" ); 
     
    688687        printf( "\n" ); 
    689688 
     689        /* for optional parameters; -exec=<proc>, -evt=<evt>, -openwdw=<wdw> */ 
     690        pa_init( argc, argv ); 
     691 
    690692        /* read global parameters */ 
    691693        GpReadParfile(); 
     
    794796        } /*endif*/ 
    795797 
    796         { 
    797         /* check whether to open only main window */ 
    798         char parval[cBcLineLth+1]; 
    799         ca_qstr( argc, argv, "wdw", parval ); 
    800         if  (strcmp(parval+1,"m") == 0) 
    801                 xmv_onlymainwdw = TRUE; 
    802         } 
     798        /* check which windows to open */ 
     799        if  (pa_qspecified("-openwdw"))  { 
     800                strncpy( xmv_openwdw, pa_qvalue("-openwdw"), cBcShortStrLth ); 
     801        } else { 
     802                strcpy( xmv_openwdw, "mspe" ); 
     803        } /*endif*/ 
    803804 
    804805        xm_initialize(); 
     
    810811        /* take SH script and evt file from command line */ 
    811812        { 
    812         char autoexec[cBcLineLth+1]="";  /* autoexec name */ 
    813         ca_qstr( argc, argv, "exec", autoexec ); 
    814         if  (*autoexec != '\0')  { 
    815                 printf( "--> execute auto .%s.\n", autoexec+1 ); 
    816                 status = cBcNoError; 
    817                 callsh( autoexec+1, &n, &status ); 
    818                 mg_tracedisplay( xmv_w[k_widget_draw], &xmv_dspctrl, &status ); 
    819         } /*endif*/ 
    820         ca_qstr( argc, argv, "evt", autoexec ); 
    821         if  (*autoexec != '\0')  { 
    822                 printf( "--> execute evt .%s.\n", autoexec+1 ); 
    823                 status = cBcNoError; 
    824                 cl3_restore_from_evt( autoexec+1, xmv_cpar, NULL,       &status ); 
    825                 mg_tracedisplay( xmv_w[k_widget_draw], &xmv_dspctrl, &status ); 
    826         } /*endif*/ 
     813                char autoexec[cBcLineLth+1]="";  /* autoexec name */ 
     814                if  (pa_qspecified("-exec"))  { 
     815                        strncpy( autoexec, pa_qvalue("-exec"), cBcLineLth ); 
     816                        if  (GpGetInt(cGpI_debug_level) > 0) 
     817                                printf( "SHM-dbg1: execute auto .%s.\n", autoexec+1 ); 
     818                        status = cBcNoError; 
     819                        callsh( autoexec+1, &n, &status ); 
     820                        mg_tracedisplay( xmv_w[k_widget_draw], &xmv_dspctrl, &status ); 
     821                } /*endif*/ 
     822                if  (pa_qspecified("-evt"))  { 
     823                        strncpy( autoexec, pa_qvalue("-evt"), cBcLineLth ); 
     824                        if  (GpGetInt(cGpI_debug_level) > 0) 
     825                                printf( "SHM-dbg1: load evt %s\n", autoexec+1 ); 
     826                        status = cBcNoError; 
     827                        cl3_restore_from_evt( autoexec+1, xmv_cpar, NULL,       &status ); 
     828                        mg_tracedisplay( xmv_w[k_widget_draw], &xmv_dspctrl, &status ); 
     829                } /*endif*/ 
    827830        } 
    828831 
     
    49264929        if  (XtIsManaged(widget))  XtUnmanageChild( widget ); 
    49274930        if  (w > 0 && h > 0) XtConfigureWidget( widget, x, y, w, h, border ); 
    4928         XtManageChild( widget ); 
    4929         XtMoveWidget( XtParent(widget), x, y ); 
     4931        if  (strchr(xmv_openwdw,'m') != NULL)  { 
     4932                XtManageChild( widget ); 
     4933                XtMoveWidget( XtParent(widget), x, y ); 
     4934        } /*endif*/ 
    49304935 
    49314936        widget = wa[k_widget_single_draw_box]; 
     
    49374942        if  (XtIsManaged(widget))  XtUnmanageChild( widget ); 
    49384943        if  (w > 0 && h > 0) XtConfigureWidget( widget, x, y, w, h, border ); 
    4939         if  (!xmv_onlymainwdw)  { 
     4944        if  (strchr(xmv_openwdw,'s') != NULL)  { 
    49404945                XtManageChild( widget ); 
    49414946                XtMoveWidget( XtParent(widget), x, y ); 
     
    49504955        if  (XtIsManaged(widget))  XtUnmanageChild( widget ); 
    49514956        if  (w > 0 && h > 0) XtConfigureWidget( widget, x, y, w, h, border ); 
    4952         if  (!xmv_onlymainwdw)  { 
     4957        if  (strchr(xmv_openwdw,'p') != NULL)  { 
    49534958                XtManageChild( widget ); 
    49544959                XtMoveWidget( XtParent(widget), x, y ); 
     
    49634968        if  (XtIsManaged(widget))  XtUnmanageChild( widget ); 
    49644969        if  (w > 0 && h > 0) XtConfigureWidget( widget, x, y, w, h, border ); 
    4965         if  (!xmv_onlymainwdw)  { 
     4970        if  (strchr(xmv_openwdw,'e') != NULL)  { 
    49664971                XtManageChild( widget ); 
    49674972                XtMoveWidget( XtParent(widget), x, y ); 
  • SH_SHM/trunk/source/seismhan.c

    r22 r30  
    33 *      ========== 
    44 * 
    5  * $Revision: 7 $, $Date: 2008-01-16 19:12:14 +0100 (Mi, 16 Jan 2008) $ 
     5 * $Revision: 15 $, $Date: 2008-01-25 11:48:08 +0100 (Fr, 25 Jan 2008) $ 
    66 * 
    77 * main module of seismhandler program, command line version 
     
    5959#endif 
    6060 
    61 /* if parameters to main program are used */ 
    62 /*#ifdef BC_MAINARGS*/ 
    63 #include "causrdef.h" 
    64 /*#endif*/ /* BC_MAINARGS */ 
    65  
    6661/* VAX specific routines (usually FORTRAN subroutines) */ 
    6762#ifdef BC_GRFVAX 
  • SH_SHM/trunk/source/shexec.c

    r16 r30  
    33 *      ======== 
    44 * 
    5  * version 27, 12-Jan-2007 
     5 * $Revision: 15 $, $Date: 2008-01-25 11:48:08 +0100 (Fr, 25 Jan 2008) $ 
    66 * 
    77 * main subroutines of SH 
     
    5959#include "ssusrdef.h" 
    6060#include "uiusrdef.h" 
    61 #include "causrdef.h" 
    6261#include "qiusrdef.h" 
    6362#include "qfusrdef.h" 
     
    108107        se_get_sh_environment(); 
    109108#       endif 
    110    /* get path names: ... or from input file */ 
    111 #  ifdef BC_MAINARGS 
    112         ca_prepare( argc, argv ); 
    113         ca_qstr( argc, argv, "PATHS=", str ); 
    114         if  (*str != '\0')  { 
    115                 se_readshpaths( str, &ok ); 
    116                 if  (!ok) 
    117                         printf( "*** error reading path names ***\n" ); 
    118         } /*endif*/ 
    119 #  endif /* BC_MAINARGS */ 
    120109 
    121110        /* get session ID string */ 
     
    176165 
    177166        /* open startup command file */ 
    178 #  ifdef BC_MAINARGS 
    179         ca_qstr( argc, argv, "STARTUP=", str ); 
    180         if  (*str == '\0') 
    181                 ca_qstr( argc, argv, "", str ); 
    182         if  (*str == '\0') 
    183                 strcpy( str, "SHSTRTUP" ); 
    184         strcat( str, "/FLAGS+=AF" ); 
    185         cp_parse( str, &cmd, status ); 
    186 #  else 
    187167        cp_parse( "SHSTRTUP/FLAGS+=AF", &cmd, status ); 
    188 #  endif /* BC_MAINARGS */ 
    189168        mn0_callproc( &cmd, status ); 
    190169        if  (Severe(status))  { 
Note: See TracChangeset for help on using the changeset viewer.