garbeam@2: /* garbeam@2: * (C)opyright MMVI Anselm R. Garbe garbeam@2: * See LICENSE file for license details. garbeam@2: */ garbeam@5: #include garbeam@2: garbeam@3: extern void error(char *errstr, ...); garbeam@3: extern void *emallocz(unsigned int size); garbeam@3: extern void *emalloc(unsigned int size); garbeam@3: extern void *erealloc(void *ptr, unsigned int size); garbeam@3: extern char *estrdup(const char *str); garbeam@3: #define eassert(a) do { \ garbeam@3: if(!(a)) \ garbeam@3: failed_assert(#a, __FILE__, __LINE__); \ garbeam@3: } while (0) garbeam@5: extern void failed_assert(char *a, char *file, int line); garbeam@5: extern void swap(void **p1, void **p2); garbeam@5: extern void spawn(Display *dpy, const char *shell, const char *cmd);