1993-08-04 23:30:29 +04:00
|
|
|
/* sindir.c
|
|
|
|
Stick a directory and file name together. */
|
|
|
|
|
|
|
|
#include "uucp.h"
|
|
|
|
|
|
|
|
#include "uudefs.h"
|
|
|
|
#include "sysdep.h"
|
|
|
|
#include "system.h"
|
|
|
|
|
|
|
|
char *
|
|
|
|
zsysdep_in_dir (zdir, zfile)
|
|
|
|
const char *zdir;
|
|
|
|
const char *zfile;
|
|
|
|
{
|
|
|
|
size_t cdir, cfile;
|
|
|
|
char *zret;
|
|
|
|
|
|
|
|
cdir = strlen (zdir);
|
|
|
|
cfile = strlen (zfile);
|
|
|
|
zret = zbufalc (cdir + cfile + 2);
|
1994-10-25 01:17:41 +03:00
|
|
|
if (cdir == 1 && *zdir == '/')
|
|
|
|
cdir = 0;
|
|
|
|
else
|
|
|
|
memcpy (zret, zdir, cdir);
|
1993-08-04 23:30:29 +04:00
|
|
|
memcpy (zret + cdir + 1, zfile, cfile);
|
|
|
|
zret[cdir] = '/';
|
|
|
|
zret[cdir + cfile + 1] = '\0';
|
|
|
|
return zret;
|
|
|
|
}
|