summaryrefslogtreecommitdiff
path: root/src/user/include/knob/block.h
blob: f77709dcf7654b1988a3506b239400af9077f5e7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef KNOB_BLOCK_H
#define KNOB_BLOCK_H

#include <stdbool.h>
#include <stdint.h>

void blockcpy(void *to, const void *from, uint32_t size);
bool blockequ(const void *a, const void *b, uint32_t size) __attribute__ ((__pure__));

//returns length without null-terminator
uint32_t strcpy(char *to, const char *from);

//allocates new memory
char *strdup(const char *from);

//without null-terminator
uint32_t strlen(const char *str) __attribute__ ((pure));

bool strequ(const char *a, const char *b) __attribute__ ((pure));

#endif