Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 2124 → Rev 2125

/trunk/kernel/generic/src/lib/memstr.c
74,7 → 74,7
((uint8_t *)(((unative_t *) dst) + i))[j] = ((uint8_t *)(((unative_t *) src) + i))[j];
}
return (char *)src;
return (char *) src;
}
 
/** Fill block of memory
92,7 → 92,7
int i;
uint8_t *p = (uint8_t *) dst;
for(i=0; i<cnt; i++)
for (i = 0; i < cnt; i++)
p[i] = x;
}
 
111,9 → 111,28
int i;
uint16_t *p = (uint16_t *) dst;
for(i=0; i<cnt; i++)
for (i = 0; i < cnt; i++)
p[i] = x;
}
 
/** Copy string
*
* Copy string from src address to dst address.
* The copying is done char-by-char until the null
* character. The source and destination memory areas
* cannot overlap.
*
* @param src Origin string to copy from.
* @param dst Origin string to copy to.
*
*/
char *strcpy(char *dest, const char *src)
{
char *orig = dest;
while ((*(dest++) = *(src++)));
return orig;
}
 
/** @}
*/