1 /******************************************************************************
5 * Instantiation of basic string operations to prevent inclusion of full
6 * string library. These are simple implementations not necessarily optimized
7 * for speed, but rather to show intent.
9 * Revision information:
11 * 20AUG2004 kb_admin initial creation
12 * 12JAN2005 kb_admin minor updates
15 * No warranty, expressed or implied, is included with this software. It is
16 * provided "AS IS" and no warranty of any kind including statutory or aspects
17 * relating to merchantability or fitness for any purpose is provided. All
18 * intellectual property rights of others is maintained with the respective
19 * owners. This software is not copyrighted and is intended for reference
24 *****************************************************************************/
29 * .KB_C_FN_DEFINITION_START
30 * void p_memset(char *buffer, char value, int size)
31 * This global function sets memory at the pointer for the specified
32 * number of bytes to value.
33 * .KB_C_FN_DEFINITION_END
36 p_memset(char *buffer, char value, int size)
43 * .KB_C_FN_DEFINITION_START
44 * int p_memcmp(char *to, char *from, unsigned size)
45 * This global function compares data at to against data at from for
46 * size bytes. Returns 0 if the locations are equal. size must be
48 * .KB_C_FN_DEFINITION_END
51 p_memcmp(const char *to, const char *from, unsigned size)
53 while ((--size) && (*to++ == *from++))
56 return (*to != *from);