home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gccdist / gcc-src / vms / gcclib / strings / strcat.c next >
Encoding:
Text File  |  1991-02-27  |  282 b   |  24 lines

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