IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14452


Ignore:
Timestamp:
Aug 8, 2007, 3:40:08 PM (19 years ago)
Author:
jhoblitt
Message:

gcc attribute cleanup

Location:
trunk/psLib/src
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/astro/psCoord.h

    r13839 r14452  
    88 *  @author GLG, MHPCC
    99 *
    10  *  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2007-06-15 01:03:22 $
     10 *  @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2007-08-09 01:40:07 $
    1212 *
    1313 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    157157 *  @return psPlane*     resulting plane structure.
    158158 */
    159 psPlane* psPlaneAlloc(void);
     159psPlane* psPlaneAlloc(void) PS_ATTR_MALLOC;
    160160
    161161/** Allocates a psSphere
     
    163163 *  @return psSphere*     resulting sphere structure.
    164164 */
    165 psSphere* psSphereAlloc(void);
     165psSphere* psSphereAlloc(void) PS_ATTR_MALLOC;
    166166
    167167/** Allocates a psCube
     
    169169 *  @return psCube*     resulting cubic structure.
    170170 */
    171 psCube* psCubeAlloc(void);
     171psCube* psCubeAlloc(void) PS_ATTR_MALLOC;
    172172
    173173/** Allocates a psPlaneTransform transform.
     
    179179    int order1,                        ///< The order of the x term in the transform.
    180180    int order2                         ///< The order of the y term in the transform.
    181 );
     181) PS_ATTR_MALLOC;
    182182
    183183/** Applies the psPlaneTransform transform to a specified coordinate
     
    201201    int order3,                        ///< The order of the y term in the transform.
    202202    int order4                         ///< The order of the z term in the transform.
    203 );
     203) PS_ATTR_MALLOC;
    204204
    205205
     
    226226    double Ys,                         ///< Scale in y-dimension
    227227    psProjectionType type
    228 );
     228) PS_ATTR_MALLOC;
    229229
    230230/** Checks the type of a particular pointer.
  • trunk/psLib/src/astro/psEarthOrientation.h

    r12432 r14452  
    88*  @author Robert Daniel DeSonia, MHPCC
    99*
    10 *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    11 *  @date $Date: 2007-03-14 02:31:41 $
     10*  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     11*  @date $Date: 2007-08-09 01:40:07 $
    1212*
    1313*  Copyright 2005 Maui High Performance Computing Center, University of Hawaii
     
    6363
    6464/** Allocates a new psEarthPole structure.  */
    65 psEarthPole *psEarthPoleAlloc(void);
     65psEarthPole *psEarthPoleAlloc(void) PS_ATTR_MALLOC;
    6666
    6767/** Calculates the apparent position of a star, given its actual position and the
  • trunk/psLib/src/astro/psSphereOps.h

    r11248 r14452  
    66 *  @author David Robbins, MHPCC
    77 *
    8  *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-01-23 22:47:22 $
     8 *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-08-09 01:40:07 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6969    double deltaP,                     ///< north pole longitude
    7070    double phiP                        ///< defines the longitude in the input system of the equatorial intersection between the two systems (e.g, the first point of Ares).
    71 );
     71) PS_ATTR_MALLOC;
    7272
    7373/** Checks the type of a particular pointer.
  • trunk/psLib/src/astro/psTime.h

    r13950 r14452  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.56 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-06-22 02:28:48 $
     13 *  @version $Revision: 1.57 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-08-09 01:40:07 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    108108psTime* psTimeAlloc(
    109109    psTimeType type                    ///< Type of time to create (UTC or TAI).
    110 );
     110) PS_ATTR_MALLOC;
    111111
    112112
  • trunk/psLib/src/db/psDB.h

    r12128 r14452  
    77 * @author Joshua Hoblitt
    88 *
    9  * @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    10  * @date $Date: 2007-03-01 03:57:08 $
     9 * @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     10 * @date $Date: 2007-08-09 01:40:07 $
    1111 *
    1212 * Copyright 2005 Joshua Hoblitt, University of Hawaii
     
    4545    const char *dbname,                ///< Database namespace
    4646    unsigned int port                  ///< Database port number
    47 );
     47) PS_ATTR_MALLOC;
    4848
    4949/** Opens a new database connection
     
    115115 * @return bool:    true on success
    116116 */
    117 #ifdef __GNUC__
    118117bool p_psDBRunQuery(
    119118    psDB *dbh,                         ///< Database handle
    120119    const char *format,                ///< SQL string to execute
    121120    ...                                ///< Arguments for name formatting and metadata item data.
    122 ) __attribute__((format(printf, 2, 3)));
    123 
    124 #else // __GNUC__
    125 bool p_psDBRunQuery(
    126     psDB *dbh,                         ///< Database handle
    127     const char *format,                ///< SQL string to execute
    128     ...                                ///< Arguments for name formatting and metadata item data.
    129 );
    130 #endif // __GNUC__
     121) PS_ATTR_FORMAT(printf, 2, 3);
    131122
    132123/** Executes a SQL query as a prepared statement
     
    138129 * @return long:    the number of database rows affected
    139130 */
    140 #ifdef __GNUC__
    141131long p_psDBRunQueryPrepared(
    142132    psDB *dbh,                          ///< Database handle
     
    144134    const char *format,                 ///< SQL string to execute
    145135    ...
    146 ) __attribute__((format(printf, 3, 4)));
    147 #else // __GNUC__
    148 long p_psDBRunQueryPrepared(
    149     psDB *dbh,                          ///< Database handle
    150     const psArray *rowSet,              ///< row data as psArray of psMetadata
    151     const char *format,                 ///< SQL string to execute
    152     ...
    153 );
    154 #endif // __GNUC__
     136) PS_ATTR_FORMAT(printf, 3, 4);
    155137
    156138/** Fetches the result of a SQL query
  • trunk/psLib/src/imageops/psImageBinning.h

    r12588 r14452  
    88 *  @author Eugene Magnier, IfA
    99 *
    10  *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
    11  *  @date $Date: 2007-03-27 02:43:22 $
     10 *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
     11 *  @date $Date: 2007-08-09 01:40:07 $
    1212 *
    1313 *  Copyright 2007 Institute for Astronomy, University of Hawaii
     
    4242
    4343
    44 psImageBinning *psImageBinningAlloc();
     44psImageBinning *psImageBinningAlloc() PS_ATTR_MALLOC;
    4545
    4646void psImageBinningSetRuffSize(psImageBinning *binning, psImageBinningAlign align);
  • trunk/psLib/src/imageops/psImageConvolve.h

    r14332 r14452  
    55 * @author Robert DeSonia, MHPCC
    66 *
    7  * @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    8  * @date $Date: 2007-07-20 20:12:31 $
     7 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     8 * @date $Date: 2007-08-09 01:40:07 $
    99 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1010 */
     
    6868    int yMin,                          ///< Most negative y index
    6969    int yMax                           ///< Most positive y index
    70 );
     70) PS_ATTR_MALLOC;
    7171
    7272/// Checks the type of a particular pointer.
  • trunk/psLib/src/imageops/psImageInterpolate.h

    r13483 r14452  
    77 * @author Paul Price, Institute for Astronomy
    88 *
    9  * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    10  * @date $Date: 2007-05-23 02:55:01 $
     9 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     10 * @date $Date: 2007-08-09 01:40:07 $
    1111 * Copyright 2004-2007 Institute for Astronomy, University of Hawaii
    1212 */
     
    6767                                                          psMaskType poorMask, // Mask value for poor pixels
    6868                                                          float poorFrac // Fraction of flux for question
    69     );
     69    ) PS_ATTR_MALLOC;
    7070
    7171
  • trunk/psLib/src/jpeg/psImageJpeg.h

    r11248 r14452  
    33 *
    44 * @author EAM
    5  * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    6  * @date $Date: 2007-01-23 22:47:23 $
     5 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     6 * @date $Date: 2007-08-09 01:40:07 $
    77 */
    88
     
    2828
    2929// allocate a colormap (does not define the map values)
    30 psImageJpegColormap *psImageJpegColormapAlloc();
     30psImageJpegColormap *psImageJpegColormapAlloc() PS_ATTR_MALLOC;
    3131
    3232// set the colormap values using the supplied name
  • trunk/psLib/src/math/psClip.h

    r13448 r14452  
    44 * @author Paul Price, IfA.
    55 *
    6  * $Revision: 1.4 $ $Name: not supported by cvs2svn $
    7  * $Date: 2007-05-21 21:50:34 $
     6 * $Revision: 1.5 $ $Name: not supported by cvs2svn $
     7 * $Date: 2007-08-09 01:40:07 $
    88 * Copyright 2007 Institute for Astronomy, University of Hawaii
    99 */
     
    3737                                psMaskType masked, ///< Mask value for entries already masked
    3838                                psMaskType clipped ///< Mask value to give to clipped entries
    39     );
     39    ) PS_ATTR_MALLOC;
    4040
    4141
  • trunk/psLib/src/math/psHistogram.h

    r11759 r14452  
    77 * @author GLG, MHPCC
    88 *
    9  * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
    10  * @date $Date: 2007-02-13 03:01:24 $
     9 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
     10 * @date $Date: 2007-08-09 01:40:07 $
    1111 *
    1212 * Copyright 2004-2005 IfA, University of Hawaii
     
    5252    float upper,                       ///< Upper limit for the bins
    5353    int n                              ///< Number of bins
    54 );
     54) PS_ATTR_MALLOC;
    5555
    5656
  • trunk/psLib/src/math/psMinimizeLMM.h

    r14320 r14452  
    77 * @author GLG, MHPCC
    88 *
    9  * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
    10  * @date $Date: 2007-07-20 00:22:24 $
     9 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
     10 * @date $Date: 2007-08-09 01:40:07 $
    1111 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1212 */
     
    9494psMinConstraint;
    9595
    96 psMinConstraint *psMinConstraintAlloc();
     96psMinConstraint *psMinConstraintAlloc() PS_ATTR_MALLOC;
    9797
    9898/** Allocates a psMinimization structure.
     
    103103    int maxIter,                       ///< Number of minimization iterations to perform.
    104104    float tol                          ///< Requested error tolerance
    105 );
     105) PS_ATTR_MALLOC;
    106106
    107107/*  Checks the type of a particular pointer.
  • trunk/psLib/src/math/psPolynomial.h

    r11248 r14452  
    88 * @author GLG, MHPCC
    99 *
    10  * @version $Revision: 1.67 $ $Name: not supported by cvs2svn $
    11  * @date $Date: 2007-01-23 22:47:23 $
     10 * @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
     11 * @date $Date: 2007-08-09 01:40:07 $
    1212 *
    1313 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    111111    psPolynomialType type,             ///< Polynomial Type
    112112    unsigned int nX                    ///< Number of terms
    113 );
     113) PS_ATTR_MALLOC;
    114114
    115115/** Allocates a 2-D polynomial structure
     
    121121    unsigned int nX,                   ///< Number of terms in x
    122122    unsigned int nY                    ///< Number of terms in y
    123 );
     123) PS_ATTR_MALLOC;
    124124
    125125/** Allocates a 3-D polynomial structure
     
    132132    unsigned int nY,                   ///< Number of terms in y
    133133    unsigned int nZ                    ///< Number of terms in z
    134 );
     134) PS_ATTR_MALLOC;
    135135
    136136/** Allocates a 4-D polynomial structure
     
    144144    unsigned int nZ,                   ///< Number of terms in z
    145145    unsigned int nT                    ///< Number of terms in t
    146 );
     146) PS_ATTR_MALLOC;
    147147
    148148bool psPolynomial2DRecycle(psPolynomial2D *poly,
  • trunk/psLib/src/math/psPolynomialMetadata.h

    r14415 r14452  
    88 * @author GLG, MHPCC
    99 *
    10  * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
    11  * @date $Date: 2007-08-07 00:03:00 $
     10 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
     11 * @date $Date: 2007-08-09 01:40:07 $
    1212 *
    1313 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5151    const char *format,                ///< Name of polynomial folder.
    5252    ...                                ///< Arguments for name formatting.
    53 )
    54 #ifdef __GNUC__
    55 __attribute__((format(printf,3,4)))
    56 #endif
    57 ;
     53) PS_ATTR_FORMAT(printf,3,4);
    5854
    5955/** Allocates a new psPolynomial2D structure with information from a psMetadata.
     
    8884    const char *format,                      ///< Name of polynomial folder.
    8985    ...                                ///< Arguments for name formatting.
    90 )
    91 #ifdef __GNUC__
    92 __attribute__((format(printf,3,4)))
    93 #endif
    94 ;
     86) PS_ATTR_FORMAT(printf,3,4);
    9587
    9688/** Allocates a new psPolynomial3D structure with information from a psMetadata.
     
    126118    const char *format,                      ///< Name of polynomial folder.
    127119    ...                                ///< Arguments for name formatting.
    128 )
    129 #ifdef __GNUC__
    130 __attribute__((format(printf,3,4)))
    131 #endif
    132 ;
     120) PS_ATTR_FORMAT(printf, 3, 4);
    133121
    134122/** Allocates a new psPolynomial4D structure with information from a psMetadata.
     
    164152    const char *format,                      ///< Name of polynomial folder.
    165153    ...                                ///< Arguments for name formatting.
    166 )
    167 #ifdef __GNUC__
    168 __attribute__((format(printf,3,4)))
    169 #endif
    170 ;
     154) PS_ATTR_FORMAT(printf, 3, 4);
    171155
    172156/// @}
  • trunk/psLib/src/math/psRandom.h

    r11248 r14452  
    77 * @author GLG, MHPCC
    88 *
    9  * @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
    10  * @date $Date: 2007-01-23 22:47:23 $
     9 * @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
     10 * @date $Date: 2007-08-09 01:40:07 $
    1111 *
    1212 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    5353    psRandomType type,                 ///< The type of RNG
    5454    unsigned long seed                 ///< Known value with which to seed the RNG
    55 );
     55) PS_ATTR_MALLOC;
    5656
    5757/** Resets an existing psRandom struct.
  • trunk/psLib/src/math/psSparse.h

    r11248 r14452  
    22 * @brief functions to manipulate sparse matrices equations
    33 *
    4  * $Revision: 1.8 $ $Name: not supported by cvs2svn $
    5  * $Date: 2007-01-23 22:47:23 $
     4 * $Revision: 1.9 $ $Name: not supported by cvs2svn $
     5 * $Date: 2007-08-09 01:40:07 $
    66 * Copyright 2004-2005 IfA, University of Hawaii
    77 */
     
    5050
    5151// allocate a sparse matrix structure
    52 psSparse *psSparseAlloc(int Nrows, int Nelem);
     52psSparse *psSparseAlloc(int Nrows, int Nelem) PS_ATTR_MALLOC;
    5353
    5454// add a new matrix element
     
    8585
    8686// allocate a sparse matrix structure
    87 psSparseBorder *psSparseBorderAlloc(psSparse *sparse, int Nborder);
     87psSparseBorder *psSparseBorderAlloc(psSparse *sparse, int Nborder) PS_ATTR_MALLOC;
    8888
    8989bool psSparseBorderElementT(psSparseBorder *border, int i, int j, float value);
  • trunk/psLib/src/math/psSpline.h

    r11248 r14452  
    77 * @author GLG, MHPCC
    88 *
    9  * @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
    10  * @date $Date: 2007-01-23 22:47:23 $
     9 * @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
     10 * @date $Date: 2007-08-09 01:40:07 $
    1111 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1212 */
     
    4646 *  @return psSpline1D*    new 1-D spline struct
    4747 */
    48 psSpline1D *psSpline1DAlloc();
     48psSpline1D *psSpline1DAlloc() PS_ATTR_MALLOC;
    4949
    5050/** Evaluates 1-D spline polynomials at a specific coordinate.
  • trunk/psLib/src/math/psStats.h

    r14429 r14452  
    88 * @author GLG, MHPCC
    99 *
    10  * @version $Revision: 1.61 $ $Name: not supported by cvs2svn $
    11  * @date $Date: 2007-08-08 19:38:17 $
     10 * @version $Revision: 1.62 $ $Name: not supported by cvs2svn $
     11 * @date $Date: 2007-08-09 01:40:07 $
    1212 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1313 */
     
    116116    const char *func,                   ///< Function name of caller
    117117    psStatsOptions options              ///< Statistics to calculate
    118 );
     118) PS_ATTR_MALLOC;
    119119#define psStatsAlloc(options) \
    120120      p_psStatsAlloc(__FILE__, __LINE__, __func__, options)
  • trunk/psLib/src/mathtypes/psImage.h

    r12813 r14452  
    99 * @author Joshua Hoblitt, University of Hawaii
    1010 *
    11  * @version $Revision: 1.93 $ $Name: not supported by cvs2svn $
    12  * @date $Date: 2007-04-12 18:52:57 $
     11 * @version $Revision: 1.94 $ $Name: not supported by cvs2svn $
     12 * @date $Date: 2007-08-09 01:40:07 $
    1313 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1414 */
     
    8989    int numRows,                       ///< Number of rows in image.
    9090    psElemType type                    ///< Type of data for image.
    91 );
     91) PS_ATTR_MALLOC;
    9292#define psImageAlloc(numCols, numRows, type) \
    9393      p_psImageAlloc(__FILE__, __LINE__, __func__, numCols, numRows, type)
  • trunk/psLib/src/mathtypes/psScalar.h

    r12431 r14452  
    88 * @author Joshua Hoblitt, University of Hawaii
    99 *
    10  * @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    11  * @date $Date: 2007-03-14 00:39:51 $
     10 * @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     11 * @date $Date: 2007-08-09 01:40:07 $
    1212 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1313 */
     
    7070    double value,                       ///< Data to be put into psScalar
    7171    psElemType type                     ///< Type of data to be held by psScalar
    72 );
     72) PS_ATTR_MALLOC;
    7373#define psScalarAlloc(value, type) \
    7474      p_psScalarAlloc(__FILE__, __LINE__, __func__, value, type)
  • trunk/psLib/src/mathtypes/psVector.h

    r14267 r14452  
    1010 * @author Joshua Hoblitt, University of Hawaii
    1111 *
    12  * @version $Revision: 1.68 $ $Name: not supported by cvs2svn $
    13  * @date $Date: 2007-07-17 20:32:02 $
     12 * @version $Revision: 1.69 $ $Name: not supported by cvs2svn $
     13 * @date $Date: 2007-08-09 01:40:07 $
    1414 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1515 */
     
    9090    long nalloc,                        ///< Total number of elements to make available.
    9191    psElemType type                    ///< Type of data to be held by vector.
    92 //#ifdef __GNUC__
    93 //) __attribute__((malloc));
    94 //#else // ifdef __GNUC__
    95 );
    96 //#endif // ifdef __GNUC__
     92) PS_ATTR_MALLOC;
    9793#define psVectorAlloc(nalloc, type) \
    9894      p_psVectorAlloc(__FILE__, __LINE__, __func__, nalloc, type)
     
    119115    long nalloc,                       ///< Total number of elements to make available.
    120116    psElemType type                    ///< Type of data to be held by vector.
    121 //#ifdef __GNUC__
    122 //) __attribute__((malloc));
    123 //#else // ifdef __GNUC__
    124 );
    125 //#endif // ifdef __GNUC__
     117) PS_ATTR_MALLOC;
    126118#define psVectorAllocEmpty(nalloc, type) \
    127119      p_psVectorAllocEmpty(__FILE__, __LINE__, __func__, nalloc, type)
  • trunk/psLib/src/sys/psAbort.h

    r11686 r14452  
    1010 *  @author Joshua Hoblitt, University of Hawaii
    1111 *
    12  *  $Revision: 1.14 $ $Name: not supported by cvs2svn $
    13  *  $Date: 2007-02-07 23:52:54 $
     12 *  $Revision: 1.15 $ $Name: not supported by cvs2svn $
     13 *  $Date: 2007-08-09 01:40:07 $
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
    1515 */
     
    2222
    2323#include <stdarg.h>
     24
     25#include "psType.h"
    2426
    2527/** Reports an abort message to logging facility
     
    4547    const char *format,                 ///< A printf style formatting statement
    4648    ...
    47 #ifdef __GNUC__
    48 ) __attribute__((format(printf, 4, 5), noreturn));
    49 #else // ifdef __GNUC__
    50 );
    51 #endif // ifdef __GNUC__
     49) PS_ATTR_FORMAT(printf, 4, 5) PS_ATTR_NORETURN;
    5250#ifndef SWIG
    5351#define psAbort(...) \
  • trunk/psLib/src/sys/psError.h

    r11694 r14452  
    1212 *  @author Joshua Hoblitt, University of Hawaii
    1313 *
    14  *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2007-02-08 01:59:28 $
     14 *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2007-08-09 01:40:07 $
    1616 *
    1717 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2828#include<stdarg.h>
    2929
     30#include "psType.h"
    3031#include "psErrorCodes.h"
    3132
     
    101102    const char* format,                ///< printf-style format of header line
    102103    ...                                ///< any parameters required in format
    103 #ifdef __GNUC__
    104 ) __attribute__((format(printf, 2, 3)));
    105 #else // ifdef __GNUC__
    106 );
    107 #endif // ifdef __GNUC__
    108 
     104) PS_ATTR_FORMAT(printf, 2, 3);
    109105
    110106#ifndef SWIG
     
    151147    const char* format,                ///< printf-style format of header line
    152148    ...                                ///< any parameters required in format
    153 #ifdef __GNUC__
    154 ) __attribute__((format(printf, 6, 7)));
    155 #else // ifdef __GNUC__
    156 );
    157 #endif // ifdef __GNUC__
     149) PS_ATTR_FORMAT(printf, 6, 7);
    158150#ifndef SWIG
    159151#define psError(code,new,...) \
     
    182174    const char* format,                ///< printf-style format of header line
    183175    ...                                ///< any parameters required in format
    184 #ifdef __GNUC__
    185 ) __attribute__((format(printf, 4, 5)));
    186 #else // ifdef __GNUC__
    187 );
    188 #endif // ifdef __GNUC__
     176) PS_ATTR_FORMAT(printf, 4, 5);
    189177#ifndef SWIG
    190178#define psWarning(...) \
     
    204192    psErrorCode code,                  ///< Error class code
    205193    const char* msg                    ///< Error message
    206 );
     194) PS_ATTR_MALLOC;
    207195
    208196/// @}
  • trunk/psLib/src/sys/psLine.h

    r11694 r14452  
    99 *  @author David Robbins, MHPCC
    1010 *
    11  *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-02-08 01:59:28 $
     11 *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-08-09 01:40:07 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3737psLine *psLineAlloc(
    3838    long Nline                         ///< length of line object to allocate
    39 );
     39) PS_ATTR_MALLOC;
    4040
    4141
     
    7474    const char *format,                ///< printf-style format of line
    7575    ...                                ///< any parameters required in format
    76 #ifdef __GNUC__
    77 ) __attribute__((format(printf, 2, 3)));
    78 #else // ifdef __GNUC__
    79 );
    80 #endif // ifdef __GNUC__
     76) PS_ATTR_FORMAT(printf, 2, 3);
    8177
    8278
  • trunk/psLib/src/sys/psLogMsg.h

    r11694 r14452  
    1111 *  @author Joshua Hoblitt, University of Hawaii
    1212 *
    13  *  @version $Revision: 1.39 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-02-08 01:59:28 $
     13 *  @version $Revision: 1.40 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-08-09 01:40:07 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    120120    const char *format,                ///< printf-style format command
    121121    ...
    122 #ifdef __GNUC__
    123 ) __attribute__((format(printf, 3, 4)));
    124 #else // ifdef __GNUC__
    125 );
    126 #endif // ifdef __GNUC__
     122) PS_ATTR_FORMAT(printf, 3, 4);
    127123
    128124
  • trunk/psLib/src/sys/psString.h

    r12885 r14452  
    1111 * @author Joshua Hoblitt, University of Hawaii
    1212 *
    13  * @version $Revision: 1.41 $ $Name: not supported by cvs2svn $
    14  * @date $Date: 2007-04-18 19:37:08 $
     13 * @version $Revision: 1.42 $ $Name: not supported by cvs2svn $
     14 * @date $Date: 2007-08-09 01:40:07 $
    1515 *
    1616 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    2525#include <sys/types.h>
    2626#include <stdarg.h>
     27
    2728#include "psType.h"
    2829#include "psList.h"
     
    3233
    3334/** This macro returns a (static buffer containing) "file:line" */
     35const char *p_psFileLine(const char *file, int line)
    3436#ifdef __GNUC__
    35 const char *p_psFileLine(const char *file, int line) __attribute__((deprecated));
    36 #else // ifdef __GNUC__
    37 const char *p_psFileLine(const char *file, int line);
     37__attribute__((deprecated))
    3838#endif // ifdef __GNUC__
     39;
    3940#define PS_FILE_LINE p_psFileLine(__FILE__,__LINE__)
    4041
     
    5455    const char *func,                   ///< Function name of caller
    5556    size_t nChar                        ///< Size of psString to allocate.
    56 );
     57) PS_ATTR_MALLOC;
    5758#define psStringAlloc(nChar) \
    5859      p_psStringAlloc(__FILE__, __LINE__, __func__, nChar)
     
    147148    const char *format,                 ///< format to append
    148149    ...                                 ///< format arguments
    149 #ifdef __GNUC__
    150 ) __attribute__((format(printf, 5, 6)));
    151 #else // ifdef __GNUC__
    152 );
    153 #endif // ifdef __GNUC__
     150) PS_ATTR_FORMAT(printf, 5, 6);
    154151#define psStringAppend(dest, ...) \
    155152      p_psStringAppend(__FILE__, __LINE__, __func__, dest, __VA_ARGS__)
     
    205202    const char *format,                 ///< format to append
    206203    ...                                 ///< format arguments
    207 #ifdef __GNUC__
    208 ) __attribute__((format(printf, 5, 6)));
    209 # else // ifdef __GNUC__
    210 );
    211 #endif // ifdef __GNUC__
     204) PS_ATTR_FORMAT(printf, 5, 6);
    212205#define psStringPrepend(dest, ...) \
    213206      p_psStringPrepend(__FILE__, __LINE__, __func__, dest, __VA_ARGS__)
  • trunk/psLib/src/sys/psTrace.h

    r12494 r14452  
    99 *  @author GLG, MHPCC
    1010 *
    11  *  @version $Revision: 1.58 $ $Name: not supported by cvs2svn $
    12  *  @date $Date: 2007-03-19 22:26:22 $
     11 *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
     12 *  @date $Date: 2007-08-09 01:40:07 $
    1313 *
    1414 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    100100    const char *format,                ///< printf-style format command
    101101    ...                                ///< trace message arguments
    102 #ifdef __GNUC__
    103 ) __attribute__((format(printf, 6, 7)));
    104 #else // ifdef __GNUC__
    105 );
    106 #endif // ifdef __GNUC__
     102) PS_ATTR_FORMAT(printf, 6, 7);
    107103#ifndef SWIG
    108104#define psTrace(facil, level, ...) \
  • trunk/psLib/src/sys/psType.h

    r12439 r14452  
    1010*  @author Ross Harman, MHPCC
    1111*
    12 *  @version $Revision: 1.59 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2007-03-14 04:08:13 $
     12*  @version $Revision: 1.60 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2007-08-09 01:40:07 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    243243#define PSELEMTYPE_SIZEOF(x) (x & 0xFF)
    244244
     245#ifdef __GNUC__
     246#define PS_ATTR_MALLOC __attribute__((__malloc__))
     247#else // __GNUC__
     248#define PS_ATTR_MALLOC
     249#endif // __GNUC__
     250
     251#ifdef __GNUC__
     252#define PS_ATTR_NORETURN __attribute__((noreturn))
     253#else // __GNUC__
     254#define PS_ATTR_NORETURN
     255#endif // __GNUC__
     256
     257#ifdef __GNUC__
     258#define PS_ATTR_FORMAT(style, start, end) __attribute__((format(style, start, end)))
     259#else // __GNUC__
     260#define PS_ATTR_FORMAT(style, start, end)
     261#endif // __GNUC__
     262
    245263/** Dimensions of a data type.
    246264 *
  • trunk/psLib/src/types/psArray.h

    r12303 r14452  
    1010 *  @author Joshua Hoblitt, University of Hawaii
    1111 *
    12  *  @version $Revision: 1.48 $ $Name: not supported by cvs2svn $
    13  *  @date $Date: 2007-03-08 02:13:31 $
     12 *  @version $Revision: 1.49 $ $Name: not supported by cvs2svn $
     13 *  @date $Date: 2007-08-09 01:40:08 $
    1414 *
    1515 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7979    const char *func,                   ///< Function name of caller
    8080    long nalloc                         ///< Total number of elements to make available.
    81 );
     81) PS_ATTR_MALLOC;
    8282#define psArrayAlloc(nalloc) \
    8383      p_psArrayAlloc(__FILE__, __LINE__, __func__, nalloc)
  • trunk/psLib/src/types/psBitSet.h

    r11759 r14452  
    1111 *  @author Ross Harman, MHPCC
    1212 *
    13  *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-02-13 03:01:24 $
     13 *  @version $Revision: 1.31 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-08-09 01:40:08 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7676    const char *func,                   ///< Function name of caller
    7777    long nalloc                        ///< Number of bits in psBitSet array
    78 );
     78) PS_ATTR_MALLOC;
    7979#define psBitSetAlloc(nalloc) \
    8080      p_psBitSetAlloc(__FILE__, __LINE__, __func__, nalloc)
  • trunk/psLib/src/types/psHash.h

    r12303 r14452  
    1111 *  @author GLG, MHPCC
    1212 *
    13  *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
    14  *  @date $Date: 2007-03-08 02:13:31 $
     13 *  @version $Revision: 1.24 $ $Name: not supported by cvs2svn $
     14 *  @date $Date: 2007-08-09 01:40:08 $
    1515 *
    1616 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    6969    const char *func,                   ///< Function name of caller
    7070    long nalloc                        ///< The number of buckets to allocate.
    71 );
     71) PS_ATTR_MALLOC;
    7272#define psHashAlloc(nalloc) \
    7373      p_psHashAlloc(__FILE__, __LINE__, __func__, nalloc)
  • trunk/psLib/src/types/psList.h

    r12309 r14452  
    55 *  @author Robert Daniel DeSonia, MHPCC
    66 *
    7  *  @version $Revision: 1.45 $ $Name: not supported by cvs2svn $
    8  *  @date $Date: 2007-03-08 03:59:12 $
     7 *  @version $Revision: 1.46 $ $Name: not supported by cvs2svn $
     8 *  @date $Date: 2007-08-09 01:40:08 $
    99 *
    1010 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    103103    const char *func,                   ///< Function name of caller
    104104    psPtr data                          ///< initial data item; may be NULL if an empty psList is desired
    105 );
     105) PS_ATTR_MALLOC;
    106106#define psListAlloc(data) \
    107107      p_psListAlloc(__FILE__, __LINE__, __func__, data)
     
    129129    ///<  This can be a numeric index, PS_LIST_HEAD, or PS_LIST_TAIL.
    130130    bool mutable                       ///< Is it permissible to modify list?
    131 );
     131) PS_ATTR_MALLOC;
    132132#define psListIteratorAlloc(list, location, mutable) \
    133133      p_psListIteratorAlloc(__FILE__, __LINE__, __func__, list, location, mutable)
  • trunk/psLib/src/types/psLookupTable.h

    r12329 r14452  
    66*  @author Ross Harman, MHPCC
    77*
    8 *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
    9 *  @date $Date: 2007-03-08 22:08:26 $
     8*  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
     9*  @date $Date: 2007-08-09 01:40:08 $
    1010*
    1111*  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    105105    const char *format,                ///< scanf-like format string
    106106    long indexCol                      ///< Column of the index vector (starting at zero)
    107 );
     107) PS_ATTR_MALLOC;
    108108#define psLookupTableAlloc(filename, format, indexCol) \
    109109      p_psLookupTableAlloc(__FILE__, __LINE__, __func__, filename, format, indexCol)
  • trunk/psLib/src/types/psMetadata.h

    r14008 r14452  
    99*  @author Ross Harman, MHPCC
    1010*
    11 *  @version $Revision: 1.102 $ $Name: not supported by cvs2svn $
    12 *  @date $Date: 2007-07-04 01:36:14 $
     11*  @version $Revision: 1.103 $ $Name: not supported by cvs2svn $
     12*  @date $Date: 2007-08-09 01:40:08 $
    1313*
    1414*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    161161    const char *comment,               ///< Comment for metadata item.
    162162    ...                                ///< Arguments for name formatting and metadata item data.
    163 );
     163) PS_ATTR_MALLOC;
    164164#define psMetadataItemAlloc(name, type, ...) \
    165165      p_psMetadataItemAlloc(__FILE__, __LINE__, __func__, name, type, __VA_ARGS__)
     
    417417    unsigned int lineno,                ///< Line number of caller
    418418    const char *func                    ///< Function name of caller
    419 );
     419) PS_ATTR_MALLOC;
    420420#define psMetadataAlloc() \
    421421      p_psMetadataAlloc(__FILE__, __LINE__, __func__)
     
    11671167    ///< A regular expression for subsetting the psMetadata.  If NULL, no
    11681168    ///< subsetting is performed.
    1169 );
     1169) PS_ATTR_MALLOC;
    11701170#define psMetadataIteratorAlloc(md, location, regex) \
    11711171      p_psMetadataIteratorAlloc(__FILE__, __LINE__, __func__, md, location, regex)
  • trunk/psLib/src/types/psPixels.h

    r12330 r14452  
    66 *  @author Robert DeSonia, MHPCC
    77 *
    8  *  @version $Revision: 1.27 $ $Name: not supported by cvs2svn $
    9  *  @date $Date: 2007-03-08 22:12:56 $
     8 *  @version $Revision: 1.28 $ $Name: not supported by cvs2svn $
     9 *  @date $Date: 2007-08-09 01:40:08 $
    1010 *
    1111 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    7474    const char *func,                   ///< Function name of caller
    7575    long nalloc                         ///< the size of the coordinate vectors
    76 );
     76) PS_ATTR_MALLOC;
    7777#define psPixelsAlloc(nalloc) \
    7878      p_psPixelsAlloc(__FILE__, __LINE__, __func__, nalloc)
Note: See TracChangeset for help on using the changeset viewer.