> extern /*@falseexit@*/ void check (bool x); > # define check(x) \ > do { bool m_res = x; assert (m_res); } while (FALSE) >
< eref er; < employee e;
> # include <assert.h>
< hire(e); --- > check (hire(e) == db_OK);
< int i; --- > size_t i;
< constant int maxEmployeeName; --- > imports <stdio> ; > > constant size_t maxEmployeeName;
< eref er; <
> /*@-mods@*/
> /*@=mods@*/
> /*@-mods@*/
> /*@=mods@*/
< employee e;
> /*@-mods@*/
> /*@=mods@*/
> static size_t int_toSize (int x) > { > if (x < 0) > { > fprintf (stderr, "Error: int_toSize is negative: %d", x); > return 0; > } > else > { > size_t s = (size_t) x; > > if ((int) s != x) > { > fprintf (stderr, "Error: int_toSize is inconsistent: %d", x); > return 0; > } > > return s; > } > } >
< if (tmpc->val == er) return TRUE; --- > if (eref_equal (tmpc->val, er)) return TRUE;
< if (elem->val == er) --- > if (eref_equal (elem->val, er))
< malloc (erc_size (c) * (employeePrintSize + 1) + 1); --- > malloc (int_toSize (erc_size (c) * (employeePrintSize + 1) + 1));
> /*@-mods@*/
> /*@=mods@*/
> /*@-mods@*/
< if (employee_equal (&e, &e1)) return er; --- > if (employee_equal (&e, &e1)) > { > erc_iterReturn (it, er);
> } > /*@=mods@*/