Home
       newitem.c - scc - simple c99 compiler
  HTML git clone git://git.simple-cc.org/scc
   DIR Log
   DIR Files
   DIR Refs
   DIR Submodules
   DIR README
   DIR LICENSE
       ---
       newitem.c (251B)
       ---
            1 #include <scc/scc.h>
            2 
            3 void
            4 newitem(struct items *items, char *item)
            5 {
            6         if ((items->n + 1) < items->n)
            7                 die("overflow in newitem (%u + 1)", items->n);
            8 
            9         items->s = xrealloc(items->s, (items->n + 1) * sizeof(char **));
           10         items->s[items->n++] = item;
           11 }
           12