IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 13, 2006, 5:50:28 PM (20 years ago)
Author:
Paul Price
Message:

Adding assertions for metadata and string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/sys/psString.h

    r8610 r9578  
    1414 *  @author David Robbins, MHPCC
    1515 *
    16  *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
    17  *  @date $Date: 2006-08-26 00:32:39 $
     16 *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
     17 *  @date $Date: 2006-10-14 03:50:28 $
    1818 *
    1919 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    136136) __attribute__((format(printf, 2, 3)));
    137137# else // __GNUC__
     138
    138139    ssize_t psStringPrepend(
    139140        char **dest,                        ///< existing string
     
    206207);
    207208
     209
     210#define PS_ASSERT_STRING_NON_EMPTY(NAME, RVAL) \
     211if (!(NAME) || strlen(NAME) == 0) { \
     212    psError(PS_ERR_BAD_PARAMETER_VALUE, true, \
     213            "Error: String %s is NULL or empty.", \
     214            #NAME); \
     215    return(RVAL); \
     216}
     217
     218
    208219/** @} */// Doxygen - End of SystemGroup Functions
    209220
Note: See TracChangeset for help on using the changeset viewer.