Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/src/cmd/refer/glue2.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#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);
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.