2 Stick two directories and a file name together. */
10 zsappend3 (zdir1, zdir2, zfile)
15 size_t cdir1, cdir2, cfile;
18 cdir1 = strlen (zdir1);
19 cdir2 = strlen (zdir2);
20 cfile = strlen (zfile);
21 zret = zbufalc (cdir1 + cdir2 + cfile + 3);
22 if (cdir1 == 1 && *zdir1 == '/')
25 memcpy (zret, zdir1, cdir1);
26 memcpy (zret + cdir1 + 1, zdir2, cdir2);
27 memcpy (zret + cdir1 + cdir2 + 2, zfile, cfile);
29 zret[cdir1 + cdir2 + 1] = '/';
30 zret[cdir1 + cdir2 + cfile + 2] = '\0';