1 /* 2 * Copyright (C) 1991, 1992 Linus Torvalds 3 * Copyright (C) 2004 Tobias Lorenz 4 * 5 * string handling functions 6 * based on linux/include/linux/ctype.h 7 * and linux/include/linux/string.h 8 * 9 * This program is free software; you can redistribute it and/or modify 10 * it under the terms of the GNU General Public License version 2 as 11 * published by the Free Software Foundation. 12 */ 13 14 FILE_LICENCE ( GPL2_ONLY ); 15 16 #ifndef ETHERBOOT_STRING_H 17 #define ETHERBOOT_STRING_H 18 19 #include <stddef.h> 20 #include <bits/string.h> 21 22 int __pure strnicmp(const char *s1, const char *s2, size_t len) __nonnull; 23 char * strcpy(char * dest,const char *src) __nonnull; 24 char * strncpy(char * dest,const char *src,size_t count) __nonnull; 25 char * strcat(char * dest, const char * src) __nonnull; 26 char * strncat(char *dest, const char *src, size_t count) __nonnull; 27 int __pure strcmp(const char * cs,const char * ct) __nonnull; 28 int __pure strncmp(const char * cs,const char * ct, 29 size_t count) __nonnull; 30 char * __pure strchr(const char * s, int c) __nonnull; 31 char * __pure strrchr(const char * s, int c) __nonnull; 32 size_t __pure strlen(const char * s) __nonnull; 33 size_t __pure strnlen(const char * s, size_t count) __nonnull; 34 size_t __pure strspn(const char *s, const char *accept) __nonnull; 35 size_t __pure strcspn(const char *s, const char *reject) __nonnull; 36 char * __pure strpbrk(const char * cs,const char * ct) __nonnull; 37 char * strtok(char * s,const char * ct) __nonnull; 38 char * strsep(char **s, const char *ct) __nonnull; 39 void * memset(void * s,int c,size_t count) __nonnull; 40 void * memmove(void * dest,const void *src,size_t count) __nonnull; 41 int __pure memcmp(const void * cs,const void * ct, 42 size_t count) __nonnull; 43 void * __pure memscan(const void * addr, int c, size_t size) __nonnull; 44 char * __pure strstr(const char * s1,const char * s2) __nonnull; 45 void * __pure memchr(const void *s, int c, size_t n) __nonnull; 46 char * __malloc strdup(const char *s) __nonnull; 47 char * __malloc strndup(const char *s, size_t n) __nonnull; 48 49 extern const char * __pure strerror ( int errno ); 50 51 #endif /* ETHERBOOT_STRING */ 52