Changeset 18061
- Timestamp:
- Jun 10, 2008, 10:28:59 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
-
ppImage/src/ppImageStatsOutput.c (modified) (1 diff)
-
ppMerge/src/ppMerge.c (modified) (1 diff)
-
ppNorm/src/ppNormCalc.c (modified) (2 diffs)
-
ppStack/src/ppStackLoop.c (modified) (4 diffs)
-
ppStats/src/ppStats.c (modified) (1 diff)
-
ppStats/src/ppStatsSetupFromArgs.c (modified) (1 diff)
-
psModules/src/camera/pmFPAfileDefine.c (modified) (4 diffs)
-
psModules/src/camera/pmFPAfileIO.c (modified) (1 diff)
-
psModules/src/config/pmConfig.c (modified) (3 diffs)
-
psModules/src/config/pmConfig.h (modified) (2 diffs)
-
psastro/src/psastroLoadRefstars.c (modified) (1 diff)
-
psastro/src/psastroMetadataStats.c (modified) (1 diff)
-
pswarp/src/pswarpDefineSkycell.c (modified) (1 diff)
-
pswarp/src/pswarpLoop.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImageStatsOutput.c
r14000 r18061 43 43 44 44 // convert to a real UNIX filename 45 psString resolved = pmConfigConvertFilename(statsName, config, true ); // Resolved filename45 psString resolved = pmConfigConvertFilename(statsName, config, true, false); // Resolved filename 46 46 FILE *statsFile = fopen (resolved, "w"); 47 47 if (!statsFile) { -
trunk/ppMerge/src/ppMerge.c
r17227 r18061 73 73 psString statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS.NAME"); // Statistics file name 74 74 if (mdok && statsName && strlen(statsName) > 0) { 75 psString resolved = pmConfigConvertFilename(statsName, config, true ); // Resolved filename75 psString resolved = pmConfigConvertFilename(statsName, config, true, false); // Resolved filename 76 76 FILE *statsFile = fopen(resolved, "w"); // Output statistics file 77 77 if (!statsFile) { -
trunk/ppNorm/src/ppNormCalc.c
r13231 r18061 38 38 39 39 if (argc >= 2) { 40 psString resolved = pmConfigConvertFilename(argv[1], config, false ); // Resolved filename40 psString resolved = pmConfigConvertFilename(argv[1], config, false, false); // Resolved filename 41 41 inFile = fopen(resolved, "r"); 42 42 if (!inFile) { … … 48 48 } 49 49 if (argc == 3) { 50 psString resolved = pmConfigConvertFilename(argv[2], config, true ); // Resolved filename50 psString resolved = pmConfigConvertFilename(argv[2], config, true, false); // Resolved filename 51 51 outFile = fopen(resolved, "w"); 52 52 if (!outFile) { -
trunk/ppStack/src/ppStackLoop.c
r18030 r18061 148 148 assert(image); 149 149 150 psString resolved = pmConfigConvertFilename(name, config, true ); // Resolved file name150 psString resolved = pmConfigConvertFilename(name, config, true, true); // Resolved file name 151 151 psFits *fits = psFitsOpen(resolved, "w"); 152 152 if (!fits) { … … 189 189 FILE *statsFile = NULL; // File stream for statistics 190 190 if (statsName && strlen(statsName) > 0) { 191 psString resolved = pmConfigConvertFilename(statsName, config, true ); // Resolved filename191 psString resolved = pmConfigConvertFilename(statsName, config, true, true); // Resolved filename 192 192 statsFile = fopen(resolved, "w"); 193 193 if (!statsFile) { … … 401 401 } 402 402 // Resolved names 403 psString imageResolved = pmConfigConvertFilename(imageNames->data[i], config, false );404 psString maskResolved = pmConfigConvertFilename(maskNames->data[i], config, false );405 psString weightResolved = pmConfigConvertFilename(weightNames->data[i], config, false );403 psString imageResolved = pmConfigConvertFilename(imageNames->data[i], config, false, false); 404 psString maskResolved = pmConfigConvertFilename(maskNames->data[i], config, false, false); 405 psString weightResolved = pmConfigConvertFilename(weightNames->data[i], config, false, false); 406 406 imageFits->data[i] = psFitsOpen(imageResolved, "r"); 407 407 maskFits->data[i] = psFitsOpen(maskResolved, "r"); … … 625 625 weightFits->data[i] = NULL; 626 626 if (tempDelete) { 627 psString imageResolved = pmConfigConvertFilename(imageNames->data[i], config, false );628 psString maskResolved = pmConfigConvertFilename(maskNames->data[i], config, false );629 psString weightResolved = pmConfigConvertFilename(weightNames->data[i], config, false );627 psString imageResolved = pmConfigConvertFilename(imageNames->data[i], config, false, false); 628 psString maskResolved = pmConfigConvertFilename(maskNames->data[i], config, false, false); 629 psString weightResolved = pmConfigConvertFilename(weightNames->data[i], config, false, false); 630 630 if (unlink(imageResolved) == -1 || unlink(maskResolved) == -1 || 631 631 unlink(weightResolved) == -1) { -
trunk/ppStats/src/ppStats.c
r14020 r18061 27 27 if (argc == 2) { 28 28 outName = argv[1]; 29 psString resolved = pmConfigConvertFilename(outName, config, true ); // Resolved filename29 psString resolved = pmConfigConvertFilename(outName, config, true, false); // Resolved filename 30 30 31 31 if (resolved && strlen(resolved) > 0) { -
trunk/ppStats/src/ppStatsSetupFromArgs.c
r17985 r18061 147 147 int result = PS_EXIT_UNKNOWN_ERROR; 148 148 { 149 psString resolved = pmConfigConvertFilename(inName, config, false ); // Resolved filename149 psString resolved = pmConfigConvertFilename(inName, config, false, false); // Resolved filename 150 150 data->fits = psFitsOpen(resolved, "r"); 151 151 if (!data->fits) { -
trunk/psModules/src/camera/pmFPAfileDefine.c
r18035 r18061 457 457 458 458 // 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); 460 460 if (!realName) { 461 461 psError(PS_ERR_IO, false, "Failed to convert file name %s\n", (char *) infiles->data[0]); … … 538 538 if (i > 0) { 539 539 // 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); 541 541 if (!realName) { 542 542 psError(PS_ERR_IO, false, "Failed to convert file name %s", (char *) infiles->data[i]); … … 672 672 for (int i = 0; i < infiles->n; i++) { 673 673 // 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); 675 675 if (!realName) { 676 676 psError(PS_ERR_IO, false, "Failed to convert file name %s", (char *) infiles->data[i]); … … 925 925 // Prepend the global path to the file rule 926 926 // 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); 928 928 psFree (file->filerule); 929 929 file->filerule = tmpName; -
trunk/psModules/src/camera/pmFPAfileIO.c
r18028 r18061 752 752 // apply filename mangling rules (file://, path://, neb://) 753 753 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); 755 755 psFree (file->filename); 756 756 file->filename = tmpName; -
trunk/psModules/src/config/pmConfig.c
r18036 r18061 556 556 } 557 557 if (logDest) { 558 psString resolved = pmConfigConvertFilename(logDest, config, true ); // Resolved filename558 psString resolved = pmConfigConvertFilename(logDest, config, true, false); // Resolved filename 559 559 if (!resolved || strlen(resolved) == 0) { 560 560 psWarning("Unable to resolve log destination: %s --- ignored", logDest); … … 614 614 } 615 615 if (traceDest) { 616 psString resolved = pmConfigConvertFilename(traceDest, config, true ); // Resolved filename616 psString resolved = pmConfigConvertFilename(traceDest, config, true, false); // Resolved filename 617 617 if (!resolved || strlen(resolved) == 0) { 618 618 psWarning("Unable to resolve trace destination: %s --- ignored", traceDest); … … 1490 1490 1491 1491 // convert the supplied name, create a new output psString 1492 psString pmConfigConvertFilename(const char *filename, const pmConfig *config, bool create )1492 psString pmConfigConvertFilename(const char *filename, const pmConfig *config, bool create, bool truncate) 1493 1493 { 1494 1494 PS_ASSERT_STRING_NON_EMPTY(filename, NULL); -
trunk/psModules/src/config/pmConfig.h
r17992 r18061 5 5 * @author Eugene Magnier, IfA 6 6 * 7 * @version $Revision: 1.3 6$ $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 $ 9 9 * Copyright 2005-2006 Institute for Astronomy, University of Hawaii 10 10 */ … … 163 163 const char *filename, ///< file path/URI 164 164 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) 166 167 ); 167 168 -
trunk/psastro/src/psastroLoadRefstars.c
r18045 r18061 42 42 43 43 // convert the uri to a real filename (ie, path://foobar) 44 psString CATDIR = pmConfigConvertFilename(catdir, config, false ); // Resolved filename44 psString CATDIR = pmConfigConvertFilename(catdir, config, false, false); // Resolved filename 45 45 PS_ASSERT (CATDIR, NULL); 46 46 -
trunk/psastro/src/psastroMetadataStats.c
r18007 r18061 45 45 46 46 // convert to a real UNIX filename 47 psString resolved = pmConfigConvertFilename(filename, config, true ); // Resolved filename47 psString resolved = pmConfigConvertFilename(filename, config, true, false); // Resolved filename 48 48 FILE *statsFile = fopen (resolved, "w"); 49 49 if (!statsFile) { -
trunk/pswarp/src/pswarpDefineSkycell.c
r18006 r18061 38 38 39 39 // this function is implicitly an INPUT operation: do not create the file 40 psString realName = pmConfigConvertFilename (infiles->data[0], config, false );40 psString realName = pmConfigConvertFilename (infiles->data[0], config, false, false); 41 41 if (!realName) { 42 42 psError(PS_ERR_IO, false, "Failed to convert file name %s\n", (char *) infiles->data[0]); -
trunk/pswarp/src/pswarpLoop.c
r17955 r18061 103 103 FILE *statsFile = NULL; // File stream for statistics 104 104 if (mdok && statsName && strlen(statsName) > 0) { 105 psString resolved = pmConfigConvertFilename(statsName, config, true );105 psString resolved = pmConfigConvertFilename(statsName, config, true, false); 106 106 statsFile = fopen(resolved, "w"); 107 107 if (!statsFile) {
Note:
See TracChangeset
for help on using the changeset viewer.
