Author: pschweitzer
Date: Wed Apr 24 16:59:23 2013
New Revision: 58844
URL:
http://svn.reactos.org/svn/reactos?rev=58844&view=rev
Log:
[NTOSKRNL]
Really implement support for DOS_QM in FsRtlIs*InExpression()
Should fix some tests
Modified:
trunk/reactos/ntoskrnl/fsrtl/dbcsname.c
trunk/reactos/ntoskrnl/fsrtl/name.c
Modified: trunk/reactos/ntoskrnl/fsrtl/dbcsname.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/dbcsname.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fsrtl/dbcsname.c [iso-8859-1] Wed Apr 24 16:59:23 2013
@@ -184,7 +184,7 @@
ExpressionPosition++;
}
/* Check cases that eat one char */
- else if ((Expression->Buffer[ExpressionPosition] == '?') ||
(Expression->Buffer[ExpressionPosition] == ANSI_DOS_QM))
+ else if (Expression->Buffer[ExpressionPosition] == '?')
{
NamePosition++;
ExpressionPosition++;
@@ -311,6 +311,36 @@
break;
}
}
+ /* Check DOS_QM */
+ else if (Expression->Buffer[ExpressionPosition] == ANSI_DOS_QM)
+ {
+ /* Check whether we are upon a dot */
+ MatchingChars = 0;
+ while (MatchingChars < NamePosition)
+ {
+ if (Name->Buffer[MatchingChars] == '.')
+ {
+ break;
+ }
+ MatchingChars++;
+ }
+
+ /* If not, we match a single char */
+ if (MatchingChars == NamePosition && Name->Buffer[NamePosition] !=
'.')
+ {
+ NamePosition++;
+ ExpressionPosition++;
+ }
+ else
+ {
+ /* If we are, we just go through QMs */
+ while (ExpressionPosition < Expression->Length &&
+ Expression->Buffer[ExpressionPosition] == ANSI_DOS_QM)
+ {
+ ExpressionPosition++;
+ }
+ }
+ }
/* If nothing match, try to backtrack */
else if (StarFound >= 0)
{
Modified: trunk/reactos/ntoskrnl/fsrtl/name.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/name.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fsrtl/name.c [iso-8859-1] Wed Apr 24 16:59:23 2013
@@ -113,7 +113,7 @@
ExpressionPosition++;
}
/* Check cases that eat one char */
- else if (Expression->Buffer[ExpressionPosition] == L'?' ||
(Expression->Buffer[ExpressionPosition] == DOS_QM))
+ else if (Expression->Buffer[ExpressionPosition] == L'?')
{
NamePosition++;
ExpressionPosition++;
@@ -240,6 +240,36 @@
else
{
break;
+ }
+ }
+ /* Check DOS_QM */
+ else if (Expression->Buffer[ExpressionPosition] == DOS_QM)
+ {
+ /* Check whether we are upon a dot */
+ MatchingChars = 0;
+ while (MatchingChars < NamePosition)
+ {
+ if (Name->Buffer[MatchingChars] == L'.')
+ {
+ break;
+ }
+ MatchingChars++;
+ }
+
+ /* If not, we match a single char */
+ if (MatchingChars == NamePosition && Name->Buffer[NamePosition] !=
L'.')
+ {
+ NamePosition++;
+ ExpressionPosition++;
+ }
+ else
+ {
+ /* If we are, we just go through QMs */
+ while (ExpressionPosition < Expression->Length / sizeof(WCHAR)
&&
+ Expression->Buffer[ExpressionPosition] == DOS_QM)
+ {
+ ExpressionPosition++;
+ }
}
}
/* If nothing match, try to backtrack */