scpatch1.c: initial