mirror of
https://github.com/0Nera/BMOSP.git
synced 2024-12-22 14:02:34 +03:00
Исправление типизации
This commit is contained in:
parent
f218333bd0
commit
709116f554
@ -76,7 +76,7 @@ typedef struct {
|
||||
sys_info_t *(*get_info)( );
|
||||
module_info_t *(*get_module)(char *module_id);
|
||||
module_info_t *(*mod_list_get)(uint64_t *count);
|
||||
uint64_t (*new_thread)(uint64_t func);
|
||||
uint64_t (*new_thread)(void *func);
|
||||
void (*delete_thread)( );
|
||||
time_t (*get_time)( );
|
||||
} __attribute__((packed)) env_t;
|
||||
|
@ -167,7 +167,7 @@ char *strchr(char *str, char c) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int strcmp(const char *s1, const char *s2) {
|
||||
int strcmp(char *s1, char *s2) {
|
||||
while (*s1 == *s2) {
|
||||
if (*s1 == '\0') { return 0; }
|
||||
s1++;
|
||||
@ -214,7 +214,7 @@ size_t count_chars(char *str, char c) {
|
||||
return count;
|
||||
}
|
||||
|
||||
uint64_t str_contains(const char *str, const char *substr) {
|
||||
uint64_t str_contains(char *str, char *substr) {
|
||||
uint64_t str_len = strlen(str);
|
||||
uint64_t substr_len = strlen(substr);
|
||||
|
||||
@ -247,7 +247,7 @@ void *memset(void *ptr, uint8_t n, size_t size) {
|
||||
|
||||
void *memmove(void *dest, void *src, size_t n) {
|
||||
char *d = (char *)dest;
|
||||
const char *s = (const char *)src;
|
||||
char *s = (char *)src;
|
||||
|
||||
if (d > s) {
|
||||
// копирование с конца массива, чтобы предотвратить перекрытие
|
||||
|
@ -18,11 +18,11 @@ size_t strcspn(char *str, char *reject);
|
||||
char *strtok(char *str, char *delim);
|
||||
size_t strtol(char *str, char **endptr, int64_t base);
|
||||
char *strchr(char *str, char c);
|
||||
int strcmp(const char *s1, const char *s2);
|
||||
int strcmp(char *s1, char *s2);
|
||||
char *trstr(char *str, char sym);
|
||||
char *strdup(char *str);
|
||||
size_t count_chars(char *str, char c);
|
||||
uint64_t str_contains(const char *str, const char *substr);
|
||||
uint64_t str_contains(char *str, char *substr);
|
||||
void memcpy(void *dest, void *src, size_t n);
|
||||
void *memset(void *ptr, uint8_t n, size_t size);
|
||||
void *memmove(void *dest, void *src, size_t n);
|
||||
|
Loading…
Reference in New Issue
Block a user