4.1cBSD/usr/src/bin/pwd.c

Compare this file to the similar file:
Show the results in this format:

static char *sccsid = "@(#)pwd.c	4.4 (Berkeley) 1/5/83";
/*
 * 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);
}