1: /*
   2: **  STRING CONCATENATE
   3: **
   4: **	The strings `s1' and `s2' are concatenated and stored into
   5: **	`s3'.  It is ok for `s1' to equal `s3', but terrible things
   6: **	will happen if `s2' equals `s3'.  The return value is is a
   7: **	pointer to the end of `s3' field.
   8: */
   9: 
  10: char *concat(s1, s2, s3)
  11: char    *s1, *s2, *s3;
  12: {
  13:     register char       *p;
  14:     register char       *q;
  15: 
  16:     p = s3;
  17:     q = s1;
  18:     while (*q)
  19:         *p++ = *q++;
  20:     q = s2;
  21:     while (*q)
  22:         *p++ = *q++;
  23:     *p = 0;
  24:     return (p);
  25: }
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1948
Valid CSS Valid XHTML 1.0 Strict