#include "def.h" static char refdir[DIRLEN]; void savedir(void) { if (refdir[0] == 0) corout ("", refdir, "/bin/pwd", "", DIRLEN); trimnl(refdir); } void restodir(void) { if (chdir(refdir) < 0) err("can't chdir to %s", refdir); }