aboutsummaryrefslogtreecommitdiff
path: root/arch/all/core/include/strings.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/all/core/include/strings.h')
-rw-r--r--arch/all/core/include/strings.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/arch/all/core/include/strings.h b/arch/all/core/include/strings.h
new file mode 100644
index 0000000..749c1b5
--- /dev/null
+++ b/arch/all/core/include/strings.h
@@ -0,0 +1,68 @@
+/* ****************************************************************************
+ * strings.h -- BSD-compatible string utilities.
+ * Copyright (C) 2017 Thomas "Cakeisalie5" Touhey <thomas@touhey.fr>
+ *
+ * This file is part of the 'all/core' module in libcarrot, an experimental
+ * modular libc project.
+ *
+ * This file is governed by the CeCILL-C license under French law and abiding
+ * by the rules of distribution of free software. You can use, modify and or
+ * redistribute it under the terms of the CeCILL-C license as circulated by
+ * CEA, CNRS and INRIA at the following URL: http://www.cecill.info
+ *
+ * As a counterpart to the access to the source code and rights to copy, modify
+ * and redistribute granted by the license, users are provided only with a
+ * limited warranty and the software's author, the holder of the economic
+ * rights, and the successive licensors have only limited liability.
+ *
+ * In this respect, the user's attention is drawn to the risks associated with
+ * loading, using, modifying and/or developing and reproducing the software by
+ * the user in light of its specific status of free software, that may mean
+ * that it is complicated to manipulate, and that also therefore means that it
+ * is reserved for developers and experienced professionals having in-depth
+ * computer knowledge. Users are therefore encouraged to load and test the
+ * software's suitability as regards their requirements in conditions enabling
+ * the security of their systems and/or data to be ensured and, more generally,
+ * to use and operate it in the same conditions as regards security.
+ *
+ * The fact that you are presently reading this means you have had knowledge of
+ * the CeCILL-C license and that you accept its terms.
+ * ************************************************************************* */
+#include <cdefs.h>
+#include <stddef.h>
+#include <locale.h>
+__BEGIN_DECLS
+__BEGIN_NAMESPACE_STD
+
+/* BSD-style string functions. */
+
+extern __nonnull(1, __s1) __nonnull(2, __s2)
+int bcmp _OF((const void *__s1, const void *__s2, size_t __len));
+
+extern __nonnull(1, __src) __nonnull(2, __dst)
+void bcopy _OF((const void *__src, void *__dst, size_t __len));
+
+extern __nonnull(1, __s)
+void bzero _OF((void *__s, size_t __len));
+
+extern __pure int ffs _OF((int __word));
+
+extern __nonnull(1, __s) char* index _OF((const char *__s, int __ch));
+
+extern __nonnull(1, __s) char* rindex _OF((const char *__s, int __ch));
+
+extern __nonnull(1, __s1) __nonnull(2, __s2)
+int strcasecmp _OF((const char *__s1, const char *__s2));
+
+extern __nonnull(1, __s1) __nonnull(2, __s2)
+int strcasecmp_l _OF((const char *__s1, const char *__s2, locale_t __loc));
+
+extern __nonnull(1, __s1) __nonnull(2, __s2)
+int strncasecmp _OF((const char *__s1, const char *__s2, size_t __len));
+
+extern __nonnull(1, __s1) __nonnull(2, __s2)
+int strncasecmp_l _OF((const char *__s1, const char *__s2, size_t __len,
+ locale_t __loc));
+
+__END_NAMESPACE_STD
+__END_DECLS