Changeset 11711 for trunk/psLib/src/sys/psString.h
- Timestamp:
- Feb 8, 2007, 12:27:30 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/psLib/src/sys/psString.h (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/sys/psString.h
r11694 r11711 11 11 * @author Joshua Hoblitt, University of Hawaii 12 12 * 13 * @version $Revision: 1.3 7$ $Name: not supported by cvs2svn $14 * @date $Date: 2007-02-08 01:59:28$13 * @version $Revision: 1.38 $ $Name: not supported by cvs2svn $ 14 * @date $Date: 2007-02-08 22:27:30 $ 15 15 * 16 16 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii … … 39 39 #define PS_FILE_LINE p_psFileLine(__FILE__,__LINE__) 40 40 41 41 42 /** Allocates a new psString. 42 43 * 43 44 * @return psString: Newly allocated string of length n. 44 45 */ 46 #ifdef DOXYGEN 45 47 psString psStringAlloc( 46 48 long nChar ///< Size of psString to allocate. 47 49 ); 50 #else // ifdef DOXYGEN 51 psString p_psStringAlloc( 52 const char *file, ///< File of caller 53 unsigned int lineno, ///< Line number of caller 54 const char *func, ///< Function name of caller 55 long nChar ///< Size of psString to allocate. 56 ); 57 #define psStringAlloc(nChar) \ 58 p_psStringAlloc(__FILE__, __LINE__, __func__, nChar) 59 #endif // ifdef DOXYGEN 48 60 49 61 … … 68 80 * @return psString: Copy of input string 69 81 */ 82 #ifdef DOXYGEN 70 83 psString psStringCopy( 71 const char *string ///< Input string of characters to copy 72 ); 84 const char *string ///< Input string of characters to copy 85 ); 86 #else // ifdef DOXYGEN 87 psString p_psStringCopy( 88 const char *file, ///< File of caller 89 unsigned int lineno, ///< Line number of caller 90 const char *func, ///< Function name of caller 91 const char *string ///< Input string of characters to copy 92 ); 93 #define psStringCopy(string) \ 94 p_psStringCopy(__FILE__, __LINE__, __func__, string) 95 #endif // ifdef DOXYGEN 73 96 74 97 … … 85 108 * @return psString: Copy of input string 86 109 */ 110 #ifdef DOXYGEN 87 111 psString psStringNCopy( 88 112 const char *string, ///< Input string of characters to copy 89 113 unsigned int nChar ///< Number of bytes to allocate for string copy 90 114 ); 115 #else // ifdef DOXYGEN 116 psString p_psStringNCopy( 117 const char *file, ///< File of caller 118 unsigned int lineno, ///< Line number of caller 119 const char *func, ///< Function name of caller 120 const char *string, ///< Input string of characters to copy 121 unsigned int nChar ///< Number of bytes to allocate for string copy 122 ); 123 #define psStringNCopy(string, nChar) \ 124 p_psStringNCopy(__FILE__, __LINE__, __func__, string, nChar) 125 #endif // ifdef DOXYGEN 91 126 92 127 … … 98 133 * @return ssize_t: The length of the new string (excluding '\0') 99 134 */ 135 #ifdef DOXYGEN 100 136 ssize_t psStringAppend( 137 char **dest, ///< existing string 138 const char *format, ///< format to append 139 ... ///< format arguments 140 ); 141 #else // ifdef DOXYGEN 142 ssize_t p_psStringAppend( 143 const char *file, ///< File of caller 144 unsigned int lineno, ///< Line number of caller 145 const char *func, ///< Function name of caller 101 146 char **dest, ///< existing string 102 147 const char *format, ///< format to append 103 148 ... ///< format arguments 104 149 #ifdef __GNUC__ 105 ) __attribute__((format(printf, 2, 3))); 106 #else // __GNUC__ 107 ); 108 #endif // __GNUC__ 150 ) __attribute__((format(printf, 5, 6))); 151 #else // ifdef __GNUC__ 152 ); 153 #endif // ifdef __GNUC__ 154 #define psStringAppend(dest, ...) \ 155 p_psStringAppend(__FILE__, __LINE__, __func__, dest, __VA_ARGS__) 156 #endif // ifdef DOXYGEN 109 157 110 158 … … 116 164 * @return ssize_t: The length of the new string (excluding '\0') 117 165 */ 166 #ifdef DOXYGEN 118 167 ssize_t psStringAppendV( 119 168 char **dest, ///< existing string … … 121 170 va_list ap ///< va_list of format arguments 122 171 ); 172 #else // ifdef DOXYGEN 173 ssize_t p_psStringAppendV( 174 const char *file, ///< File of caller 175 unsigned int lineno, ///< Line number of caller 176 const char *func, ///< Function name of caller 177 char **dest, ///< existing string 178 const char *format, ///< format to append 179 va_list ap ///< va_list of format arguments 180 ); 181 #define psStringAppendV(dest, format, ap) \ 182 p_psStringAppendV(__FILE__, __LINE__, __func__, dest, format, ap) 183 #endif // ifdef DOXYGEN 123 184 124 185 … … 130 191 * @return ssize_t: The length of the new string (excluding '\0') 131 192 */ 193 #ifdef DOXYGEN 132 194 ssize_t psStringPrepend( 195 char **dest, ///< existing string 196 const char *format, ///< format to append 197 ... ///< format arguments 198 ); 199 #else // ifdef DOXYGEN 200 ssize_t p_psStringPrepend( 201 const char *file, ///< File of caller 202 unsigned int lineno, ///< Line number of caller 203 const char *func, ///< Function name of caller 133 204 char **dest, ///< existing string 134 205 const char *format, ///< format to append 135 206 ... ///< format arguments 136 207 #ifdef __GNUC__ 137 ) __attribute__((format(printf, 2, 3))); 138 # else // __GNUC__ 139 ); 140 #endif // __GNUC__ 208 ) __attribute__((format(printf, 5, 6))); 209 # else // ifdef __GNUC__ 210 ); 211 #endif // ifdef __GNUC__ 212 #define psStringPrepend(dest, ...) \ 213 p_psStringPrepend(__FILE__, __LINE__, __func__, dest, __VA_ARGS__) 214 #endif // ifdef DOXYGEN 141 215 142 216 … … 148 222 * @return ssize_t: The length of the new string (excluding '\0') 149 223 */ 224 #ifdef DOXYGEN 150 225 ssize_t psStringPrependV( 151 226 char **dest, ///< existing string … … 153 228 va_list ap ///< va_list of format arguments 154 229 ); 230 #else // ifdef DOXYGEN 231 ssize_t p_psStringPrependV( 232 const char *file, ///< File of caller 233 unsigned int lineno, ///< Line number of caller 234 const char *func, ///< Function name of caller 235 char **dest, ///< existing string 236 const char *format, ///< format to append 237 va_list ap ///< va_list of format arguments 238 ); 239 #define psStringPrependV(dest, format, ap) \ 240 p_psStringPrependV(__FILE__, __LINE__, __func__, dest, format, ap) 241 #endif // ifdef DOXYGEN 155 242 156 243
Note:
See TracChangeset
for help on using the changeset viewer.
