mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-12-21 03:03:05 +00:00
5560190b36
These functions will be used to skip over parts not supported by A7-A11 SoCs. Signed-off-by: Nick Chan <towinchenmi@gmail.com>
40 lines
997 B
C
40 lines
997 B
C
/* SPDX-License-Identifier: MIT */
|
|
|
|
#ifndef STRING_H
|
|
#define STRING_H
|
|
|
|
#include <stddef.h>
|
|
|
|
void *memcpy(void *s1, const void *s2, size_t n);
|
|
void *memmove(void *s1, const void *s2, size_t n);
|
|
int memcmp(const void *s1, const void *s2, size_t n);
|
|
void *memset(void *s, int c, size_t n);
|
|
void *memchr(const void *s, int c, size_t n);
|
|
char *strcpy(char *s1, const char *s2);
|
|
char *strncpy(char *s1, const char *s2, size_t n);
|
|
int strcmp(const char *s1, const char *s2);
|
|
int strncmp(const char *s1, const char *s2, size_t n);
|
|
size_t strlen(const char *s);
|
|
size_t strnlen(const char *s, size_t n);
|
|
char *strchr(const char *s, int c);
|
|
char *strrchr(const char *s, int c);
|
|
char *strstr(const char *s1, const char *s2);
|
|
long atol(const char *s);
|
|
|
|
static inline int tolower(int c)
|
|
{
|
|
if (c >= 'A' && c <= 'Z')
|
|
return c - 'A' + 'a';
|
|
else
|
|
return c;
|
|
}
|
|
|
|
static inline int toupper(int c)
|
|
{
|
|
if (c >= 'a' && c <= 'z')
|
|
return c - 'a' + 'A';
|
|
else
|
|
return c;
|
|
}
|
|
|
|
#endif
|