shithub: scc

ref: 7422cf29d5bf6b0b5b8c4089e7dd0607299c4d2f
dir: /lib/cc/newitem.c/

View raw version
#include "../../inc/cc.h"

void
newitem(struct items *items, char *item)
{
	if ((items->n + 1) < items->n)
		die("newitem: overflow (%u + 1)", items->n);

	items->s = xrealloc(items->s, (items->n + 1) * sizeof(char **));
	items->s[items->n++] = item;
}