shithub: widget

ref: 1d84452255fa2d3c41ac2596f39d61d7e3b27b12
dir: /libwidget/w-internal.h/

View raw version
static void*
emalloc(ulong sz)
{
	void *p;

	p = malloc(sz);
	if(p == nil)
		werror("malloc: %r");
	setmalloctag(p, getcallerpc(&sz));
	return p;
}

static void*
emallocz(ulong sz, int clr)
{
	void *p;

	p = mallocz(sz, clr);
	if(p == nil)
		werror("mallocz: %r");
	setmalloctag(p, getcallerpc(&sz));
	return p;
}

/* Widgetctl->flags */
enum
{
	OURKBD		= 1<<0,
	OURMOUSE	= 1<<1
};