clean up the interface between ncc.c, gen.c and out.c