8 c = (erc) malloc (sizeof (ercInfo));
12 printf ("Malloc returned null in erc_create\n");
21 void erc_clear (erc c) /*@ensures isnull c->vals, c->elem@*/
26 for (elem = c->vals; elem != 0; elem = next)
28 next = elem->next; elem->next = NULL;
36 void erc_final (erc c)
42 bool erc_member (eref er, erc c)
46 for (tmpc = c->vals; tmpc != 0; tmpc = tmpc->next)
47 if (tmpc->val == er) return TRUE;
52 void erc_insert (erc c, eref er)
55 newElem = (ercElem *) malloc (sizeof (ercElem));
59 printf ("Malloc returned null in erc_insert\n");
64 newElem->next = c->vals;
69 bool erc_delete (erc c, eref er)
74 for (prev = 0, elem = c->vals;
76 prev = elem, elem = elem->next)
81 c->vals = elem->next; elem->next = 0;
83 prev->next = elem->next; elem->next = 0;
94 ercIter erc_iterStart (erc c)
98 result = (ercIter) malloc (sizeof (ercList));
102 printf ("Malloc returned null in erc_iterStart\n");
110 eref erc_yield (ercIter it)
125 void erc_join (erc c1, erc c2)
129 for (tmpc = c2->vals; tmpc != 0; tmpc = tmpc->next)
130 erc_insert (c1, tmpc->val);
133 char *erc_sprint (erc c)
141 malloc (erc_size (c) * (employeePrintSize + 1) + 1);
145 printf ("Malloc returned null in erc_sprint\n");
151 for_ercElems (er, it, c)
153 employee_sprint (&(result[len]), eref_get (er));
154 len += employeePrintSize;
155 result[len++] = '\n';