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.

71 lines
3.1 KiB

  1. /* File: D:\WACKER\tdll\htchar.h (Created: 22-Feb-1995)
  2. *
  3. * Copyright 1994,1995 by Hilgraeve Inc. -- Monroe, MI
  4. * All rights reserved
  5. *
  6. * $Revision: 7 $
  7. * $Date: 7/08/02 6:41p $
  8. */
  9. TCHAR *TCHAR_Fill(TCHAR *dest, TCHAR c, size_t count);
  10. TCHAR *TCHAR_Trim(TCHAR *pszStr);
  11. LPTSTR StrCharNext(LPCTSTR pszStr);
  12. LPTSTR StrCharPrev(LPCTSTR pszStart, LPCTSTR pszStr);
  13. LPTSTR StrCharLast(LPCTSTR pszStr);
  14. LPTSTR StrCharEnd(LPCTSTR pszStr);
  15. LPTSTR StrCharFindFirst(LPCTSTR pszStr, int nChar);
  16. LPTSTR StrCharFindLast(LPCTSTR pszStr, int nChar);
  17. LPTSTR StrCharCopy(LPTSTR pszDst, LPCTSTR pszSrc);
  18. LPTSTR StrCharCat(LPTSTR pszDst, LPCTSTR pszSrc);
  19. LPTSTR StrCharStrStr(LPCTSTR pszA, LPCTSTR pszB);
  20. LPTSTR StrCharCopyN(LPTSTR pszDst, LPCTSTR pszSrc, int iLen);
  21. LPTSTR StrCharPBrk(LPCTSTR pszStr, LPCTSTR pszSet);
  22. int StrCharGetStrLength(LPCTSTR pszStr);
  23. int StrCharGetByteCount(LPCTSTR pszStr);
  24. int StrCharCmp(LPCTSTR pszA, LPCTSTR pszB);
  25. int StrCharCmpi(LPCTSTR pszA, LPCTSTR pszB);
  26. int StrCharCmpN(LPCTSTR pszA, LPCTSTR pszB, size_t iLen);
  27. int StrCharCmpiN(LPCTSTR pszA, LPCTSTR pszB, size_t iLen);
  28. ECHAR *ECHAR_Fill(ECHAR *dest, ECHAR c, size_t count);
  29. int CnvrtMBCStoECHAR(ECHAR * echrDest, const unsigned long ulDestSize,
  30. const TCHAR * const tchrSource, const unsigned long ulSourceSize);
  31. int CnvrtECHARtoMBCS(TCHAR * tchrDest, const unsigned long ulDestSize,
  32. const ECHAR * const echrSource, const unsigned long ulSourceSize);
  33. int CnvrtECHARtoTCHAR(LPTSTR pszDest, int cchDest, ECHAR eChar);
  34. int StrCharGetEcharLen(const ECHAR * const pszA);
  35. int StrCharGetEcharByteCount(const ECHAR * const pszA);
  36. int StrCharCmpEtoT(const ECHAR * const pszA, const TCHAR * const pszB);
  37. int StrCharStripDBCSString(ECHAR *aechDest, const long lDestSize,
  38. ECHAR *aechSource);
  39. int isDBCSChar(unsigned int Char);
  40. #if defined(DEADWOOD)
  41. #if defined(INCL_VTUTF8)
  42. BOOLEAN TranslateUTF8ToDBCS(UCHAR IncomingByte,
  43. UCHAR *pUTF8Buffer,
  44. int iUTF8BufferLength,
  45. WCHAR *pUnicode8Buffer,
  46. int iUnicodeBufferLength,
  47. TCHAR *pDBCSBuffer,
  48. int iDBCSBufferLength);
  49. BOOLEAN TranslateDBCSToUTF8(const TCHAR *pDBCSBuffer,
  50. int iDBCSBufferLength,
  51. WCHAR *pUnicode8Buffer,
  52. int iUnicodeBufferLength,
  53. UCHAR *pUTF8Buffer,
  54. int iUTF8BufferLength);
  55. //
  56. // The following functions are from code obtained directly from
  57. // Microsoft for converting Unicode to UTF-8 and UTF-8 to unicode
  58. // buffers. REV: 03/02/2001
  59. //
  60. BOOLEAN TranslateUnicodeToUtf8(PCWSTR SourceBuffer,
  61. UCHAR *DestinationBuffer);
  62. BOOLEAN TranslateUtf8ToUnicode(UCHAR IncomingByte,
  63. UCHAR *ExistingUtf8Buffer,
  64. WCHAR *DestinationUnicodeVal);
  65. #endif //INCL_VTUTF8
  66. #endif // defined(DEADWOOD)