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.

136 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. rcunicod.h
  5. Abstract:
  6. This is the header file for rc 16-bit unicode support. It contains
  7. the translatation table for codepage 1252. This was taken from the
  8. nls1252.txt file.
  9. Author:
  10. David J. Marsyla (t-davema) 25-Aug-1991
  11. Revision History:
  12. --*/
  13. #ifndef __RCUNICOD
  14. #define __RCUNICOD
  15. #define IN
  16. #define OUT
  17. #define DFT_TEST_SIZE 10 // The number of words to test to get
  18. // an accurate determination of file type.
  19. //
  20. // The following may be retruned from DetermineFileType ().
  21. //
  22. #define DFT_FILE_IS_UNKNOWN 0 // File type not yet determined.
  23. #define DFT_FILE_IS_8_BIT 1 // File is an 8-bit ascii file.
  24. #define DFT_FILE_IS_16_BIT 2 // File is standard 16-bit unicode file.
  25. #define DFT_FILE_IS_16_BIT_REV 3 // File is reversed 16-bit unicode file.
  26. //
  27. // The following may be returned from DetermnineSysEndianType ().
  28. //
  29. #define DSE_SYS_LITTLE_ENDIAN 1 // Return values from determine system
  30. #define DSE_SYS_BIG_ENDIAN 2 // endian type.
  31. //
  32. // This is all the translation we currently need.
  33. //
  34. INT
  35. A_fwrite (
  36. IN CHAR *pchMBString,
  37. IN INT nSizeOfItem,
  38. IN INT nCountToWrite,
  39. IN FILE *fpOutputFile
  40. );
  41. INT
  42. U_fwrite (
  43. IN WCHAR *pwchUnicodeString,
  44. IN INT nSizeOfItem,
  45. IN INT nCountToWrite,
  46. IN FILE *fpOutputFile
  47. );
  48. INT
  49. A_fputc (
  50. IN CHAR chCharToWrite,
  51. IN FILE *fpOutputFile
  52. );
  53. INT
  54. U_fputc (
  55. IN WCHAR wcCharToWrite,
  56. IN FILE *fpOutputFile
  57. );
  58. BOOL
  59. UnicodeFromMBString (
  60. OUT WCHAR *pwchUnicodeString,
  61. IN CHAR *pchMBString,
  62. IN INT nCountStrLength
  63. );
  64. BOOL
  65. MBStringFromUnicode (
  66. OUT CHAR *pchMBString,
  67. IN WCHAR *pwchUnicodeString,
  68. IN INT nCountStrLength
  69. );
  70. #ifdef DBCS
  71. BOOL
  72. UnicodeFromMBStringN (
  73. OUT WCHAR *pwchUnicodeString,
  74. IN CHAR *pchMBString,
  75. IN INT nCountStrLength,
  76. IN UINT uiCodePage
  77. );
  78. BOOL
  79. MBStringFromUnicodeN (
  80. OUT CHAR *pchMBString,
  81. IN WCHAR *pwchUnicodeString,
  82. IN INT nCountStrLength,
  83. IN UINT uiCodePage
  84. );
  85. #endif // DBCS
  86. INT
  87. Char1252FromUnicode (
  88. IN WCHAR wchUnicodeChar
  89. );
  90. //
  91. // This function can be used to determine the format of a disk file.
  92. //
  93. INT
  94. DetermineFileType (
  95. IN FILE *fpInputFile
  96. );
  97. //
  98. // This function will return the endian type of the current system.
  99. //
  100. INT
  101. DetermineSysEndianType (
  102. VOID
  103. );
  104. #endif // __RCUNICOD