strcat.c 376 B

1234567891011121314151617181920
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. #include <string.h>
  7. char *
  8. strcat(char *ret, register const char *s2)
  9. {
  10. register char *s1 = ret;
  11. while (*s1++ != '\0')
  12. /* EMPTY */ ;
  13. s1--;
  14. while (*s1++ = *s2++)
  15. /* EMPTY */ ;
  16. return ret;
  17. }