[NTOSKRNL]

Really implement support for DOS_QM in FsRtlIs*InExpression()
Should fix some tests

svn path=/trunk/; revision=58844
This commit is contained in:
Pierre Schweitzer 2013-04-24 16:59:23 +00:00
parent a1d7ffa2b1
commit 4efe1428b9
2 changed files with 62 additions and 2 deletions

View file

@ -184,7 +184,7 @@ FsRtlIsDbcsInExpression(IN PANSI_STRING Expression,
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 @@ FsRtlIsDbcsInExpression(IN PANSI_STRING Expression,
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)
{

View file

@ -113,7 +113,7 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
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++;
@ -242,6 +242,36 @@ FsRtlIsNameInExpressionPrivate(IN PUNICODE_STRING Expression,
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 */
else if (StarFound >= 0)
{