33a5eae26b97d4f4124ea405f07d3f92aef9c64d
* Copyright (c) 1991, 1993, 1994
* The Regents of the University of California. All rights reserved.
* %sccs.include.redist.c%
static char copyright
[] =
"@(#) Copyright (c) 1991, 1993, 1994\n\
The Regents of the University of California. All rights reserved.\n";
static char sccsid
[] = "@(#)pwd.c 8.2 (Berkeley) %G%";
* Flags for pwd are a bit strange. The POSIX 1003.2B/D9 document
* has an optional -P flag for physical, which is what this program
* will produce by default. The logical flag, -L, should fail, as
* there's no way to display a logical path after forking. We don't
* document either flag, only adding -P for future portability.
while ((ch
= getopt(argc
, argv
, "P")) != EOF
)
if ((p
= getcwd(NULL
, 0)) == NULL
)
(void)fprintf(stderr
, "usage: pwd\n");