IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 17, 2009, 2:26:38 PM (17 years ago)
Author:
Paul Price
Message:

Adding new substitution for file rules: {FILE.INDEX}. Added a counter to pmFPAfile to provide this value. This is intended for ppStack convolution files, which are multiple (unknown number) output files which would all have the same name but for this new substitution rule.

File:
1 edited

Legend:

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

    r23272 r23358  
    2020#include "pmConceptsCopy.h"
    2121
     22static int fileNum = 0;                 // Number of file
     23
    2224static void pmFPAfileFree(pmFPAfile *file)
    2325{
     
    100102
    101103    file->save = false;
     104
     105    file->index = fileNum++;
    102106
    103107    file->imageId = 0;
     
    350354            psStringSubstitute(&newRule, name, "{OUTPUT}");
    351355        }
     356    }
     357
     358    if (strstr(newRule, "{FILE.INDEX}")) {
     359        // Number of the file in list
     360        psString num = NULL;            // Number to use
     361        psStringAppend(&num, "%d", file->index);
     362        psStringSubstitute(&newRule, num, "{FILE.INDEX}");
     363        psFree(num);
    352364    }
    353365
Note: See TracChangeset for help on using the changeset viewer.