Leaked source code of windows server 2003
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.

44 lines
1.6 KiB

  1. //+-----------------------------------------------------------------------
  2. //
  3. // Wide Character Routines
  4. // Copyright (C) Microsoft Corporation, 1996, 1997
  5. //
  6. // File: wch.h
  7. //
  8. // Contents: Declaration of wide characters routines.
  9. // These routines are being used to avoid dragging in
  10. // the initialisation chunk of the C run-time library
  11. // that would be required by library routines such as
  12. // wcsicmp() etc.
  13. //
  14. //------------------------------------------------------------------------
  15. extern int wch_icmp(LPWCH pwch1, LPWCH pwch2);
  16. extern int wch_incmp(LPWCH pwch1, LPWCH pwch2, DWORD dwMaxCmp);
  17. extern int wch_cmp(LPWCH pwch1, LPWCH pwch2);
  18. extern int wch_ncmp(LPWCH pwch1, LPWCH pwch2, DWORD dwMaxCmp);
  19. extern int wch_len(LPWCH pwch);
  20. extern void wch_cpy(LPWCH pwch1, LPWCH pwch2);
  21. extern LPWCH wch_chr(LPWCH pwch, WCHAR wch);
  22. extern boolean wch_wildcardMatch(LPWCH pwchText, LPWCH pwchPattern,
  23. boolean fCaseSensitive);
  24. //------------------------------------------------------------------------
  25. //
  26. // Function: wch_ncpy()
  27. //
  28. // Synopsis: Perform an n-character wide-string copy.
  29. // Copies 'dwSize' characters from 'pwchSrc' to 'pwchDest'.
  30. //
  31. // Arguments: pwchDesc Destination buffer.
  32. // pwchSrc Source string.
  33. // dwSize Number of characters to copy.
  34. //
  35. // Returns: Nothing.
  36. //
  37. //------------------------------------------------------------------------
  38. inline void wch_ncpy(LPWCH pwchDest, LPWCH pwchSrc, DWORD dwSize)
  39. {
  40. memcpy(pwchDest, pwchSrc, dwSize * sizeof(WCHAR));
  41. }