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.

156 lines
2.7 KiB

  1. /*
  2. Copyright (c) 1992 Microsoft Corporation
  3. Module Name:
  4. macansi.h
  5. Abstract:
  6. This module contains prototypes for ANSI to UNICODE conversion routines.
  7. Author:
  8. Jameel Hyder (microsoft!jameelh)
  9. Revision History:
  10. 10 Jul 1992 Initial Version
  11. Notes: Tab stop: 4
  12. --*/
  13. #ifndef _MACANSI_
  14. #define _MACANSI_
  15. extern
  16. NTSTATUS FASTCALL
  17. AfpGetMacCodePage(
  18. IN LPWSTR PathCP
  19. );
  20. extern
  21. NTSTATUS
  22. AfpMacAnsiInit(
  23. VOID
  24. );
  25. extern
  26. VOID
  27. AfpMacAnsiDeInit(
  28. VOID
  29. );
  30. extern
  31. NTSTATUS FASTCALL
  32. AfpConvertStringToUnicode(
  33. IN PANSI_STRING pAnsiString,
  34. OUT PUNICODE_STRING pUnicodeString
  35. );
  36. extern
  37. NTSTATUS FASTCALL
  38. AfpConvertStringToAnsi(
  39. IN PUNICODE_STRING pUnicodeString,
  40. OUT PANSI_STRING pAnsiString
  41. );
  42. extern
  43. NTSTATUS FASTCALL
  44. AfpConvertStringToMungedUnicode(
  45. IN PANSI_STRING pAnsiString,
  46. OUT PUNICODE_STRING pUnicodeString
  47. );
  48. extern
  49. NTSTATUS FASTCALL
  50. AfpConvertPasswordStringToUnicode(
  51. IN PANSI_STRING pAnsiString,
  52. OUT PUNICODE_STRING pUnicodeString
  53. );
  54. extern
  55. NTSTATUS FASTCALL
  56. AfpConvertMungedUnicodeToAnsi(
  57. IN PUNICODE_STRING pUnicodeString,
  58. OUT PANSI_STRING pAnsiString
  59. );
  60. extern
  61. AFPSTATUS FASTCALL
  62. AfpConvertMacAnsiToHostAnsi(
  63. IN OUT PANSI_STRING pAnsiString
  64. );
  65. extern
  66. VOID FASTCALL
  67. AfpConvertHostAnsiToMacAnsi(
  68. IN OUT PANSI_STRING pAnsiString
  69. );
  70. extern
  71. BOOLEAN FASTCALL
  72. AfpEqualUnicodeString(
  73. IN PUNICODE_STRING String1,
  74. IN PUNICODE_STRING String2
  75. );
  76. extern
  77. BOOLEAN FASTCALL
  78. AfpPrefixUnicodeString(
  79. IN PUNICODE_STRING String1,
  80. IN PUNICODE_STRING String2
  81. );
  82. extern
  83. BOOLEAN FASTCALL
  84. AfpIsProperSubstring(
  85. IN PUNICODE_STRING pString,
  86. IN PUNICODE_STRING pSubString
  87. );
  88. extern
  89. BOOLEAN FASTCALL
  90. AfpIsLegalShortname(
  91. IN PANSI_STRING pShortName
  92. );
  93. extern
  94. PCHAR
  95. AfpStrChr(
  96. IN PBYTE String,
  97. IN DWORD StringLen,
  98. IN BYTE Char
  99. );
  100. // HACK: Space and Period are also mapped BUT ONLY if they occur at end
  101. #define ANSI_SPACE ' '
  102. #define ANSI_PERIOD '.'
  103. #define ANSI_APPLE_CHAR 0xF0
  104. #define AFP_GREEK_UNICODE_APPLE_CHAR 0x03c0
  105. #define UNICODE_SPACE L' '
  106. #define UNICODE_PERIOD L'.'
  107. GLOBAL WCHAR AfpMungedUnicodeSpace EQU 0;
  108. GLOBAL WCHAR AfpMungedUnicodePeriod EQU 0;
  109. #ifdef _MACANSI_LOCALS
  110. // Invalid NtFs characters are mapped starting at this value
  111. #define AFP_INITIAL_INVALID_HIGH 0x20
  112. #define AFP_INVALID_HIGH 0x7F
  113. #define AFP_ALT_UNICODE_BASE 0xF000
  114. LOCAL PWCHAR afpAltUnicodeTable = NULL;
  115. LOCAL PBYTE afpAltAnsiTable = NULL;
  116. LOCAL WCHAR afpLastAltChar = AFP_ALT_UNICODE_BASE + AFP_INITIAL_INVALID_HIGH;
  117. LOCAL WCHAR afpAppleUnicodeChar = 0;
  118. #endif // _MACANSI_LOCALS
  119. #endif // _MACANSI_