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.

85 lines
2.0 KiB

  1. /*----------------------------------------------------------------------------
  2. %%File: fechmap_.h
  3. %%Unit: fechmap
  4. %%Contact: jpick
  5. Internal header file for FarEast character conversion module.
  6. ----------------------------------------------------------------------------*/
  7. #ifndef FECHMAP__H
  8. #define FECHMAP__H
  9. #include <windows.h>
  10. #include <stdio.h>
  11. #include <stddef.h>
  12. #include "msencode.h"
  13. //#include "assert.h"
  14. // Character encoding types supported by this module.
  15. // Internal version -- broader than the set exposed publicly.
  16. // (Doing this since much of the groundwork is already in
  17. // for future support don't want to remove or ifdef out that
  18. // code).
  19. //
  20. // Main DLL entry points manage the correspondence between
  21. // external and internal encoding types.
  22. //
  23. typedef enum _icet // Internal Character Encoding Type
  24. {
  25. icetNil = -1,
  26. icetEucCn = 0,
  27. icetEucJp,
  28. icetEucKr,
  29. icetEucTw,
  30. icetIso2022Cn,
  31. icetIso2022Jp,
  32. icetIso2022Kr,
  33. icetIso2022Tw,
  34. icetBig5,
  35. icetGbk,
  36. icetHz,
  37. icetShiftJis,
  38. icetWansung,
  39. icetUtf7,
  40. icetUtf8,
  41. icetCount,
  42. } ICET;
  43. // Miscellaneous useful definitions
  44. //
  45. #define fTrue (BOOL) 1
  46. #define fFalse (BOOL) 0
  47. // MS Code Page Definitions
  48. //
  49. #define nCpJapan 932
  50. #define nCpChina 936
  51. #define nCpKorea 949
  52. #define nCpTaiwan 950
  53. #define FIsFeCp(cp) \
  54. (((cp) == nCpJapan) || ((cp) == nCpChina) || ((cp) == nCpKorea) || ((cp) == nCpTaiwan))
  55. #define WchFromUchUch(uchLead, uchTrail) \
  56. (WCHAR) ((((UCHAR)(uchLead)) << 8) | ((UCHAR)(uchTrail)))
  57. // Prototype for internal auto-detection code
  58. //
  59. CCE CceDetermineInputType(
  60. IStream *pstmIn, // input stream
  61. DWORD dwFlags,
  62. EFam efPref,
  63. int nPrefCp,
  64. ICET *lpicet,
  65. BOOL *lpfGuess
  66. );
  67. // Prototype for ISO-2022 escape sequence interpreter.
  68. //
  69. CCE CceReadEscSeq(IStream *pstmIn, ICET *lpicet);
  70. #endif // #ifndef FECHMAP__H