iPXE
string.h
Go to the documentation of this file.
00001 #ifndef _STRING_H
00002 #define _STRING_H
00003 
00004 /** @file
00005  *
00006  * String functions
00007  *
00008  */
00009 
00010 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
00011 
00012 #include <stddef.h>
00013 
00014 extern void * generic_memset ( void *dest, int character,
00015                                size_t len ) __nonnull;
00016 extern void * generic_memcpy ( void *dest, const void *src,
00017                                size_t len ) __nonnull;
00018 extern void * generic_memmove ( void *dest, const void *src,
00019                                 size_t len ) __nonnull;
00020 
00021 #include <bits/string.h>
00022 
00023 /* Architecture-specific code is expected to provide these functions,
00024  * but may instead explicitly choose to use the generic versions.
00025  */
00026 void * memset ( void *dest, int character, size_t len ) __nonnull;
00027 void * memcpy ( void *dest, const void *src, size_t len ) __nonnull;
00028 void * memmove ( void *dest, const void *src, size_t len ) __nonnull;
00029 
00030 extern int __pure memcmp ( const void *first, const void *second,
00031                            size_t len ) __nonnull;
00032 extern void * __pure memchr ( const void *src, int character,
00033                               size_t len ) __nonnull;
00034 extern void * memswap ( void *dest, void *src, size_t len ) __nonnull;
00035 extern int __pure strcmp ( const char *first, const char *second ) __nonnull;
00036 extern int __pure strncmp ( const char *first, const char *second,
00037                             size_t max ) __nonnull;
00038 extern size_t __pure strlen ( const char *src ) __nonnull;
00039 extern size_t __pure strnlen ( const char *src, size_t max ) __nonnull;
00040 extern char * __pure strchr ( const char *src, int character ) __nonnull;
00041 extern char * __pure strrchr ( const char *src, int character ) __nonnull;
00042 extern char * __pure strstr ( const char *haystack,
00043                               const char *needle ) __nonnull;
00044 extern char * strcpy ( char *dest, const char *src ) __nonnull;
00045 extern char * strncpy ( char *dest, const char *src, size_t max ) __nonnull;
00046 extern char * strcat ( char *dest, const char *src ) __nonnull;
00047 extern char * __malloc strdup ( const char *src ) __nonnull;
00048 extern char * __malloc strndup ( const char *src, size_t max ) __nonnull;
00049 extern char * __pure strpbrk ( const char *string,
00050                                const char *delim ) __nonnull;
00051 extern char * strsep ( char **string, const char *delim ) __nonnull;
00052 
00053 extern char * __pure strerror ( int errno );
00054 
00055 #endif /* _STRING_H */