IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 23, 2007, 1:42:41 PM (19 years ago)
Author:
magnier
Message:

added formatName to pmFPAfile (needed in some cases)
dropped const from pmConfig argument to pmFPAfileBindFromArgs
changed instances of psErrorStackPrint to psError (should only be used if we abort)
changed API names for pmPSFmodel I/O functions to put pmPSFmodel at front

File:
1 edited

Legend:

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

    r14596 r14647  
    203203    }
    204204    file->format = psMemIncrRefCounter(format);
     205    file->formatName = psStringCopy(formatName);
    205206
    206207    if (fpa) {
     
    351352    psFree (format);
    352353    file->format = psMemIncrRefCounter(format);
     354    file->formatName = psStringCopy(config->formatName);
    353355
    354356    // adjust the rules to identify these files in the file->names data
     
    440442// save the pmFPAfile on config->files
    441443// return the pmFPAfile (a view to the one saved on config->files)
    442 pmFPAfile *pmFPAfileBindFromArgs (bool *success, pmFPAfile *input, const pmConfig *config, const char *filename, const char *argname)
     444pmFPAfile *pmFPAfileBindFromArgs (bool *success, pmFPAfile *input, pmConfig *config, const char *filename, const char *argname)
    443445{
    444446    PS_ASSERT_PTR_NON_NULL(input, NULL);
     
    511513
    512514        if (!format) {
    513             format = pmConfigCameraFormatFromHeader((pmConfig*)config, phu, true);
     515            format = pmConfigCameraFormatFromHeader(config, phu, true);
    514516            if (!format) {
    515517                psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", realName);
     
    562564    psFree(file->format);
    563565    file->format = format;
     566    file->formatName = psStringCopy(config->formatName);
    564567
    565568    if (success) *success = true;
     
    639642    psFree (file->format);
    640643    file->format = format;
     644    file->formatName = psStringCopy(config->formatName);
    641645
    642646    // adjust the rules to identify these files in the file->names data
     
    925929    pmFPAfile *file = pmFPAfileDefineOutput (config, fpa, filename);
    926930    if (!file) {
    927         psErrorStackPrint(stderr, "file %s not defined\n", filename);
     931        psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename);
    928932        return NULL;
    929933    }
     
    944948    pmFPAfile *file = pmFPAfileDefineOutput (config, NULL, filename);
    945949    if (!file) {
    946         psErrorStackPrint(stderr, "file %s not defined\n", filename);
     950        psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename);
    947951        return NULL;
    948952    }
    949953    if (!file->camera) {
    950         psErrorStackPrint(stderr, "file %s does not define a new camera\n", filename);
     954        psError(PS_ERR_UNEXPECTED_NULL, false, "file %s does not define a new camera\n", filename);
    951955        return NULL;
    952956    }
     
    987991    }
    988992    if (!file) {
    989         psErrorStackPrint(stderr, "file %s not defined\n", filename);
     993        psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename);
    990994        return NULL;
    991995    }
     
    10301034    }
    10311035    if (!file) {
    1032         psErrorStackPrint(stderr, "file %s not defined\n", filename);
     1036        psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename);
    10331037        return NULL;
    10341038    }
     
    10751079    }
    10761080    if (!file) {
    1077         psErrorStackPrint(stderr, "file %s not defined\n", filename);
     1081        psError(PS_ERR_UNEXPECTED_NULL, false, "file %s not defined\n", filename);
    10781082        return NULL;
    10791083    }
Note: See TracChangeset for help on using the changeset viewer.