dirfunc.c