Author: cwittich
Date: Wed Feb 4 00:04:24 2009
New Revision: 39377
URL:
http://svn.reactos.org/svn/reactos?rev=39377&view=rev
Log:
fix formatting (again)
Modified:
trunk/reactos/drivers/filesystems/cdfs/dirctl.c
trunk/reactos/drivers/filesystems/cdfs/fcb.c
trunk/reactos/drivers/filesystems/cdfs/misc.c
Modified: trunk/reactos/drivers/filesystems/cdfs/dirctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/dirctl.c [iso-8859-1] Wed Feb 4 00:04:24 2009
@@ -275,8 +275,8 @@
Record->RecordLength, Record->ExtAttrRecordLength,
Record->FileIdLength);
Status = CdfsGetEntryName
- (DeviceExt, &Context, &Block, &StreamOffset,
- DirSize, (PVOID*)&Record, name, &DirIndex, &Offset);
+ (DeviceExt, &Context, &Block, &StreamOffset,
+ DirSize, (PVOID*)&Record, name, &DirIndex, &Offset);
if (Status == STATUS_NO_MORE_ENTRIES)
{
@@ -295,8 +295,8 @@
ShortName.MaximumLength = 26;
ShortName.Buffer = ShortNameBuffer;
- OffsetOfEntry.QuadPart = StreamOffset.QuadPart + Offset;
- CdfsShortNameCacheGet(Parent, &OffsetOfEntry, &LongName, &ShortName);
+ OffsetOfEntry.QuadPart = StreamOffset.QuadPart + Offset;
+ CdfsShortNameCacheGet(Parent, &OffsetOfEntry, &LongName,
&ShortName);
DPRINT("ShortName '%wZ'\n", &ShortName);
Modified: trunk/reactos/drivers/filesystems/cdfs/fcb.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/f…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/fcb.c [iso-8859-1] Wed Feb 4 00:04:24 2009
@@ -106,15 +106,15 @@
CdfsDestroyFCB(PFCB Fcb)
{
PLIST_ENTRY Entry;
-
+
ExDeleteResourceLite(&Fcb->PagingIoResource);
ExDeleteResourceLite(&Fcb->MainResource);
while (!IsListEmpty(&Fcb->ShortNameList))
{
- Entry = Fcb->ShortNameList.Flink;
- RemoveEntryList(Entry);
- ExFreePool(Entry);
+ Entry = Fcb->ShortNameList.Flink;
+ RemoveEntryList(Entry);
+ ExFreePool(Entry);
}
ExFreePool(Fcb);
@@ -541,8 +541,8 @@
ShortName.Buffer = ShortNameBuffer;
memset(ShortNameBuffer, 0, 26);
- OffsetOfEntry.QuadPart = StreamOffset.QuadPart + Offset;
- CdfsShortNameCacheGet(DirectoryFcb, &OffsetOfEntry, &LongName, &ShortName);
+ OffsetOfEntry.QuadPart = StreamOffset.QuadPart + Offset;
+ CdfsShortNameCacheGet(DirectoryFcb, &OffsetOfEntry, &LongName,
&ShortName);
DPRINT("ShortName '%wZ'\n", &ShortName);
Modified: trunk/reactos/drivers/filesystems/cdfs/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/cdfs/m…
==============================================================================
--- trunk/reactos/drivers/filesystems/cdfs/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/cdfs/misc.c [iso-8859-1] Wed Feb 4 00:04:24 2009
@@ -103,9 +103,9 @@
{
while (Number)
{
- *EndOfNumberTarget = '0' + (Number % 10);
- EndOfNumberTarget--;
- Number /= 10;
+ *EndOfNumberTarget = '0' + (Number % 10);
+ EndOfNumberTarget--;
+ Number /= 10;
}
return EndOfNumberTarget;
}
@@ -131,86 +131,86 @@
/* Try to find the name in our cache */
for (Entry = DirectoryFcb->ShortNameList.Flink;
- Entry != &DirectoryFcb->ShortNameList;
- Entry = Entry->Flink)
- {
- ShortNameEntry = CONTAINING_RECORD(Entry, CDFS_SHORT_NAME, Entry);
- if (ShortNameEntry->StreamOffset.QuadPart == StreamOffset->QuadPart)
- {
- /* Cache hit */
- RtlCopyMemory
- (ShortName->Buffer, ShortNameEntry->Name.Buffer,
- ShortNameEntry->Name.Length);
- ShortName->Length = ShortNameEntry->Name.Length;
- ExReleaseResourceLite(&DirectoryFcb->NameListResource);
- DPRINT("Yield short name %wZ from cache\n", ShortName);
- return;
- }
- }
-
+ Entry != &DirectoryFcb->ShortNameList;
+ Entry = Entry->Flink)
+ {
+ ShortNameEntry = CONTAINING_RECORD(Entry, CDFS_SHORT_NAME, Entry);
+ if (ShortNameEntry->StreamOffset.QuadPart == StreamOffset->QuadPart)
+ {
+ /* Cache hit */
+ RtlCopyMemory
+ (ShortName->Buffer, ShortNameEntry->Name.Buffer,
+ ShortNameEntry->Name.Length);
+ ShortName->Length = ShortNameEntry->Name.Length;
+ ExReleaseResourceLite(&DirectoryFcb->NameListResource);
+ DPRINT("Yield short name %wZ from cache\n", ShortName);
+ return;
+ }
+ }
+
/* Cache miss */
if ((RtlIsNameLegalDOS8Dot3(LongName, NULL, &HasSpaces) == FALSE) ||
- (HasSpaces == TRUE))
- {
- RtlGenerate8dot3Name(LongName, FALSE, &Context, ShortName);
+ (HasSpaces == TRUE))
+ {
+ RtlGenerate8dot3Name(LongName, FALSE, &Context, ShortName);
}
else
{
- /* copy short name */
- RtlUpcaseUnicodeString
- (ShortName,
- LongName,
- FALSE);
+ /* copy short name */
+ RtlUpcaseUnicodeString
+ (ShortName,
+ LongName,
+ FALSE);
}
DPRINT("Initial Guess %wZ\n", ShortName);
-
+
/* Find the part that'll be numberified */
LastDot = &ShortName->Buffer[(ShortName->Length / sizeof(WCHAR)) - 1];
for (Scan = ShortName->Buffer;
- Scan - ShortName->Buffer < ShortName->Length;
- Scan++)
- if (*Scan == '.') LastDot = Scan - 1;
-
+ Scan - ShortName->Buffer < ShortName->Length;
+ Scan++)
+ if (*Scan == '.') LastDot = Scan - 1;
+
/* Make it unique by scanning the cache and bumping */
/* Note that incrementing the ambiguous name is enough, since we add new
- * entries at the tail. We'll scan over all collisions. */
+ * entries at the tail. We'll scan over all collisions. */
/* XXX could perform better. */
for (Entry = DirectoryFcb->ShortNameList.Flink;
- Entry != &DirectoryFcb->ShortNameList;
- Entry = Entry->Flink)
- {
- ShortNameEntry = CONTAINING_RECORD(Entry, CDFS_SHORT_NAME, Entry);
- if (RtlCompareUnicodeString
- (ShortName,
- &ShortNameEntry->Name,
- TRUE) == 0) /* Match */
- {
- Scan = CdfsWriteNumberInShortName(LastDot, ++Number);
- *Scan = '~';
- DPRINT("Collide; try %wZ\n", ShortName);
- }
- }
-
+ Entry != &DirectoryFcb->ShortNameList;
+ Entry = Entry->Flink)
+ {
+ ShortNameEntry = CONTAINING_RECORD(Entry, CDFS_SHORT_NAME, Entry);
+ if (RtlCompareUnicodeString
+ (ShortName,
+ &ShortNameEntry->Name,
+ TRUE) == 0) /* Match */
+ {
+ Scan = CdfsWriteNumberInShortName(LastDot, ++Number);
+ *Scan = '~';
+ DPRINT("Collide; try %wZ\n", ShortName);
+ }
+ }
+
/* We've scanned over all entries and now have a unique one. Cache it. */
ShortNameEntry = ExAllocatePool(PagedPool, sizeof(CDFS_SHORT_NAME));
if (!ShortNameEntry)
{
- /* We couldn't cache it, but we can return it. We run the risk of
- * generating a non-unique name later. */
- ExReleaseResourceLite(&DirectoryFcb->NameListResource);
- DPRINT1("Couldn't cache potentially clashing 8.3 name %wZ\n", ShortName);
- return;
- }
-
+ /* We couldn't cache it, but we can return it. We run the risk of
+ * generating a non-unique name later. */
+ ExReleaseResourceLite(&DirectoryFcb->NameListResource);
+ DPRINT1("Couldn't cache potentially clashing 8.3 name %wZ\n",
ShortName);
+ return;
+ }
+
ShortNameEntry->StreamOffset = *StreamOffset;
ShortNameEntry->Name.Buffer = ShortNameEntry->NameBuffer;
ShortNameEntry->Name.Length = ShortName->Length;
ShortNameEntry->Name.MaximumLength = sizeof(ShortNameEntry->NameBuffer);
RtlCopyMemory
- (ShortNameEntry->NameBuffer,
- ShortName->Buffer,
- ShortName->Length);
+ (ShortNameEntry->NameBuffer,
+ ShortName->Buffer,
+ ShortName->Length);
InsertTailList(&DirectoryFcb->ShortNameList, &ShortNameEntry->Entry);
ExReleaseResourceLite(&DirectoryFcb->NameListResource);