IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 7, 2007, 3:59:28 PM (19 years ago)
Author:
jhoblitt
Message:

./sys header file cleanup:

formatting/whitespace fixes
add a few additional gcc attributes
mark p_psFileLine as deprecated

File:
1 edited

Legend:

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

    r11616 r11694  
    99 * @author Eric Van Alst, MHPCC
    1010 * @author David Robbins, MHPCC
    11  *
    12  * @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
    13  * @date $Date: 2007-02-03 05:35:30 $
     11 * @author Joshua Hoblitt, University of Hawaii
     12 *
     13 * @version $Revision: 1.37 $ $Name: not supported by cvs2svn $
     14 * @date $Date: 2007-02-08 01:59:28 $
    1415 *
    1516 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    3132
    3233/** This macro returns a (static buffer containing) "file:line" */
     34#ifdef __GNUC__
     35const char *p_psFileLine(const char *file, int line) __attribute__((deprecated));
     36#else // ifdef __GNUC__
    3337const char *p_psFileLine(const char *file, int line);
     38#endif // ifdef __GNUC__
    3439#define PS_FILE_LINE p_psFileLine(__FILE__,__LINE__)
    3540
     
    4247);
    4348
     49
    4450/** Checks the type of a particular pointer.
    4551 *
    46  *  Uses the appropriate deallocation function in psMemBlock to check the ptr datatype.
     52 *  Uses the appropriate deallocation function in psMemBlock to check the ptr
     53 *  datatype.
    4754 *
    4855 *  @return bool:       True if the pointer matches a psString structure, false otherwise.
     
    5158    psPtr ptr                          ///< the pointer whose type to check
    5259);
     60
    5361
    5462/** Copies the input string
     
    6371    const char *string                 ///< Input string of characters to copy
    6472);
     73
    6574
    6675/** Copies the input string up to the specified number of characters
     
    8190);
    8291
     92
    8393/** Appends a format onto a string
    8494 *
     
    8898 * @return ssize_t:     The length of the new string (excluding '\0')
    8999 */
     100ssize_t psStringAppend(
     101    char **dest,                        ///< existing string
     102    const char *format,                 ///< format to append
     103    ...                                 ///< format arguments
    90104#ifdef __GNUC__
    91 ssize_t psStringAppend(
    92     char **dest,                        ///< existing string
    93     const char *format,                 ///< format to append
    94     ...                                 ///< format arguments
    95105) __attribute__((format(printf, 2, 3)));
    96106#else // __GNUC__
    97 ssize_t psStringAppend(
     107);
     108#endif // __GNUC__
     109
     110
     111/** Appends a format onto a string
     112 *
     113 * This function shall allocate a new string if dest is NULL.  dest shall be
     114 * automatically extended to the size of the new string.
     115 *
     116 * @return ssize_t:     The length of the new string (excluding '\0')
     117 */
     118ssize_t psStringAppendV(
     119    char **dest,                        ///< existing string
     120    const char *format,                 ///< format to append
     121    va_list ap                          ///< va_list of format arguments
     122);
     123
     124
     125/** Prepends a format onto a string
     126 *
     127 * This function shall allocate a new string if dest is NULL.  dest shall be
     128 * automatically extended to the size of the new string.
     129 *
     130 * @return ssize_t:     The length of the new string (excluding '\0')
     131 */
     132ssize_t psStringPrepend(
    98133    char **dest,                        ///< existing string
    99134    const char *format,                 ///< format to append
    100135    ...                                 ///< format arguments
    101 );
    102 #endif // __GNUC__
    103 
    104 /** Appends a format onto a string
    105  *
    106  * This function shall allocate a new string if dest is NULL.  dest shall be
    107  * automatically extended to the size of the new string.
    108  *
    109  * @return ssize_t:     The length of the new string (excluding '\0')
    110  */
    111 ssize_t psStringAppendV(
    112     char **dest,                        ///< existing string
    113     const char *format,                 ///< format to append
    114     va_list ap                          ///< va_list of format arguments
    115 );
    116 
    117 /** Prepends a format onto a string
    118  *
    119  * This function shall allocate a new string if dest is NULL.  dest shall be
    120  * automatically extended to the size of the new string.
    121  *
    122  * @return ssize_t:     The length of the new string (excluding '\0')
    123  */
    124136#ifdef __GNUC__
    125 ssize_t psStringPrepend(
    126     char **dest,                        ///< existing string
    127     const char *format,                 ///< format to append
    128     ...                                 ///< format arguments
    129137) __attribute__((format(printf, 2, 3)));
    130138# else // __GNUC__
    131 
    132     ssize_t psStringPrepend(
    133         char **dest,                        ///< existing string
    134         const char *format,                 ///< format to append
    135         ...                                 ///< format arguments
    136     );
     139);
    137140#endif // __GNUC__
    138141
     142
    139143/** Prepends a format onto a string
    140144 *
     
    149153    va_list ap                          ///< va_list of format arguments
    150154);
     155
    151156
    152157/** Procedure to split the input string into a psList of psStrings.
     
    163168);
    164169
     170
    165171/** Procedure to split the input string into a psArray of psStrings.
    166172 *
     
    176182);
    177183
    178 // Given the input string, search for all copies of the key, and replace with the replacement value
    179 // the input string may be freed if not needed
     184// Given the input string, search for all copies of the key, and replace with
     185// the replacement value the input string may be freed if not needed
    180186/** Procedure to search an input string and substitute strings where desired.
    181187 *
    182  *  The input string is searched for all instances of the key, which is then replaced with
    183  *  the replacement value wherever found.  The input string may be freed if not needed.
     188 *  The input string is searched for all instances of the key, which is then
     189 *  replaced with the replacement value wherever found.  The input string may
     190 *  be freed if not needed.
    184191 *
    185192 *  @return ssize_t:      the length of the new string (excluding '\0')
     
    191198);
    192199
     200
    193201// strip whitespace from head and tail of string
    194202/** Procedure to strip the whitespace from the head and tail of a string.
     
    199207    char *string                       ///< input string to be stripped.
    200208);
     209
    201210
    202211/// Given a CVS keyword string, strip off the CVS-specific keyword to get the value
     
    222231#endif // ifndef DOXYGEN
    223232
     233
    224234/// @}
    225235#endif // #ifndef PS_STRING_H
Note: See TracChangeset for help on using the changeset viewer.