aboutsummaryrefslogtreecommitdiffstats
path: root/gnu/libexec/uucp/libunix/app4.c
diff options
context:
space:
mode:
authorsvn2git <svn2git@FreeBSD.org>1994-05-01 00:00:00 -0800
committersvn2git <svn2git@FreeBSD.org>1994-05-01 00:00:00 -0800
commita16f65c7d117419bd266c28a1901ef129a337569 (patch)
tree2626602f66dc3551e7a7c7bc9ad763c3bc7ab40a /gnu/libexec/uucp/libunix/app4.c
parent8503f4f13f77abf7adc8f7e329c6f9c1d52b6a20 (diff)
downloadsrc-a16f65c7d117419bd266c28a1901ef129a337569.tar.gz
src-a16f65c7d117419bd266c28a1901ef129a337569.zip
Release FreeBSD 1.1release/1.1.0_cvs
This commit was manufactured to restore the state of the 1.1-RELEASE image. Releases prior to 5.3-RELEASE are omitting the secure/ and crypto/ subdirs.
Diffstat (limited to 'gnu/libexec/uucp/libunix/app4.c')
-rw-r--r--gnu/libexec/uucp/libunix/app4.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/gnu/libexec/uucp/libunix/app4.c b/gnu/libexec/uucp/libunix/app4.c
new file mode 100644
index 000000000000..a3b3787f68fd
--- /dev/null
+++ b/gnu/libexec/uucp/libunix/app4.c
@@ -0,0 +1,33 @@
+/* app4.c
+ Stick three directories and a file name together. */
+
+#include "uucp.h"
+
+#include "uudefs.h"
+#include "sysdep.h"
+
+char *
+zsappend4 (zdir1, zdir2, zdir3, zfile)
+ const char *zdir1;
+ const char *zdir2;
+ const char *zdir3;
+ const char *zfile;
+{
+ size_t cdir1, cdir2, cdir3, cfile;
+ char *zret;
+
+ cdir1 = strlen (zdir1);
+ cdir2 = strlen (zdir2);
+ cdir3 = strlen (zdir3);
+ cfile = strlen (zfile);
+ zret = zbufalc (cdir1 + cdir2 + cdir3 + cfile + 4);
+ memcpy (zret, zdir1, cdir1);
+ memcpy (zret + cdir1 + 1, zdir2, cdir2);
+ memcpy (zret + cdir1 + cdir2 + 2, zdir3, cdir3);
+ memcpy (zret + cdir1 + cdir2 + cdir3 + 3, zfile, cfile);
+ zret[cdir1] = '/';
+ zret[cdir1 + cdir2 + 1] = '/';
+ zret[cdir1 + cdir2 + cdir3 + 2] = '/';
+ zret[cdir1 + cdir2 + cdir3 + cfile + 3] = '\0';
+ return zret;
+}