A tiling window manager
1/*
2 * This program is free software; you can redistribute it and/or modify it
3 * under the terms of the GNU General Public License as published by the Free
4 * Software Foundation; either version 2 of the License, or (at your option)
5 * any later version.
6 *
7 * This program is distributed in the hope that it will be useful, but WITHOUT
8 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
10 * more details.
11 *
12 * You should have received a copy of the GNU General Public License along with
13 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
14 * Place, Suite 330, Boston, MA 02111-1307 USA.
15 */
16
17#ifndef UTIL_H
18#define UTIL_H
19
20#ifndef __dead
21#define __dead __attribute__((__noreturn__))
22#endif
23
24__dead void fatal(const char *msg);
25void *xmalloc(size_t size);
26void *xrealloc(void *ptr, size_t size);
27char *xstrdup(const char *s);
28char *xvsprintf(char *fmt, va_list ap);
29char *xsprintf(char *fmt,...);
30char *strtok_ws(char *s);
31int str_comp(char *s1, char *s2, size_t len);
32
33#endif