projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
first working version.
[unix-history]
/
usr
/
src
/
bin
/
pwd
/
pwd.c
static char
*
sccsid
=
"@(#)pwd.c 4.4 (Berkeley) %G%"
;
/*
* Print working (current) directory
*/
#include <stdio.h>
#include <sys/param.h>
char
*
getwd
();
main
()
{
char
pathname
[
MAXPATHLEN
+
1
];
if
(
getwd
(
pathname
) ==
NULL
) {
fprintf
(
stderr
,
"pwd: %s
\n
"
,
pathname
);
exit
(
1
);
}
printf
(
"%s
\n
"
,
pathname
);
exit
(
0
);
}