string.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* -*-comment-start: "//";comment-end:""-*-
  2. * GNU Mes --- Maxwell Equations of Software
  3. * Copyright © 2017 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
  4. *
  5. * This file is part of GNU Mes.
  6. *
  7. * GNU Mes is free software; you can redistribute it and/or modify it
  8. * under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 3 of the License, or (at
  10. * your option) any later version.
  11. *
  12. * GNU Mes is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with GNU Mes. If not, see <http://www.gnu.org/licenses/>.
  19. */
  20. #ifndef __MES_STRING_H
  21. #define __MES_STRING_H 1
  22. #if SYSTEM_LIBC
  23. #ifndef _GNU_SOURCE
  24. #define _GNU_SOURCE
  25. #endif
  26. #undef __MES_STRING_H
  27. #include_next <string.h>
  28. #else // ! SYSTEM_LIBC
  29. #include <sys/types.h>
  30. void *memchr (void const *block, int c, size_t size);
  31. void *memcpy (void *dest, void const *src, size_t n);
  32. void *memmove (void *dest, void const *src, size_t n);
  33. void *memset (void *s, int c, size_t n);
  34. void *memchr (void const *block, int c, size_t size);
  35. int memcmp (void const *s1, void const *s2, size_t n);
  36. void *memmem (void const *haystack, int haystack_len, void const *needle, int needle_len);
  37. char *strcat (char *dest, char const *src);
  38. char *strchr (char const *s, int c);
  39. int strcasecmp (char const *s1, char const *s2);
  40. int strcmp (char const *, char const *);
  41. char *strcpy (char *dest, char const *src);
  42. size_t strlen (char const *);
  43. char *strncpy (char *to, char const *from, size_t size);
  44. int strncmp (char const *, char const *, size_t);
  45. char *strrchr (char const *s, int c);
  46. char *strstr (char const *haystack, char const *needle);
  47. char *strlwr (char *string);
  48. char *strupr (char *string);
  49. char *strerror (int errnum);
  50. void perror (char const *message);
  51. #endif // ! SYSTEM_LIBC
  52. #endif // __MES_STRING_H