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.

47 lines
1.1 KiB

  1. #include "convbase.h"
  2. class CInccEucJIn : public CINetCodeConverter
  3. {
  4. private:
  5. BOOL (CInccEucJIn::*m_pfnConv)(UCHAR tc);
  6. BOOL (CInccEucJIn::*m_pfnCleanUp)();
  7. UCHAR m_tcLeadByte; /* perserve the last lead byte */
  8. public:
  9. CInccEucJIn(UINT uCodePage, int nCodeSet);
  10. ~CInccEucJIn() {}
  11. virtual HRESULT ConvertChar(UCHAR tc, int cchSrc=-1);
  12. virtual BOOL CleanUp();
  13. virtual int GetUnconvertBytes();
  14. virtual DWORD GetConvertMode();
  15. virtual void SetConvertMode(DWORD mode);
  16. private:
  17. void Reset();
  18. BOOL ConvMain(UCHAR tc);
  19. BOOL CleanUpMain();
  20. BOOL ConvDoubleByte(UCHAR tc);
  21. BOOL CleanUpDoubleByte();
  22. BOOL ConvKatakana(UCHAR tc);
  23. BOOL CleanUpKatakana();
  24. };
  25. class CInccEucJOut : public CINetCodeConverter
  26. {
  27. private:
  28. BOOL m_fDoubleByte;
  29. BYTE m_tcLeadByte;
  30. DWORD _dwFlag;
  31. WCHAR *_lpFallBack;
  32. public:
  33. CInccEucJOut(UINT uCodePage, int nCodeSet, DWORD dwFlag, WCHAR *lpFallBack);
  34. ~CInccEucJOut() {}
  35. virtual HRESULT ConvertChar(UCHAR tc, int cchSrc=-1);
  36. virtual BOOL CleanUp();
  37. virtual int GetUnconvertBytes();
  38. virtual DWORD GetConvertMode();
  39. virtual void SetConvertMode(DWORD mode);
  40. private:
  41. void Reset();
  42. };