Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.0 KiB

  1. /***
  2. *wcscpy.c - contains wcscpy()
  3. *
  4. * Copyright (c) 1985-1988, Microsoft Corporation. All Rights Reserved.
  5. *
  6. *Purpose:
  7. * wcscpy() copies one wide character string onto another.
  8. *
  9. *Revision History:
  10. * 04-07-91 IanJa C version created.
  11. *
  12. *******************************************************************************/
  13. #include <stdlib.h>
  14. /***
  15. *wchar_t *wcscpy(dst, src) - copy one wide character string over another
  16. *
  17. *Purpose:
  18. * Copies the wide character string src into the spot specified by
  19. * dest; assumes enough room.
  20. *
  21. *Entry:
  22. * wchar_t * dst - wide character string over which "src" is to be copied
  23. * const wchar_t * src - string to be copied over "dst"
  24. *
  25. *Exit:
  26. * The address of "dst"
  27. *
  28. *Exceptions:
  29. *******************************************************************************/
  30. wchar_t * __cdecl wcscpy(wchar_t * dst, const wchar_t * src)
  31. {
  32. wchar_t * cp = dst;
  33. while( *cp++ = *src++ )
  34. ; /* Copy src over dst */
  35. return dst;
  36. }