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.

166 lines
10 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation
  3. Module Name:
  4. namep.cxx
  5. Abstract:
  6. This module declares the global data used by the Name Module
  7. Author:
  8. Gary Kimura [GaryKi] 30-Jul-1990
  9. Revision History:
  10. Heath Hunnicutt [T-HeathH] 17-Jul-1994 - adopted and stripped of most
  11. stuff for ftphelp api.
  12. --*/
  13. #include <wininetp.h>
  14. #include "ftpapih.h"
  15. #include "namep.h"
  16. //
  17. // The global static legal ANSI character array. Wild characters
  18. // are not considered legal, they should be checked seperately if
  19. // allowed.
  20. //
  21. static UCHAR LocalLegalAnsiCharacterArray[128] = {
  22. 0, // 0x00 ^@
  23. 0, // 0x01 ^A
  24. 0, // 0x02 ^B
  25. 0, // 0x03 ^C
  26. 0, // 0x04 ^D
  27. 0, // 0x05 ^E
  28. 0, // 0x06 ^F
  29. 0, // 0x07 ^G
  30. 0, // 0x08 ^H
  31. 0, // 0x09 ^I
  32. 0, // 0x0A ^J
  33. 0, // 0x0B ^K
  34. 0, // 0x0C ^L
  35. 0, // 0x0D ^M
  36. 0, // 0x0E ^N
  37. 0, // 0x0F ^O
  38. 0, // 0x10 ^P
  39. 0, // 0x11 ^Q
  40. 0, // 0x12 ^R
  41. 0, // 0x13 ^S
  42. 0, // 0x14 ^T
  43. 0, // 0x15 ^U
  44. 0, // 0x16 ^V
  45. 0, // 0x17 ^W
  46. 0, // 0x18 ^X
  47. 0, // 0x19 ^Y
  48. 0, // 0x1A ^Z
  49. 0, // 0x1B
  50. 0, // 0x1C
  51. 0, // 0x1D
  52. 0, // 0x1E
  53. 0, // 0x1F
  54. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x20
  55. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x21 !
  56. MY_FSRTL_WILD_CHARACTER, // 0x22 "
  57. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x23 #
  58. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x24 $
  59. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x25 %
  60. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x26 &
  61. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x27 '
  62. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x28 (
  63. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x29 )
  64. MY_FSRTL_WILD_CHARACTER, // 0x2A *
  65. MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x2B +
  66. MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x2C ,
  67. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x2D -
  68. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x2E .
  69. 0, // 0x2F /
  70. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x30 0
  71. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x31 1
  72. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x32 2
  73. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x33 3
  74. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x34 4
  75. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x35 5
  76. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x36 6
  77. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x37 7
  78. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x38 8
  79. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x39 9
  80. MY_FSRTL_NTFS_LEGAL, // 0x3A :
  81. MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x3B ;
  82. MY_FSRTL_WILD_CHARACTER, // 0x3C <
  83. MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x3D =
  84. MY_FSRTL_WILD_CHARACTER, // 0x3E >
  85. MY_FSRTL_WILD_CHARACTER, // 0x3F ?
  86. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x40 @
  87. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x41 A
  88. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x42 B
  89. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x43 C
  90. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x44 D
  91. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x45 E
  92. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x46 F
  93. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x47 G
  94. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x48 H
  95. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x49 I
  96. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x4A J
  97. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x4B K
  98. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x4C L
  99. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x4D M
  100. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x4E N
  101. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x4F O
  102. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x50 P
  103. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x51 Q
  104. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x52 R
  105. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x53 S
  106. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x54 T
  107. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x55 U
  108. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x56 V
  109. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x57 W
  110. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x58 X
  111. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x59 Y
  112. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x5A Z
  113. MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x5B [
  114. 0, // 0x5C backslash
  115. MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x5D ]
  116. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x5E ^
  117. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x5F _
  118. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x60 `
  119. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x61 a
  120. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x62 b
  121. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x63 c
  122. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x64 d
  123. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x65 e
  124. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x66 f
  125. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x67 g
  126. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x68 h
  127. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x69 i
  128. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x6A j
  129. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x6B k
  130. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x6C l
  131. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x6D m
  132. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x6E n
  133. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x6F o
  134. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x70 p
  135. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x71 q
  136. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x72 r
  137. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x73 s
  138. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x74 t
  139. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x75 u
  140. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x76 v
  141. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x77 w
  142. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x78 x
  143. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x79 y
  144. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x7A z
  145. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x7B {
  146. 0, // 0x7C |
  147. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x7D }
  148. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x7E ~
  149. MY_FSRTL_FAT_LEGAL | MY_FSRTL_HPFS_LEGAL | MY_FSRTL_NTFS_LEGAL, // 0x7F ^?
  150. };
  151. PUCHAR MyFsRtlLegalAnsiCharacterArray = &LocalLegalAnsiCharacterArray[0];