c_string.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. * c_string.h
  3. *
  4. * Definitions for memory and string functions.
  5. */
  6. #ifndef _C_STRING_H_
  7. #define _C_STRING_H_
  8. #include "c_stddef.h"
  9. #include "osapi.h"
  10. #ifndef NULL
  11. #define NULL 0
  12. #endif
  13. #define c_memcmp os_memcmp
  14. #define c_memcpy os_memcpy
  15. #define c_memset os_memset
  16. #define c_strcat os_strcat
  17. #define c_strchr os_strchr
  18. #define c_strcmp os_strcmp
  19. #define c_strcpy os_strcpy
  20. #define c_strlen os_strlen
  21. #define c_strncmp os_strncmp
  22. #define c_strncpy os_strncpy
  23. // #define c_strstr os_strstr
  24. #define c_strncasecmp c_strncmp
  25. #define c_strstr strstr
  26. #define c_strncat strncat
  27. #define c_strcspn strcspn
  28. #define c_strpbrk strpbrk
  29. #define c_strcoll strcoll
  30. #define c_strrchr strrchr
  31. // const char *c_strstr(const char * __s1, const char * __s2);
  32. // char *c_strncat(char * __restrict /*s1*/, const char * __restrict /*s2*/, size_t n);
  33. // size_t c_strcspn(const char * s1, const char * s2);
  34. // const char *c_strpbrk(const char * /*s1*/, const char * /*s2*/);
  35. // int c_strcoll(const char * /*s1*/, const char * /*s2*/);
  36. //
  37. extern size_t c_strlcpy(char *dst, const char *src, size_t siz);
  38. extern size_t c_strlcat(char *dst, const char *src, size_t siz);
  39. extern char *c_strdup(const char *src);
  40. #endif /* _C_STRING_H_ */