Author: ion
Date: Mon Jan 8 20:22:15 2007
New Revision: 25380
URL:
http://svn.reactos.org/svn/reactos?rev=25380&view=rev
Log:
- Add authors' names.
Modified:
trunk/reactos/ntoskrnl/fsrtl/dbcsname.c
trunk/reactos/ntoskrnl/fsrtl/faulttol.c
trunk/reactos/ntoskrnl/fsrtl/filelock.c
trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c
trunk/reactos/ntoskrnl/fsrtl/largemcb.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 (original)
+++ trunk/reactos/ntoskrnl/fsrtl/dbcsname.c Mon Jan 8 20:22:15 2007
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/fsrtl/name.c
* PURPOSE: Provides DBCS parsing and other support routines for FSDs
- * PROGRAMMERS: None.
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
*/
/* INCLUDES ******************************************************************/
Modified: trunk/reactos/ntoskrnl/fsrtl/faulttol.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/faulttol.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/faulttol.c (original)
+++ trunk/reactos/ntoskrnl/fsrtl/faulttol.c Mon Jan 8 20:22:15 2007
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/fsrtl/faulttol.c
* PURPOSE: Provides Fault Tolerance support for File System Drivers
- * PROGRAMMERS: None.
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
*/
/* INCLUDES ******************************************************************/
Modified: trunk/reactos/ntoskrnl/fsrtl/filelock.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/filelock.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/filelock.c (original)
+++ trunk/reactos/ntoskrnl/fsrtl/filelock.c Mon Jan 8 20:22:15 2007
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/fsrtl/filelock.c
* PURPOSE: File Locking implementation for File System Drivers
- * PROGRAMMERS: None.
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
*/
/* INCLUDES ******************************************************************/
Modified: trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c (original)
+++ trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c Mon Jan 8 20:22:15 2007
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/fsrtl/fsrtlpc.c
* PURPOSE: Contains initialization and support code for the FsRtl
- * PROGRAMMERS: None.
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
*/
/* INCLUDES ******************************************************************/
Modified: trunk/reactos/ntoskrnl/fsrtl/largemcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/largemcb.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/largemcb.c (original)
+++ trunk/reactos/ntoskrnl/fsrtl/largemcb.c Mon Jan 8 20:22:15 2007
@@ -3,7 +3,7 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/fsrtl/largemcb.c
* PURPOSE: Mapping Control Block (MCB) support for File System Drivers
- * PROGRAMMERS: None.
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
*/
/* INCLUDES ******************************************************************/
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 (original)
+++ trunk/reactos/ntoskrnl/fsrtl/name.c Mon Jan 8 20:22:15 2007
@@ -3,7 +3,8 @@
* LICENSE: GPL - See COPYING in the top level directory
* FILE: ntoskrnl/fsrtl/name.c
* PURPOSE: Provides name parsing and other support routines for FSDs
- * PROGRAMMERS: None.
+ * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org)
+ * Filip Navara (navaraf(a)reactos.org)
*/
/* INCLUDES ******************************************************************/
@@ -46,52 +47,56 @@
{
UNICODE_STRING UpcaseName1;
UNICODE_STRING UpcaseName2;
- BOOLEAN StringsAreEqual;
+ BOOLEAN StringsAreEqual, MemoryAllocated = FALSE;
+ ULONG i;
/* Well, first check their size */
- if (Name1->Length != Name2->Length) {
- /* Not equal! */
- return FALSE;
- }
-
- /* Turn them into Upcase if we don't have a table */
- if (IgnoreCase && !UpcaseTable) {
- RtlUpcaseUnicodeString(&UpcaseName1, Name1, TRUE);
+ if (Name1->Length != Name2->Length) return FALSE;
+
+ /* Check if the caller didn't give an upcase table */
+ if ((IgnoreCase) && !(UpcaseTable))
+ {
+ /* Upcase the string ourselves */
+ Status = RtlUpcaseUnicodeString(&UpcaseName1, Name1, TRUE);
+ if (!NT_SUCCESS(Status)) RtlRaiseStatus(Status);
+
+ /* Upcase the second string too */
RtlUpcaseUnicodeString(&UpcaseName2, Name2, TRUE);
Name1 = &UpcaseName1;
Name2 = &UpcaseName2;
- goto ManualCase;
+ /* Make sure we go through the path below, but free the strings */
+ IgnoreCase = FALSE;
+ MemoryAllocated = TRUE;
}
/* Do a case-sensitive search */
- if (!IgnoreCase) {
-
-ManualCase:
+ if (!IgnoreCase)
+ {
/* Use a raw memory compare */
StringsAreEqual = RtlEqualMemory(Name1->Buffer,
Name2->Buffer,
Name1->Length);
- /* Clear the strings if we need to */
- if (IgnoreCase) {
+ /* Check if we allocated strings */
+ if (MemoryAllocated)
+ {
+ /* Free them */
RtlFreeUnicodeString(&UpcaseName1);
RtlFreeUnicodeString(&UpcaseName2);
}
/* Return the equality */
return StringsAreEqual;
-
- } else {
-
+ }
+ else
+ {
/* Case in-sensitive search */
-
- LONG i;
-
- for (i = Name1->Length / sizeof(WCHAR) - 1; i >= 0; i--) {
-
- if (UpcaseTable[Name1->Buffer[i]] != UpcaseTable[Name2->Buffer[i]]) {
-
+ for (i = 0; i < Name1->Length / sizeof(WCHAR); i++)
+ {
+ /* Check if the character matches */
+ if (UpcaseTable[Name1->Buffer[i]] != UpcaseTable[Name2->Buffer[i]])
+ {
/* Non-match found! */
return FALSE;
}