Changeset 847
- Timestamp:
- 08/09/08 10:48:11 (3 years ago)
- Files:
-
- 1 modified
-
Whitix/trunk/user/libc/string/str.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/trunk/user/libc/string/str.c
r684 r847 282 282 } 283 283 284 char* strndup(const char* s1, int n) 285 { 286 if (!s1) 287 return NULL; 288 289 char* addr=(char*)malloc(n+1); 290 if (!addr) 291 return NULL; 292 293 strncpy(addr,s1, n); 294 295 return addr; 296 } 297 284 298 void* memset(void* buffer,int c,size_t num) 285 299 {
