build XEQTDIR at runtime instead of compiletime
authorRick Adams <rick@ucbvax.Berkeley.EDU>
Thu, 25 Feb 1988 12:01:36 +0000 (04:01 -0800)
committerRick Adams <rick@ucbvax.Berkeley.EDU>
Thu, 25 Feb 1988 12:01:36 +0000 (04:01 -0800)
SCCS-vsn: usr.bin/uucp/libuu/subdir.c 5.5

usr/src/usr.bin/uucp/libuu/subdir.c

index f767fcb..f7a9b79 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)subdir.c   5.4 (Berkeley) %G%";
+static char sccsid[] = "@(#)subdir.c   5.5 (Berkeley) %G%";
 #endif
 
 #include "uucp.h"
 #endif
 
 #include "uucp.h"
@@ -95,6 +95,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 +103,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;
 }