IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2006, 2:55:23 PM (20 years ago)
Author:
Paul Price
Message:

Addition of a vast quantity of assertions in public functions. Adopted a policy of using assert() within file-static functions (since they are only called internally, any errors there are problems with the program) and using the PS_ASSERT_WHATEVER() macros within public functions. Cleaned a few things up in the process.

File:
1 edited

Legend:

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

    r7017 r7278  
    55 *  @author EAM, IfA
    66 *
    7  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2006-05-01 01:55:43 $
     7 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2006-06-02 00:55:22 $
    99 *
    1010 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    2828
    2929
    30 bool pmFPAviewWriteJPEG (const pmFPAview *view, pmFPAfile *file)
     30bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file)
    3131{
     32    PS_ASSERT_PTR_NON_NULL(view, false);
     33    PS_ASSERT_PTR_NON_NULL(file, false);
    3234
    3335    pmFPA *fpa = file->fpa;
     
    7072bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
    7173{
     74    PS_ASSERT_PTR_NON_NULL(fpa, false);
     75    PS_ASSERT_PTR_NON_NULL(view, false);
     76    PS_ASSERT_PTR_NON_NULL(file, false);
    7277
    7378    for (int i = 0; i < fpa->chips->n; i++) {
     
    8287bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
    8388{
     89    PS_ASSERT_PTR_NON_NULL(chip, false);
     90    PS_ASSERT_PTR_NON_NULL(view, false);
     91    PS_ASSERT_PTR_NON_NULL(file, false);
    8492
    8593    for (int i = 0; i < chip->cells->n; i++) {
     
    94102bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
    95103{
     104    PS_ASSERT_PTR_NON_NULL(cell, false);
     105    PS_ASSERT_PTR_NON_NULL(view, false);
     106    PS_ASSERT_PTR_NON_NULL(file, false);
    96107
    97108    for (int i = 0; i < cell->readouts->n; i++) {
     
    106117bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
    107118{
     119    PS_ASSERT_PTR_NON_NULL(readout, false);
     120    PS_ASSERT_PTR_NON_NULL(view, false);
     121    PS_ASSERT_PTR_NON_NULL(file, false);
     122
    108123    char *name, *mode, *word, *mapname;
    109124    psArray *range;
Note: See TracChangeset for help on using the changeset viewer.