IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18061 for trunk/psModules


Ignore:
Timestamp:
Jun 10, 2008, 10:28:59 AM (18 years ago)
Author:
jhoblitt
Message:

add truncate parameter to pmConfigConvertFilename()

Location:
trunk/psModules/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfileDefine.c

    r18035 r18061  
    457457
    458458    // this function is implicitly an INPUT operation: do not create the file
    459     psString realName = pmConfigConvertFilename (infiles->data[0], config, false);
     459    psString realName = pmConfigConvertFilename (infiles->data[0], config, false, false);
    460460    if (!realName) {
    461461        psError(PS_ERR_IO, false, "Failed to convert file name %s\n", (char *) infiles->data[0]);
     
    538538        if (i > 0) {
    539539            // this function is implicitly an INPUT operation: do not create the file
    540             psString realName = pmConfigConvertFilename (infiles->data[i], config, false);
     540            psString realName = pmConfigConvertFilename (infiles->data[i], config, false, false);
    541541            if (!realName) {
    542542                psError(PS_ERR_IO, false, "Failed to convert file name %s", (char *) infiles->data[i]);
     
    672672    for (int i = 0; i < infiles->n; i++) {
    673673        // this function is implicitly an INPUT operation: do not create the file
    674         psString realName = pmConfigConvertFilename (infiles->data[i], config, false);
     674        psString realName = pmConfigConvertFilename (infiles->data[i], config, false, false);
    675675        if (!realName) {
    676676            psError(PS_ERR_IO, false, "Failed to convert file name %s", (char *) infiles->data[i]);
     
    925925    // Prepend the global path to the file rule
    926926    // this function is implicitly an INPUT operation: do not create the file
    927     psString tmpName = pmConfigConvertFilename(file->filerule, config, false);
     927    psString tmpName = pmConfigConvertFilename(file->filerule, config, false, false);
    928928    psFree (file->filerule);
    929929    file->filerule = tmpName;
  • trunk/psModules/src/camera/pmFPAfileIO.c

    r18028 r18061  
    752752    // apply filename mangling rules (file://, path://, neb://)
    753753    bool create = file->mode == PM_FPA_MODE_WRITE ? true : false;
    754     psString tmpName = pmConfigConvertFilename (file->filename, config, create);
     754    psString tmpName = pmConfigConvertFilename (file->filename, config, create, false);
    755755    psFree (file->filename);
    756756    file->filename = tmpName;
  • trunk/psModules/src/config/pmConfig.c

    r18036 r18061  
    556556        }
    557557        if (logDest) {
    558             psString resolved = pmConfigConvertFilename(logDest, config, true); // Resolved filename
     558            psString resolved = pmConfigConvertFilename(logDest, config, true, false); // Resolved filename
    559559            if (!resolved || strlen(resolved) == 0) {
    560560                psWarning("Unable to resolve log destination: %s --- ignored", logDest);
     
    614614        }
    615615        if (traceDest) {
    616             psString resolved = pmConfigConvertFilename(traceDest, config, true); // Resolved filename
     616            psString resolved = pmConfigConvertFilename(traceDest, config, true, false); // Resolved filename
    617617            if (!resolved || strlen(resolved) == 0) {
    618618                psWarning("Unable to resolve trace destination: %s --- ignored", traceDest);
     
    14901490
    14911491// convert the supplied name, create a new output psString
    1492 psString pmConfigConvertFilename(const char *filename, const pmConfig *config, bool create)
     1492psString pmConfigConvertFilename(const char *filename, const pmConfig *config, bool create, bool truncate)
    14931493{
    14941494    PS_ASSERT_STRING_NON_EMPTY(filename, NULL);
  • trunk/psModules/src/config/pmConfig.h

    r17992 r18061  
    55 *  @author Eugene Magnier, IfA
    66 *
    7  *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2008-06-09 00:38:42 $
     7 *  @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2008-06-10 20:28:25 $
    99 *  Copyright 2005-2006 Institute for Astronomy, University of Hawaii
    1010 */
     
    163163    const char *filename,               ///< file path/URI
    164164    const pmConfig *config,             ///< configuration
    165     bool create                         ///< create the file if it doesn't exist
     165    bool create,                        ///< create the file if it doesn't exist
     166    bool truncate                       ///< truncate the file (if it exists)
    166167);
    167168
Note: See TracChangeset for help on using the changeset viewer.