copy CommonStructInit & StructInit code into main.c