cw.c: move declarations closer to usage.