4.3BSD/usr/contrib/spms/src/lib/libspms/test/getpwdir.a

!<arch>
Igetpwdir       418696296   968   27    100644  29        `
/
/usr/spool/uucppublic
/etc

Ogetpwdir       418696296   968   27    100644  51        `
root
uucp
can't find /etc directory in /etc/passwd

Tgetpwdir.c     418696298   968   27    100644  530       `
/*
 * gethdir()
 */
#include <pwd.h>
#include <stdio.h>
#include "path.h"

char *PGN = "Tgetpwdir";		/* program name */

main()
{
	char *gets();			/* get line from stdin */
	char dir[PATHSIZE];		/* home directory */
	struct passwd *getpwdir();	/* get passwd struct for dir */
	struct passwd *pw;		/* pointer to passwd struct */

	while (gets(dir) != NULL)
		{
		if ((pw = getpwdir(dir)) != NULL)
			printf("%s\n", pw->pw_name);
		else
			printf("can't find %s directory in /etc/passwd\n", dir);
		fflush(stdout);
		}
	exit(0);
}