/lib/string/stpcpy.c

https://github.com/noname22/NeoDICE · C · 25 lines · 12 code · 6 blank · 7 comment · 1 complexity · 336507dd76b56fc7308bb5ca52d7dce6 MD5 · raw file

  1. /*
  2. * STPCPY.C
  3. *
  4. * (c)Copyright 1992-1997 Obvious Implementations Corp. Redistribution and
  5. * use is allowed under the terms of the DICE-LICENSE FILE,
  6. * DICE-LICENSE.TXT.
  7. */
  8. #include <string.h>
  9. #ifndef HYPER
  10. #define HYPER(x) x
  11. #endif
  12. char *
  13. HYPER(stpcpy)(d, s)
  14. char *d;
  15. const char *s;
  16. {
  17. while (*d++ = *s++);
  18. return(d-1);
  19. }