1 /* 2 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 3 * Use is subject to license terms. 4 */ 5 6 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ 7 /* All Rights Reserved */ 8 9 /* 10 * Copyright (c) 1980 Regents of the University of California. 11 * All rights reserved. The Berkeley software License Agreement 12 * specifies the terms and conditions for redistribution. 13 */ 14 15 char refdir[50]; 16 17 extern int corout(); 18 extern char *trimnl(); 19 20 void 21 savedir(void) 22 { 23 if (refdir[0] == 0) 24 corout("", refdir, "/usr/bin/pwd", "", 50); 25 trimnl(refdir); 26 } 27 28 void 29 restodir(void) 30 { 31 chdir(refdir); 32 } 33