IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 19, 2004, 12:01:19 PM (22 years ago)
Author:
desonia
Message:

changed the return value of psImageWriteSection, as according to bugzilla
bug #106.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/image/psImageIO.c

    r1073 r1241  
    77 *  @author Robert DeSonia, MHPCC
    88 *
    9  *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
    10  *  @date $Date: 2004-06-23 23:00:15 $
     9 *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
     10 *  @date $Date: 2004-07-19 22:01:19 $
    1111 *
    1212 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    203203
    204204
    205 int psImageWriteSection(psImage* input, int col0,int row0,int z,
    206                         char* extname, int extnum, char* filename)
     205bool psImageWriteSection(psImage* input, int col0,int row0,int z,
     206                         char* extname, int extnum, char* filename)
    207207{
    208208    int         numCols = 0;
     
    226226        psError(__func__, "Can not write %s.  Input psImage is NULL.",
    227227                filename);
    228         return 1;
     228        return false;
    229229    }
    230230
     
    271271        psError(__func__, "psImage datatype (%d) not supported.  File %s not written.",
    272272                input->type.type,filename);
    273         return 1;
     273        return false;
    274274    }
    275275
     
    281281            psError(__func__,"Could not open file '%s'. FITS error:%s",
    282282                    filename, fitsErr);
    283             return 2;
     283            return false;
    284284        }
    285285
     
    292292                psError(__func__,"Could not index to '%s' HDU for file %s. (%s)",
    293293                        extname, filename, fitsErr);
    294                 return 3;
     294                return false;
    295295            }
    296296        } else {
     
    302302                psError(__func__,"extnum (%d) must not exceed number of HDUs (%d) by more than one.",
    303303                        extnum, numHDUs);
    304                 return 3;
     304                return false;
    305305            } else if (numHDUs == extnum) {
    306306                createNewHDU = true;
     
    311311                psError(__func__,"Could not index to HDU #%d for file %s. (%s)",
    312312                        extnum, filename, fitsErr);
    313                 return 3;
     313                return false;
    314314            }
    315315        }
     
    322322            psError(__func__,"Could not create file '%s'. (%s)",
    323323                    filename, fitsErr);
    324             return 5;
     324            return false;
    325325        }
    326326        createNewHDU = true;
     
    338338            psError(__func__,"Could not create image HDU in FITS file '%s'. %s",
    339339                    filename, fitsErr);
    340             return 5;
     340            return false;
    341341        }
    342342
     
    354354                psError(__func__,"Could not create EXTNAME keyword in FITS file '%s'. (%s)",
    355355                        filename, fitsErr);
    356                 return 5;
     356                return false;
    357357            }
    358358        }
     
    373373        psError(__func__, "Could not write image data to '%s'. (%s)",
    374374                filename, fitsErr);
    375         return 6;
     375        return false;
    376376    }
    377377
     
    379379    (void)fits_close_file(fptr, &status);
    380380
    381     return 0;
     381    return true;
    382382}
Note: See TracChangeset for help on using the changeset viewer.