/* @(#)syskludge.c 4.1 (Berkeley) 1/1/83 */
* If a prefix is "xyz", for example,
* then any file Spool/xyz... is mapped to Spool/xyz/xyz... .
* The first prefix found is used, so D.foo should preceed D. in table.
* Should be tuned on a per-system basis.
* Each prefix must be a subdirectory of Spool, owned by uucp!
static char *prefix
[] = {
"D.", /* "D." subdirectory (remember the "."!) */
"C.", /* "C." subdirectory */
* filename mapping kludges to put uucp work files in other directories.
char fn1
[MAXPATHLEN
], fn2
[MAXPATHLEN
]; /* remapped filename areas */
char sfn
[MAXPATHLEN
]; /* most recent filename passed to chdir */
char *strcpy(), *strcat();
* return (possibly) remapped string s,
* using buffer area t if necessary.
/* if s begins with Spool/, copy that to t and advance s */
if (strncmp(s
, Spool
, n
= strlen(Spool
)) == 0 && s
[n
] == '/') {
/* look for first prefix which matches, and make subdirectory */
for (p
= &prefix
[0]; *p
; p
++) {
if (strncmp(s
, *p
, n
= strlen(*p
))==0 && s
[n
] && s
[n
] != '/') {