IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 27, 2004, 3:18:28 PM (22 years ago)
Author:
desonia
Message:

format tweaks.

File:
1 edited

Legend:

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

    r1634 r1653  
    1010 *  @author Ross Harman, MHPCC
    1111 *
    12  *  @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2004-08-27 19:05:40 $
     12 *  @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2004-08-28 01:18:28 $
    1414 *
    1515 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    1717 *  That is the routine used to generate matrices.
    1818 */
    19 
    20 /******************************************************************************/
    21 
    22 /*  INCLUDE FILES                                                             */
    23 
    24 /******************************************************************************/
    2519
    2620#include <string.h>
     
    3327
    3428static void imageFree(psImage* image);
    35 
    36 /*****************************************************************************/
    37 
    38 /* FUNCTION IMPLEMENTATION - PUBLIC                                          */
    39 
    40 /*****************************************************************************/
    4129
    4230psImage* psImageAlloc(unsigned int numCols,
     
    5240    if (area < 1) {
    5341        psError(__func__,
    54                 "Invalid value for number of rows or columns " "(numRows=%d, numCols=%d).", numRows, numCols);
     42                "Invalid value for number of rows or columns "
     43                "(numRows=%d, numCols=%d).",
     44                numRows, numCols);
    5545        return NULL;
    5646    }
     
    129119                        const psElemType type)
    130120{
    131     int elementSize = PSELEMTYPE_SIZEOF(type);  // element
    132 
    133     // size in
    134     // bytes
    135     int rowSize = numCols * elementSize;        // row
    136 
    137     // size
    138 
    139     // in bytes.
     121    int elementSize = PSELEMTYPE_SIZEOF(type);  // element size in bytes
     122    int rowSize = numCols * elementSize;        // row size in bytes.
    140123
    141124    if (old == NULL) {
     
    145128
    146129    if (old->type.dimen != PS_DIMEN_IMAGE) {
    147         psError(__func__, "Can not realloc image because input is not an image.");
     130        psError(__func__,
     131                "Can not realloc image because input is not an image.");
    148132        return NULL;
    149133    }
     
    166150
    167151    /* image already the right size/type? */
    168     if (numCols == old->numCols && numRows == old->numRows && type == old->type.type) {
     152    if (numCols == old->numCols && numRows == old->numRows &&
     153            type == old->type.type) {
    169154        return old;
    170155    }
    171156    // Resize the image buffer
    172     old->rawDataBuffer = psRealloc(old->data.V[0], numCols * numRows * elementSize);
     157    old->rawDataBuffer = psRealloc(old->data.V[0],
     158                                   numCols * numRows * elementSize);
    173159    old->data.V = (void **)psRealloc(old->data.V, numRows * sizeof(void *));
    174160
Note: See TracChangeset for help on using the changeset viewer.