small program to refactor c/cpp source for testing