51 *(dest_bytes++) = character;
68 *(dest_bytes++) = *(src_bytes++);
85 *(--dest_bytes) = *(--src_bytes);
120 diff = ( *(first_bytes++) - *(second_bytes++) );
138 for ( ;
len-- ; src_bytes++ ) {
139 if ( *src_bytes == character )
140 return ( (
void * ) src_bytes );
158 for ( ;
len-- ; first_bytes++, second_bytes++ ) {
160 *first_bytes = *second_bytes;
161 *second_bytes = temp;
191 for ( ;
max-- ; first_bytes++, second_bytes++ ) {
192 diff = ( *first_bytes - *second_bytes );
195 if ( ! *first_bytes )
226 for ( ;
max-- ; first_bytes++, second_bytes++ ) {
227 diff = (
toupper ( *first_bytes ) -
231 if ( ! *first_bytes )
259 while (
max-- && *(src_bytes++) )
274 for ( ; ; src_bytes++ ) {
275 if ( *src_bytes == character )
276 return ( (
char * ) src_bytes );
295 for ( src_bytes-- ; src_bytes >=
start ; src_bytes-- ) {
296 if ( *src_bytes == character )
297 return ( (
char * ) src_bytes );
309 char *
strstr (
const char *haystack,
const char *needle ) {
312 for ( ; *haystack ; haystack++ ) {
313 if (
memcmp ( haystack, needle,
len ) == 0 )
314 return ( (
char * ) haystack );
331 for ( ; ; src_bytes++, dest_bytes++ ) {
332 *dest_bytes = *src_bytes;
336 return ( (
char * ) dest_bytes );
364 for ( ;
max ;
max--, src_bytes++, dest_bytes++ ) {
365 *dest_bytes = *src_bytes;
370 *(dest_bytes++) =
'\0';
428 if ( character >=
'a' )
429 return ( character - (
'a' - 10 ) );
430 if ( character >=
'A' )
431 return ( character - (
'A' - 10 ) );
432 if ( character <=
'9' )
433 return ( character -
'0' );
453 if ( *
string ==
'-' ) {
456 }
else if ( *
string ==
'+' ) {
463 if ( *
string ==
'0' ) {
466 if ( ( *
string & ~0x20 ) ==
'X' ) {
484 unsigned long strtoul (
const char *
string,
char **endp,
int base ) {
485 unsigned long value = 0;
493 for ( ; ;
string++ ) {
495 if ( digit >= (
unsigned int )
base )
506 *endp = ( (
char * )
string );
519 unsigned long long strtoull (
const char *
string,
char **endp,
int base ) {
520 unsigned long long value = 0;
528 for ( ; ;
string++ ) {
530 if ( digit >= (
unsigned int )
base )
541 *endp = ( (
char * )
string );
void * memswap(void *first, void *second, size_t len)
Swap memory regions.
unsigned long strtoul(const char *string, char **endp, int base)
Convert string to numeric value.
char * strrchr(const char *src, int character)
Find rightmost character within a string.
uint32_t first
First block in range.
unsigned long long strtoull(const char *string, char **endp, int base)
Convert string to numeric value.
int strcasecmp(const char *first, const char *second)
Compare case-insensitive strings.
int strncasecmp(const char *first, const char *second, size_t max)
Compare case-insensitive strings.
void * generic_memcpy(void *dest, const void *src, size_t len)
Copy memory region (forwards)
unsigned int digit_value(unsigned int character)
Calculate digit value.
int strncmp(const char *first, const char *second, size_t max)
Compare strings.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
void * memchr(const void *src, int character, size_t len)
Find character within a memory region.
uint32_t start
Starting offset.
static int toupper(int character)
Convert character to upper case.
char * strncpy(char *dest, const char *src, size_t max)
Copy string.
char * strstr(const char *haystack, const char *needle)
Find substring.
void * memcpy(void *dest, const void *src, size_t len) __nonnull
char * stpcpy(char *dest, const char *src)
Copy string.
pseudo_bit_t value[0x00020]
char * strcpy(char *dest, const char *src)
Copy string.
static const char * strtoul_pre(const char *string, int *negate, int *base)
Preprocess string for strtoul() or strtoull()
char * strchr(const char *src, int character)
Find character within a string.
void * generic_memcpy_reverse(void *dest, const void *src, size_t len)
Copy memory region (backwards)
char * strdup(const char *src)
Duplicate string.
int isspace(int character)
Check to see if character is a space.
size_t strlen(const char *src)
Get length of string.
size_t strnlen(const char *src, size_t max)
Get length of string.
void * malloc(size_t size)
Allocate memory.
int strcmp(const char *first, const char *second)
Compare strings.
if(len >=6 *4) __asm__ __volatile__("movsl" if(len >=5 *4) __asm__ __volatile__("movsl" if(len >=4 *4) __asm__ __volatile__("movsl" if(len >=3 *4) __asm__ __volatile__("movsl" if(len >=2 *4) __asm__ __volatile__("movsl" if(len >=1 *4) __asm__ __volatile__("movsl" if((len % 4) >=2) __asm__ __volatile__("movsw" if((len % 2) >=1) __asm__ __volatile__("movsb" return dest
void * generic_memmove(void *dest, const void *src, size_t len)
Copy (possibly overlapping) memory region.
char * strndup(const char *src, size_t max)
Duplicate string.
char * strcat(char *dest, const char *src)
Concatenate string.
int memcmp(const void *first, const void *second, size_t len)
Compare memory regions.
#define NULL
NULL pointer (VOID *)
static __always_inline int off_t userptr_t second
void * generic_memset(void *dest, int character, size_t len)
Fill memory region.