libqaeda

Unnamed repository; edit this file 'description' to name the repository.
Info | Log | Files | Refs | README | LICENSE

std.c (496B)


      1 #include <string.h>
      2 #include <stdlib.h>
      3 #include <stddef.h>
      4 
      5 void* lq_alloc(size_t bytes) {
      6 	return malloc(bytes);
      7 }
      8 
      9 void lq_free(void *o) {
     10 	free(o);
     11 }
     12 
     13 int lq_cmp(const void *dst, const void *src, size_t len) {
     14 	return memcmp(dst, src, len);
     15 }
     16 
     17 void* lq_cpy(void *dst, const void *src, size_t len) {
     18 	return memcpy(dst, src, len);
     19 }
     20 
     21 void* lq_set(void *dst, const char b, size_t len) {
     22 	return memset(dst, (int)b, len);
     23 }
     24 
     25 void* lq_zero(void *dst, size_t len) {
     26 	return lq_set(dst, 0, len);
     27 }