Changeset 11694 for trunk/psLib/src/sys/psString.h
- Timestamp:
- Feb 7, 2007, 3:59:28 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psString.h (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psString.h
r11616 r11694 9 9 * @author Eric Van Alst, MHPCC 10 10 * @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 $ 14 15 * 15 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 31 32 32 33 /** This macro returns a (static buffer containing) "file:line" */ 34 #ifdef __GNUC__ 35 const char *p_psFileLine(const char *file, int line) __attribute__((deprecated)); 36 #else // ifdef __GNUC__ 33 37 const char *p_psFileLine(const char *file, int line); 38 #endif // ifdef __GNUC__ 34 39 #define PS_FILE_LINE p_psFileLine(__FILE__,__LINE__) 35 40 … … 42 47 ); 43 48 49 44 50 /** Checks the type of a particular pointer. 45 51 * 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. 47 54 * 48 55 * @return bool: True if the pointer matches a psString structure, false otherwise. … … 51 58 psPtr ptr ///< the pointer whose type to check 52 59 ); 60 53 61 54 62 /** Copies the input string … … 63 71 const char *string ///< Input string of characters to copy 64 72 ); 73 65 74 66 75 /** Copies the input string up to the specified number of characters … … 81 90 ); 82 91 92 83 93 /** Appends a format onto a string 84 94 * … … 88 98 * @return ssize_t: The length of the new string (excluding '\0') 89 99 */ 100 ssize_t psStringAppend( 101 char **dest, ///< existing string 102 const char *format, ///< format to append 103 ... ///< format arguments 90 104 #ifdef __GNUC__ 91 ssize_t psStringAppend(92 char **dest, ///< existing string93 const char *format, ///< format to append94 ... ///< format arguments95 105 ) __attribute__((format(printf, 2, 3))); 96 106 #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 */ 118 ssize_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 */ 132 ssize_t psStringPrepend( 98 133 char **dest, ///< existing string 99 134 const char *format, ///< format to append 100 135 ... ///< format arguments 101 );102 #endif // __GNUC__103 104 /** Appends a format onto a string105 *106 * This function shall allocate a new string if dest is NULL. dest shall be107 * 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 string113 const char *format, ///< format to append114 va_list ap ///< va_list of format arguments115 );116 117 /** Prepends a format onto a string118 *119 * This function shall allocate a new string if dest is NULL. dest shall be120 * automatically extended to the size of the new string.121 *122 * @return ssize_t: The length of the new string (excluding '\0')123 */124 136 #ifdef __GNUC__ 125 ssize_t psStringPrepend(126 char **dest, ///< existing string127 const char *format, ///< format to append128 ... ///< format arguments129 137 ) __attribute__((format(printf, 2, 3))); 130 138 # else // __GNUC__ 131 132 ssize_t psStringPrepend( 133 char **dest, ///< existing string 134 const char *format, ///< format to append 135 ... ///< format arguments 136 ); 139 ); 137 140 #endif // __GNUC__ 138 141 142 139 143 /** Prepends a format onto a string 140 144 * … … 149 153 va_list ap ///< va_list of format arguments 150 154 ); 155 151 156 152 157 /** Procedure to split the input string into a psList of psStrings. … … 163 168 ); 164 169 170 165 171 /** Procedure to split the input string into a psArray of psStrings. 166 172 * … … 176 182 ); 177 183 178 // Given the input string, search for all copies of the key, and replace with the replacement value179 // the input string may be freed if not needed184 // 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 180 186 /** Procedure to search an input string and substitute strings where desired. 181 187 * 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. 184 191 * 185 192 * @return ssize_t: the length of the new string (excluding '\0') … … 191 198 ); 192 199 200 193 201 // strip whitespace from head and tail of string 194 202 /** Procedure to strip the whitespace from the head and tail of a string. … … 199 207 char *string ///< input string to be stripped. 200 208 ); 209 201 210 202 211 /// Given a CVS keyword string, strip off the CVS-specific keyword to get the value … … 222 231 #endif // ifndef DOXYGEN 223 232 233 224 234 /// @} 225 235 #endif // #ifndef PS_STRING_H
Note:
See TracChangeset
for help on using the changeset viewer.
