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: }

Defined functions

ztack defined in line 4; never used
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 813
Valid CSS Valid XHTML 1.0 Strict