+# ifndef V6
+# ifndef SCCSDIR
+ register struct passwd *pw;
+ extern struct passwd *getpwnam();
+ char buf[100];
+
+ /* pull "SccsDir" out of the environment (possibly) */
+ p = getenv("PROJECT");
+ if (p != NULL && p[0] != '\0')
+ {
+ if (p[0] == '/')
+ SccsDir = p;
+ else
+ {
+ pw = getpwnam(p);
+ if (pw == NULL)
+ {
+ usrerr("user %s does not exist", p);
+ exit(EX_USAGE);
+ }
+ strcpy(buf, pw->pw_dir);
+ strcat(buf, "/src");
+ if (access(buf, 0) < 0)
+ {
+ strcpy(buf, pw->pw_dir);
+ strcat(buf, "/source");
+ if (access(buf, 0) < 0)
+ {
+ usrerr("project %s has no source!", p);
+ exit(EX_USAGE);
+ }
+ }
+ SccsDir = buf;
+ }
+ }
+# endif SCCSDIR
+# endif V6