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.

45 lines
1.5 KiB

  1. //////////////////////////////////////////////////
  2. // Copyright (C) 1997, Microsoft Corporation. All Rights Reserved.
  3. //
  4. // File : CONVERT.HPP
  5. // Project : project SIK
  6. // Purpose : KS <---> IN code conversion class definition
  7. //////////////////////////////////////////////////
  8. #if !defined (__CONVERT_HPP)
  9. #define __CONVERT_HPP 1
  10. #define UWANSUNG_CODE_PAGE 949
  11. #define JOHAP_CODE_PAGE 1361
  12. #define codeWanSeong 0 // if we use unicode, this should be removed.
  13. #define codeChoHab 1
  14. class CODECONVERT {
  15. public:
  16. int CodeLen;
  17. CODECONVERT() {};
  18. ~CODECONVERT() {};
  19. int HAN2INR(char *, char *, int) ; // Hangeul code --> internal reverse string
  20. int HAN2INS(char *, char *, int) ; // Hangeul code --> internal string
  21. int INR2HAN(char *, char *, int) ; // internal reverse string--> Hangeul code
  22. int INS2HAN(char *, char *, int) ; // internal string --> Hangeul code
  23. void ReverseIN(char *, char *) ;
  24. private:
  25. void ReverseHAN(WCHAR *, WCHAR *) ;
  26. void AppendIN(char *, char *, int &) ;
  27. void AppendHAN(WCHAR, WCHAR *, int &) ;
  28. int ChoHab2INChar(char *, char *) ; // one char conversion(KS-->internal)
  29. int IN2ChoHabChar(char *, char *) ; // one char conversion(internal-->KS)
  30. int IN2UNI(char *c, WORD *wch);
  31. };
  32. #endif