add gnerate.c and renamed p1