ccanlint: cleanup listing code, make print in topo order.