BSD 4_4 release
[unix-history] / usr / src / usr.bin / uucp / libuu / subdir.c
index f767fcb..9cfac8d 100644 (file)
@@ -1,6 +1,15 @@
+/*-
+ * Copyright (c) 1985, 1993
+ *     The Regents of the University of California.  All rights reserved.
+ *
+ * This module is believed to contain source code proprietary to AT&T.
+ * Use and redistribution is subject to the Berkeley Software License
+ * Agreement and your Software Agreement with AT&T (Western Electric).
+ */
+
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)subdir.c   5.4 (Berkeley) %G%";
-#endif
+static char sccsid[] = "@(#)subdir.c   8.1 (Berkeley) 6/6/93";
+#endif /* not lint */
 
 #include "uucp.h"
 
 
 #include "uucp.h"
 
@@ -95,6 +104,7 @@ register char *s;
 /*
  * return possibly corrected directory for searching
  */
 /*
  * return possibly corrected directory for searching
  */
+static char xdir[BUFSIZ];
 char *
 subdir(d, pre)
 register char *d, pre;
 char *
 subdir(d, pre)
 register char *d, pre;
@@ -102,7 +112,11 @@ register char *d, pre;
        if (strcmp(d, Spool) == 0)
                if (pre == CMDPRE)
                        return CMDSDIR;
        if (strcmp(d, Spool) == 0)
                if (pre == CMDPRE)
                        return CMDSDIR;
-               else if (pre == XQTPRE)
-                       return XEQTDIR;
+               else if (pre == XQTPRE) {
+                       if (xdir[0] == '\0')
+                               sprintf(xdir,"%s/X.",Spool);
+                       return xdir;
+
+               }
        return d;
 }
        return d;
 }