IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 29, 2006, 11:39:44 AM (20 years ago)
Author:
jhoblitt
Message:

fix a wide range of format string errors

Location:
trunk/psModules/src/camera
Files:
8 edited

Legend:

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

    r8246 r8669  
    1212* XXX: Should we implement non-linear cell->chip transforms?
    1313*
    14 *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
    15 *  @date $Date: 2006-08-09 02:37:07 $
     14*  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
     15*  @date $Date: 2006-08-29 21:39:44 $
    1616*
    1717*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3838    // if this readout has a parent, drop that instance
    3939    if (readout->parent) {
    40         psTrace("psModules.camera", 9, "Removing readout %lx from cell %lx...\n", (size_t)readout, (size_t)readout->parent);
     40        psTrace("psModules.camera", 9, "Removing readout %zd from cell %zd...\n", (size_t)readout, (size_t)readout->parent);
    4141        psArray *readouts = readout->parent->readouts;
    4242        for (int i = 0; i < readouts->n; i++) {
     
    4646        }
    4747    }
    48     psTrace("psModules.camera", 9, "Freeing readout %lx\n", (size_t) readout);
     48    psTrace("psModules.camera", 9, "Freeing readout %zd\n", (size_t) readout);
    4949    psFree(readout->image);
    5050    psFree(readout->mask);
     
    5959    // if this cell has a parent, drop that instance
    6060    if (cell->parent) {
    61         psTrace("psModules.camera", 9, "Removing cell %lx from chip %lx...\n", (size_t)cell, (size_t)cell->parent);
     61        psTrace("psModules.camera", 9, "Removing cell %zd from chip %zd...\n", (size_t)cell, (size_t)cell->parent);
    6262        psArray *cells = cell->parent->cells;
    6363        for (int i = 0; i < cells->n; i++) {
     
    6767        }
    6868    }
    69     psTrace("psModules.camera", 9, "Freeing cell %lx\n", (size_t)cell);
     69    psTrace("psModules.camera", 9, "Freeing cell %zd\n", (size_t)cell);
    7070    pmCellFreeReadouts(cell);
    7171    psFree(cell->readouts);
     
    8181    // if this chip has a parent, drop that instance
    8282    if (chip->parent) {
    83         psTrace("psModules.camera", 9, "Removing chip %lx from fpa %lx...\n", (size_t)chip, (size_t)chip->parent);
     83        psTrace("psModules.camera", 9, "Removing chip %zd from fpa %zd...\n", (size_t)chip, (size_t)chip->parent);
    8484        psArray *chips = chip->parent->chips;
    8585        for (int i = 0; i < chips->n; i++) {
     
    9090    }
    9191
    92     psTrace("psModules.camera", 9, "Freeing chip %lx\n", (size_t)chip);
     92    psTrace("psModules.camera", 9, "Freeing chip %zd\n", (size_t)chip);
    9393    pmChipFreeCells(chip);
    9494    psFree(chip->cells);
     
    109109static void FPAFree(pmFPA *fpa)
    110110{
    111     psTrace("psModules.camera", 9, "Freeing fpa %lx\n", (size_t)fpa);
     111    psTrace("psModules.camera", 9, "Freeing fpa %zd\n", (size_t)fpa);
    112112
    113113    // NULL the parent pointers
     
    149149        }
    150150        tmpReadout->parent = NULL;
    151         psTrace("psModules.camera", 9, "Will now free readout %lx...\n", (size_t)tmpReadout);
     151        psTrace("psModules.camera", 9, "Will now free readout %zd...\n", (size_t)tmpReadout);
    152152    }
    153153    cell->readouts = psArrayRealloc(cell->readouts, 0);
  • trunk/psModules/src/camera/pmFPACopy.c

    r8246 r8669  
    289289    psArray *sourceCells = source->cells; // The source cells
    290290    if (targetCells->n != sourceCells->n) {
    291         psError(PS_ERR_IO, true, "Number of source cells (%d) differs from the number of target cells (%d)\n",
     291        psError(PS_ERR_IO, true, "Number of source cells (%ld) differs from the number of target cells (%ld)\n",
    292292                sourceCells->n, targetCells->n);
    293293        return false;
     
    326326    psArray *sourceChips = source->chips; // The source chips
    327327    if (targetChips->n != sourceChips->n) {
    328         psError(PS_ERR_IO, true, "Number of source chips (%d) differs from the number of target chips (%d)\n",
     328        psError(PS_ERR_IO, true, "Number of source chips (%ld) differs from the number of target chips (%ld)\n",
    329329                sourceChips->n, targetChips->n);
    330330        return false;
  • trunk/psModules/src/camera/pmFPAMosaic.c

    r8246 r8669  
    586586        good = false;
    587587    }
    588     psTrace("psModules.camera", 5, "Cell %d: x0=%d y0=%d\n", index, x0Cell, y0Cell);
     588    psTrace("psModules.camera", 5, "Cell %ld: x0=%d y0=%d\n", index, x0Cell, y0Cell);
    589589
    590590    // Offset of the chip on the FPA
     
    682682    masks->data[index]   = psMemIncrRefCounter(readout->mask);
    683683
    684     psTrace("psModules.camera", 9, "Added cell (%x) %ld: %d,%d; %d,%d, %d,%d.\n", cell, index,
     684    psTrace("psModules.camera", 9, "Added cell (%p) %ld: %d,%d; %d,%d, %d,%d.\n", cell, index,
    685685            x0->data.S32[index], y0->data.S32[index], xBin->data.S32[index], yBin->data.S32[index],
    686686            xFlip->data.U8[index], yFlip->data.U8[index]);
  • trunk/psModules/src/camera/pmFPAfile.c

    r7727 r8669  
    218218    }
    219219    if (view->chip >= in->chips->n) {
    220         psError(PS_ERR_IO, true, "Requested chip == %d >= in->chips->n == %d", view->chip, in->chips->n);
     220        psError(PS_ERR_IO, true, "Requested chip == %d >= in->chips->n == %ld", view->chip, in->chips->n);
    221221        return false;
    222222    }
     
    229229    }
    230230    if (view->cell >= inChip->cells->n) {
    231         psError(PS_ERR_IO, true, "Requested cell == %d>= inChip->cells->n == %d",
     231        psError(PS_ERR_IO, true, "Requested cell == %d>= inChip->cells->n == %ld",
    232232                view->cell, inChip->cells->n);
    233233        return false;
     
    261261    }
    262262    if (view->chip >= in->chips->n) {
    263         psError(PS_ERR_IO, true, "Requested chip == %d >= in->chips->n == %d", view->chip, in->chips->n);
     263        psError(PS_ERR_IO, true, "Requested chip == %d >= in->chips->n == %ld", view->chip, in->chips->n);
    264264        return false;
    265265    }
     
    272272    }
    273273    if (view->cell >= inChip->cells->n) {
    274         psError(PS_ERR_IO, true, "Requested cell == %d>= inChip->cells->n == %d",
     274        psError(PS_ERR_IO, true, "Requested cell == %d>= inChip->cells->n == %ld",
    275275                view->cell, inChip->cells->n);
    276276        return false;
  • trunk/psModules/src/camera/pmFPAfileDefine.c

    r8246 r8669  
    243243            file->camera = pmConfigCameraByName(config, words->data[0]);
    244244            if (!file->camera) {
    245                 psError(PS_ERR_IO, false, "camera %s not found\n", words->data[0]);
     245                psError(PS_ERR_IO, false, "camera %s not found\n", (char *)words->data[0]);
    246246                psFree(words);
    247247                return NULL;
     
    305305    }
    306306    if (infiles->n < 1) {
    307         psError(PS_ERR_IO, false, "Found n == %d files in %s in arguments\n", infiles->n, argname);
     307        psError(PS_ERR_IO, false, "Found n == %ld files in %s in arguments\n", infiles->n, argname);
    308308        return NULL;
    309309    }
     
    318318    format = pmConfigCameraFormatFromHeader (config, phu);
    319319    if (!format) {
    320         psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", infiles->data[0]);
     320        psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", (char *)infiles->data[0]);
    321321        psFree(phu);
    322322        return NULL;
     
    326326    fpa = pmFPAConstruct (config->camera);
    327327    if (!fpa) {
    328         psError(PS_ERR_IO, false, "Failed to construct FPA from %s", infiles->data[0]);
     328        psError(PS_ERR_IO, false, "Failed to construct FPA from %s", (char *)infiles->data[0]);
    329329        return NULL;
    330330    }
     
    433433    }
    434434    if (infiles->n <= entry) {
    435         psError(PS_ERR_IO, false, "only %d files in %s in argument, entry %d requested\n", infiles->n, argname, entry);
     435        psError(PS_ERR_IO, false, "only %ld files in %s in argument, entry %d requested\n", infiles->n, argname, entry);
    436436        return NULL;
    437437    }
     
    448448    format = pmConfigCameraFormatFromHeader (config, phu);
    449449    if (!format) {
    450         psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", infiles->data[0]);
     450        psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", (char *)infiles->data[0]);
    451451        psFree(phu);
    452452        return NULL;
     
    456456    fpa = pmFPAConstruct (config->camera);
    457457    if (!fpa) {
    458         psError(PS_ERR_IO, false, "Failed to construct FPA from %s", infiles->data[0]);
     458        psError(PS_ERR_IO, false, "Failed to construct FPA from %s", (char *)infiles->data[0]);
    459459        return NULL;
    460460    }
  • trunk/psModules/src/camera/pmFPAfileFitsIO.c

    r7726 r8669  
    3030
    3131    if (view->chip >= fpa->chips->n) {
    32         psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %d", view->chip, fpa->chips->n);
     32        psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n);
    3333        return false;
    3434    }
     
    4141
    4242    if (view->cell >= chip->cells->n) {
    43         psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %d", view->cell, chip->cells->n);
     43        psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n);
    4444        return false;
    4545    }
     
    9393
    9494    if (view->chip >= fpa->chips->n) {
    95         psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %d", view->chip, fpa->chips->n);
     95        psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n);
    9696        return false;
    9797    }
     
    104104
    105105    if (view->cell >= chip->cells->n) {
    106         psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %d", view->cell, chip->cells->n);
     106        psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n);
    107107        return false;
    108108    }
     
    178178
    179179    if (view->chip >= fpa->chips->n) {
    180         psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %d", view->chip, fpa->chips->n);
     180        psError(PS_ERR_IO, true, "Requested chip == %d >= fpa->chips->n == %ld", view->chip, fpa->chips->n);
    181181        return false;
    182182    }
     
    190190
    191191    if (view->cell >= chip->cells->n) {
    192         psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %d", view->cell, chip->cells->n);
     192        psError(PS_ERR_IO, true, "Requested cell == %d >= chip->cells->n == %ld", view->cell, chip->cells->n);
    193193        return false;
    194194    }
  • trunk/psModules/src/camera/pmHDUGenerate.c

    r8582 r8669  
    252252                numReadouts = readouts->n;
    253253            } else if (readouts->n != numReadouts) {
    254                 psError(PS_ERR_IO, true, "Number of readouts doesn't match: %d vs %d\n", readouts->n,
     254                psError(PS_ERR_IO, true, "Number of readouts doesn't match: %ld vs %d\n", readouts->n,
    255255                        numReadouts);
    256256                return false;
     
    336336
    337337                if (biassecs->n != readout->bias->n) {
    338                     psLogMsg(__func__, PS_LOG_WARN, "Number of bias sections (%d) and number of biases (%d)"
     338                    psLogMsg(__func__, PS_LOG_WARN, "Number of bias sections (%ld) and number of biases (%ld)"
    339339                             " do not match.\n", biassecs->n, readout->bias->n);
    340340                }
  • trunk/psModules/src/camera/pmHDUUtils.c

    r8246 r8669  
    102102    }
    103103
    104     psTrace("psModules.camera", level + 1, "Format: %x\n", hdu->format);
     104    psTrace("psModules.camera", level + 1, "Format: %p\n", hdu->format);
    105105    if (header) {
    106106        if (hdu->header) {
Note: See TracChangeset for help on using the changeset viewer.