1: # include   <sccs.h>
   2: 
   3: SCCSID(@(#)concat.c	8.1	12/31/84)
   4: 
   5: /*
   6: **  STRING CONCATENATE
   7: **
   8: **	The strings `s1' and `s2' are concatenated and stored into
   9: **	`s3'.  It is ok for `s1' to equal `s3', but terrible things
  10: **	will happen if `s2' equals `s3'.  The return value is is a
  11: **	pointer to the end of `s3' field.
  12: */
  13: 
  14: char *concat(s1, s2, s3)
  15: char    *s1, *s2, *s3;
  16: {
  17:     register char       *p;
  18:     register char       *q;
  19: 
  20:     p = s3;
  21:     q = s1;
  22:     while (*q)
  23:         *p++ = *q++;
  24:     q = s2;
  25:     while (*q)
  26:         *p++ = *q++;
  27:     *p = 0;
  28:     return (p);
  29: }

Defined functions

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