move from branch
[reactos.git] / reactos / ntoskrnl / fsrtl / dbcsname.c
1 /*
2 * PROJECT: ReactOS Kernel
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: ntoskrnl/fsrtl/name.c
5 * PURPOSE: Provides DBCS parsing and other support routines for FSDs
6 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
7 */
8
9 /* INCLUDES ******************************************************************/
10
11 #include <ntoskrnl.h>
12 #define NDEBUG
13 #include <debug.h>
14
15 /* PUBLIC FUNCTIONS **********************************************************/
16
17 /*++
18 * @name FsRtlDissectDbcs
19 * @implemented
20 *
21 * Dissects a given path name into first and remaining part.
22 *
23 * @param Name
24 * ANSI string to dissect.
25 *
26 * @param FirstPart
27 * Pointer to user supplied ANSI_STRING, that will later point
28 * to the first part of the original name.
29 *
30 * @param RemainingPart
31 * Pointer to user supplied ANSI_STRING, that will later point
32 * to the remaining part of the original name.
33 *
34 * @return None
35 *
36 * @remarks Example:
37 * Name: \test1\test2\test3
38 * FirstPart: test1
39 * RemainingPart: test2\test3
40 *
41 *--*/
42 VOID
43 NTAPI
44 FsRtlDissectDbcs(IN ANSI_STRING Name,
45 OUT PANSI_STRING FirstPart,
46 OUT PANSI_STRING RemainingPart)
47 {
48 KEBUGCHECK(0);
49 }
50
51 /*++
52 * @name FsRtlDoesDbcsContainWildCards
53 * @implemented
54 *
55 * FILLME
56 *
57 * @param Name
58 * FILLME
59 *
60 * @return None
61 *
62 * @remarks None
63 *
64 *--*/
65 BOOLEAN
66 NTAPI
67 FsRtlDoesDbcsContainWildCards(IN PANSI_STRING Name)
68 {
69 ULONG i;
70
71 /* Check every character */
72 for (i = 0; i < Name->Length; i++)
73 {
74 /* First make sure it's not the Lead DBCS */
75 if (FsRtlIsLeadDbcsCharacter(Name->Buffer[i]))
76 {
77 i++;
78 }
79 else if (FsRtlIsAnsiCharacterWild(Name->Buffer[i]))
80 {
81 /* Now return if it has a wildcard */
82 return TRUE;
83 }
84 }
85
86 /* We didn't return above...so none found */
87 return FALSE;
88 }
89
90 /*++
91 * @name FsRtlIsDbcsInExpression
92 * @unimplemented
93 *
94 * FILLME
95 *
96 * @param Expression
97 * FILLME
98 *
99 * @param Name
100 * FILLME
101 *
102 * @return None
103 *
104 * @remarks None
105 *
106 *--*/
107 BOOLEAN
108 NTAPI
109 FsRtlIsDbcsInExpression(IN PANSI_STRING Expression,
110 IN PANSI_STRING Name)
111 {
112 KEBUGCHECK(0);
113 return FALSE;
114 }
115
116 /*++
117 * @name FsRtlIsFatDbcsLegal
118 * @unimplemented
119 *
120 * FILLME
121 *
122 * @param DbcsName
123 * FILLME
124 *
125 * @param WildCardsPermissible
126 * FILLME
127 *
128 * @param PathNamePermissible
129 * FILLME
130 *
131 * @param LeadingBackslashPermissible
132 * FILLME
133 *
134 * @return TRUE if the DbcsName is legal, FALSE otherwise
135 *
136 * @remarks None
137 *
138 *--*/
139 BOOLEAN
140 NTAPI
141 FsRtlIsFatDbcsLegal(IN ANSI_STRING DbcsName,
142 IN BOOLEAN WildCardsPermissible,
143 IN BOOLEAN PathNamePermissible,
144 IN BOOLEAN LeadingBackslashPermissible)
145 {
146 KEBUGCHECK(0);
147 return FALSE;
148 }
149
150 /*++
151 * @name FsRtlIsHpfsDbcsLegal
152 * @unimplemented
153 *
154 * FILLME
155 *
156 * @param DbcsName
157 * FILLME
158 *
159 * @param WildCardsPermissible
160 * FILLME
161 *
162 * @param PathNamePermissible
163 * FILLME
164 *
165 * @param LeadingBackslashPermissible
166 * FILLME
167 *
168 * @return TRUE if the DbcsName is legal, FALSE otherwise
169 *
170 * @remarks None
171 *
172 *--*/
173 BOOLEAN
174 STDCALL
175 FsRtlIsHpfsDbcsLegal(IN ANSI_STRING DbcsName,
176 IN BOOLEAN WildCardsPermissible,
177 IN BOOLEAN PathNamePermissible,
178 IN BOOLEAN LeadingBackslashPermissible)
179 {
180 KEBUGCHECK(0);
181 return FALSE;
182 }