shithub: scc

ref: eba17d80d42e07d4eb9176c66d1bbb3ee39e8d81
dir: /lib/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;
}