1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
15:
16: 17: 18: 19: 20: 21:
22:
23: #ifndef __LIBSTR_H__
24: #define __LIBSTR_H__
25:
26: #include <stdtype.h>
27:
28: #ifdef __cplusplus
29: extern "C" {
30: #endif
31:
32: #ifdef __size_t
33: typedef __size_t size_t;
34: #undef __size_t
35: #endif
36:
37: #ifdef __wchar_t
38: typedef __wchar_t wchar_t;
39: #undef __wchar_t
40: #endif
41:
42: #define NULL 0
43:
44: extern void* tkl_memset( void *s, int c, size_t n );
45: extern int tkl_memcmp( const void *s1, const void *s2, size_t n );
46: extern void* tkl_memcpy( void *dst, const void *src, size_t n );
47: extern void* tkl_memmove( void *dst, const void *src, size_t n );
48:
49: extern size_t tkl_strlen( const char *s );
50: extern int tkl_strcmp( const char *s1, const char *s2 );
51: extern char* tkl_strcpy( char *dst, const char *src );
52: extern char* tkl_strncpy( char *dst, const char *src, size_t n );
53: extern char* tkl_strcat( char *dst, const char *src );
54: extern char* tkl_strncat( char *dst, const char *src, size_t n );
55:
56: extern unsigned long int tkl_strtoul( const char *nptr, char **endptr, int base );
57:
58: #define MEMSET tkl_memset
59: #define MEMCMP tkl_memcmp
60: #define MEMCPY tkl_memcpy
61: #define MEMMOVE tkl_memmove
62: #define STRLEN tkl_strlen
63: #define STRCMP tkl_strcmp
64: #define STRCPY tkl_strcpy
65: #define STRNCPY tkl_strncpy
66: #define STRCAT tkl_strcat
67: #define STRNCAT tkl_strncat
68: #define STRTOUL tkl_strtoul
69:
70: 71:
72: #define use_libstr_memcpy_implicit 1
73:
74:
75: #define use_libstr_func_as_std 0
76:
77: #ifdef __cplusplus
78: }
79: #endif
80: #endif