+ * NOTE:
+ * the old calling sequence was versys(name) but is
+ * now versys(&name) so that we can perform aliasing!!!!
+ * See accompanying changes in uucp.c and uux.c
+ * -- Ray Essick, April 27, 1984
+ */
+versys(nameptr)
+register char **nameptr;
+{
+ register FILE *fp;
+ char line[BUFSIZ];
+ char *name;
+
+ DEBUG (11, "Before Alias: %s\n", *nameptr);
+ uualias (nameptr); /* alias expansion */
+ DEBUG (11, "After Alias: %s\n", *nameptr);
+ name = *nameptr; /* dereference */
+
+ if (strncmp(name, Myname, MAXBASENAME) == 0)
+ return SUCCESS;
+
+ fp = fopen(SYSFILE, "r");
+ ASSERT(fp != NULL, CANTOPEN, SYSFILE, 0);
+ PhoneNumber[0] = '\0';
+ while (cfgets(line, sizeof(line), fp) != NULL) {
+ char *targs[100];
+
+ getargs(line, targs, 100);
+ if (strncmp(name, targs[0], MAXBASENAME) == SAME) {
+ fclose(fp);
+ strncpy(PhoneNumber, targs[F_PHONE], MAXPH);
+ return SUCCESS;
+ }
+ }
+ fclose(fp);
+ return FAIL;
+}
+
+/*
+ * Works (sort of) like rhost(3) on 4.1[abc] Bsd systems.
+ *
+ * Looks for the host in the L.aliases file and returns the
+ * "standard" name by modifying the pointer. The returned
+ * value is saved with malloc(3) so it isn't zapped by
+ * subsequent calls.
+ *
+ * Returns:
+ * FAIL No L.aliases file
+ * SUCCESS Anything else