Sha256: ed9225fe9857e5fc8cef8099e7ce40214ba8a8ef8a0b64f7469f184019bdf0ca

Contents?: true

Size: 485 Bytes

Versions: 1

Compression:

Stored size: 485 Bytes

Contents

#ifndef UTIL_H
#define UTIL_H

/*** Utility functions ***/

#define ALLOC(type) ALLOC_N(type, 1)
#define ALLOC_N(type, n) ((type*) xmalloc(sizeof(type) * (n)))
#define MEMCPY(dst, src, type) MEMCPY_N(dst, src, type, 1)
#define MEMCPY_N(dst, src, type, n) (memcpy((dst), (src), sizeof(type) * (n)))
void *xmalloc(size_t);
char *hextoa(const char *, int);
void my_strncpy(char *, const char *, size_t);

#define STARTS_WITH(x, y) (strncmp((x), (y), strlen(y)) == 0)

#endif /* UTIL_H */

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mockspotify-0.2.0 ext/libmockspotify/src/util.h