Sha256: 67b546fd133308e18ec4048716ca39a0d86c613e4c01286b2450aada9ed9a0f3

Contents?: true

Size: 438 Bytes

Versions: 3

Compression:

Stored size: 438 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);

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

#endif /* UTIL_H */

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mockspotify-0.1.9 src/util.h
mockspotify-0.1.8 src/util.h
mockspotify-0.1.7 src/util.h