From: Erik M. <er...@us...> - 2002-01-06 17:04:39
|
Update of /cvsroot/blob/blob/include/blob In directory usw-pr-cvs1:/tmp/cvs-serv2492/include/blob Modified Files: util.h types.h Log Message: - Add s8, s16, and s32 types for signed integers - Add size_t type - Change strncpy(), strlcpy(), and strncmp() to use size_t instead of int - Add memcpy() function Index: util.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/util.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- util.h 2001/12/19 20:00:15 1.6 +++ util.h 2002/01/06 17:04:36 1.7 @@ -41,14 +41,16 @@ void MyMemCpyChar(char *dest, const char *src, int numBytes); void MyMemSet(u32 *dest, const u32 wordToWrite, int numWords); -int strncmp(const char *s1, const char *s2, int maxlen); +void *memcpy(void *dest, const void *src, size_t n); + +int strncmp(const char *s1, const char *s2, size_t maxlen); int strlen(const char *s); -char *strncpy(char *dest, const char *src, int n); +char *strncpy(char *dest, const char *src, size_t n); /* same as strncpy(), but also null terminates the string */ -char *strlcpy(char *dest, const char *src, int n); +char *strlcpy(char *dest, const char *src, size_t n); /* convert a string to an u32 value */ int strtou32(const char *str, u32 *value); Index: types.h =================================================================== RCS file: /cvsroot/blob/blob/include/blob/types.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- types.h 2001/10/07 15:17:49 1.1 +++ types.h 2002/01/06 17:04:36 1.2 @@ -34,9 +34,15 @@ #ifndef BLOB_TYPES_H #define BLOB_TYPES_H +typedef signed long s32; +typedef signed short s16; +typedef signed char s8; + typedef unsigned long u32; typedef unsigned short u16; typedef unsigned char u8; + +typedef u32 size_t; /* number of nibbles in a word */ #define NIBBLES_PER_WORD (8) |