Annotation of 43BSD/ingres/source/gutil/ztack.c, revision 1.1

1.1     ! root        1: # include      <sccs.h>
        !             2: # include      <useful.h>
        !             3: 
        !             4: SCCSID(@(#)ztack.c     8.2     2/8/85)
        !             5: 
        !             6: /*
        !             7: **  LOCAL STRING CONCATENATE
        !             8: **     Strings `a' and `b' are concatenated and left in an
        !             9: **     internal buffer.  A pointer to that buffer is returned.
        !            10: **
        !            11: **     Ztack can be called recursively as:
        !            12: **             ztack(ztack(ztack(w, x), y), z);
        !            13: */
        !            14: 
        !            15: char *
        !            16: ztack(a, b)
        !            17: register char  *a, *b;
        !            18: {
        !            19:        register char   *c;
        !            20:        static char     buf[CONCAT_BUFSZ];
        !            21:        
        !            22:        c = buf;
        !            23:        
        !            24:        while (*a)
        !            25:                *c++ = *a++;
        !            26:        while (*b)
        !            27:                *c++ = *b++;
        !            28:        *c = '\0';
        !            29:        if (buf[CONCAT_BUFSZ - 1] != 0)
        !            30:                syserr("ztack overflow: %s", buf);
        !            31:        return (buf);
        !            32: }

unix.superglobalmegacorp.com

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