boot2

Playing with the boostrap
git clone https://git.ryansepassi.com/git/boot2.git
Log | Files | Refs | README

string.h (2204B)


      1 /* -*-comment-start: "//";comment-end:""-*-
      2  * GNU Mes --- Maxwell Equations of Software
      3  * Copyright © 2017,20225 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 
     23 #if SYSTEM_LIBC
     24 #ifndef _GNU_SOURCE
     25 #define _GNU_SOURCE
     26 #endif
     27 #undef __MES_STRING_H
     28 #include_next <string.h>
     29 
     30 #else // ! SYSTEM_LIBC
     31 
     32 #include <sys/types.h>
     33 
     34 void *memchr (void const *block, int c, size_t size);
     35 void *memcpy (void *dest, void const *src, size_t n);
     36 void *memmove (void *dest, void const *src, size_t n);
     37 void *memset (void *s, int c, size_t n);
     38 int memcmp (void const *s1, void const *s2, size_t n);
     39 void *memmem (void const *haystack, int haystack_len, void const *needle, int needle_len);
     40 char *strcat (char *dest, char const *src);
     41 char *strchr (char const *s, int c);
     42 int strcasecmp (char const *s1, char const *s2);
     43 int strcmp (char const *, char const *);
     44 char *strcpy (char *dest, char const *src);
     45 size_t strcspn (char const *string, char const *stopset);
     46 size_t strlen (char const *);
     47 char *strncat (char *to, char const *from, size_t size);
     48 char *strncpy (char *to, char const *from, size_t size);
     49 int strncmp (char const *, char const *, size_t);
     50 char *strpbrk (char const *string, char const *stopset);
     51 char *strrchr (char const *s, int c);
     52 size_t strspn (char const *string, char const *skipset);
     53 char *strstr (char const *haystack, char const *needle);
     54 char *strlwr (char *string);
     55 char *strupr (char *string);
     56 
     57 
     58 char *strerror (int errnum);
     59 
     60 #endif // ! SYSTEM_LIBC
     61 
     62 #endif // __MES_STRING_H