pfunc.c for master