IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9904


Ignore:
Timestamp:
Nov 7, 2006, 4:10:07 PM (20 years ago)
Author:
Paul Price
Message:

Adding workdir to the configuration.

Location:
trunk/psModules/src/config
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/config/pmConfig.c

    r9894 r9904  
    44 *  @author EAM (IfA)
    55 *
    6  *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
    7  *  @date $Date: 2006-11-07 22:30:33 $
     6 *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
     7 *  @date $Date: 2006-11-08 02:10:07 $
    88 *
    99 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    4141    psFree(config->arguments);
    4242    psFree(config->database);
     43    psFree(config->workdir);
    4344}
    4445
     
    5960    config->argc = argc;
    6061    config->argv = argv;
     62    config->workdir = NULL;
    6163
    6264    // the file structure is used to carry pmFPAfiles
     
    381383    }
    382384
     385    // Get the working directory
     386    config->workdir = psMemIncrRefCounter(psMetadataLookupStr(NULL, config->site, "WORKDIR"));
     387    if (!config->workdir) {
     388        psWarning("WORKDIR is not set in the site configuration\n");
     389    } else {
     390        config->workdir = resolveEnvVar(config->workdir);
     391    }
     392
    383393    // define the config-file search path (configPath).  Ensure that
    384394    // it contains the directory where we found the config file in
  • trunk/psModules/src/config/pmConfig.h

    r9679 r9904  
    99/// @author Eugene Magnier, IfA
    1010///
    11 /// @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
    12 /// @date $Date: 2006-10-20 23:03:35 $
     11/// @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
     12/// @date $Date: 2006-11-08 02:10:07 $
    1313///
    1414/// Copyright 2005-2006 Institute for Astronomy, University of Hawaii
     
    4848    psMetadata *arguments;              ///< Processed command-line arguments
    4949    psMetadata *files;                  ///< pmFPAfiles used for analysis
     50    psString workdir;                   ///< Working directory
    5051    psDB *database;                     ///< Database handle
    5152    int *argc;                          ///< Number of command-line arguments
Note: See TracChangeset for help on using the changeset viewer.