home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume5 / smallc / part3 / lib / strcat.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-30  |  218 b   |  19 lines

  1. /*
  2.  * Concatenate s2 on the end of s1.  S1's space must be large enough.
  3.  * Return s1.
  4.  */
  5.  
  6. strcat(s1, s2)
  7. char *s1, *s2;
  8. {
  9.     char *os1;
  10.  
  11.     os1 = s1;
  12.     while (*s1++)
  13.         ;
  14.     *--s1;
  15.     while (*s1++ = *s2++)
  16.         ;
  17.     return(os1);
  18. }
  19.