Annotation of coherent/g/usr/lib/uucp/tay104/unix/sindir.c, revision 1.1

1.1     ! root        1: /* sindir.c
        !             2:    Stick a directory and file name together.  */
        !             3: 
        !             4: #include "uucp.h"
        !             5: 
        !             6: #include "uudefs.h"
        !             7: #include "sysdep.h"
        !             8: #include "system.h"
        !             9: 
        !            10: char *
        !            11: zsysdep_in_dir (zdir, zfile)
        !            12:      const char *zdir;
        !            13:      const char *zfile;
        !            14: {
        !            15:   size_t cdir, cfile;
        !            16:   char *zret;
        !            17: 
        !            18:   cdir = strlen (zdir);
        !            19:   cfile = strlen (zfile);
        !            20:   zret = zbufalc (cdir + cfile + 2);
        !            21:   memcpy (zret, zdir, cdir);
        !            22:   memcpy (zret + cdir + 1, zfile, cfile);
        !            23:   zret[cdir] = '/';
        !            24:   zret[cdir + cfile + 1] = '\0';
        !            25:   return zret;
        !            26: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.