Changeset 240 for trunk/src/helpers/stringh.c
- Timestamp:
- Jan 12, 2003, 11:49:24 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/stringh.c
r238 r240 178 178 *string1 = '\0'; 179 179 return string1; 180 } 181 182 /* 183 *@@ strhCopyBuf: 184 * copies pcszSource to pszTarget, taking 185 * its length into account. 186 * 187 * Returns: 188 * 189 * -- NO_ERROR 190 * 191 * -- ERROR_INVALID_PARAMETER: pcszSource is 192 * null or points to a null byte. 193 * 194 * -- ERROR_FILENAME_EXCED_RANGE: pcszSource 195 * is too long to fit into pszTarget. 196 * 197 *@@added V1.0.1 (2003-01-05) [umoeller] 198 */ 199 200 APIRET strhCopyBuf(PSZ pszTarget, 201 PCSZ pcszSource, 202 ULONG cbTarget) 203 { 204 ULONG cb; 205 if (!pcszSource || !*pcszSource) 206 return ERROR_INVALID_PARAMETER; 207 cb = strlen(pcszSource) + 1; 208 if (cb > cbTarget) 209 return ERROR_FILENAME_EXCED_RANGE; 210 211 memcpy(pszTarget, 212 pcszSource, 213 cb); 214 return NO_ERROR; 180 215 } 181 216
Note:
See TracChangeset
for help on using the changeset viewer.