Author: tkreuzer
Date: Sat Apr 24 00:16:59 2010
New Revision: 47003
URL:
http://svn.reactos.org/svn/reactos?rev=47003&view=rev
Log:
[FORMATTING]
- Apply consistent indentation
Modified:
trunk/reactos/lib/rtl/message.c
Modified: trunk/reactos/lib/rtl/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/message.c?rev=4700…
==============================================================================
--- trunk/reactos/lib/rtl/message.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/message.c [iso-8859-1] Sat Apr 24 00:16:59 2010
@@ -17,105 +17,109 @@
/*
* @implemented
*/
-NTSTATUS NTAPI
-RtlFindMessage(PVOID BaseAddress,
- ULONG Type,
- ULONG Language,
- ULONG MessageId,
- PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry)
+NTSTATUS
+NTAPI
+RtlFindMessage(
+ PVOID BaseAddress,
+ ULONG Type,
+ ULONG Language,
+ ULONG MessageId,
+ PRTL_MESSAGE_RESOURCE_ENTRY *MessageResourceEntry)
{
- LDR_RESOURCE_INFO ResourceInfo;
- PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
- PRTL_MESSAGE_RESOURCE_DATA MessageTable;
- NTSTATUS Status;
- ULONG EntryOffset = 0, IdOffset = 0;
- PRTL_MESSAGE_RESOURCE_ENTRY MessageEntry;
- ULONG i;
+ LDR_RESOURCE_INFO ResourceInfo;
+ PIMAGE_RESOURCE_DATA_ENTRY ResourceDataEntry;
+ PRTL_MESSAGE_RESOURCE_DATA MessageTable;
+ NTSTATUS Status;
+ ULONG EntryOffset = 0, IdOffset = 0;
+ PRTL_MESSAGE_RESOURCE_ENTRY MessageEntry;
+ ULONG i;
- DPRINT("RtlFindMessage()\n");
+ DPRINT("RtlFindMessage()\n");
- ResourceInfo.Type = Type;
- ResourceInfo.Name = 1;
- ResourceInfo.Language = Language;
+ ResourceInfo.Type = Type;
+ ResourceInfo.Name = 1;
+ ResourceInfo.Language = Language;
- Status = LdrFindResource_U(BaseAddress,
- &ResourceInfo,
- RESOURCE_DATA_LEVEL,
- &ResourceDataEntry);
- if (!NT_SUCCESS(Status))
- {
- return Status;
- }
+ Status = LdrFindResource_U(BaseAddress,
+ &ResourceInfo,
+ RESOURCE_DATA_LEVEL,
+ &ResourceDataEntry);
+ if (!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
- DPRINT("ResourceDataEntry: %p\n", ResourceDataEntry);
+ DPRINT("ResourceDataEntry: %p\n", ResourceDataEntry);
- Status = LdrAccessResource(BaseAddress,
- ResourceDataEntry,
- (PVOID*)&MessageTable,
- NULL);
- if (!NT_SUCCESS(Status))
- {
- return Status;
- }
+ Status = LdrAccessResource(BaseAddress,
+ ResourceDataEntry,
+ (PVOID*)&MessageTable,
+ NULL);
+ if (!NT_SUCCESS(Status))
+ {
+ return Status;
+ }
- DPRINT("MessageTable: %p\n", MessageTable);
+ DPRINT("MessageTable: %p\n", MessageTable);
- DPRINT("NumberOfBlocks %lu\n", MessageTable->NumberOfBlocks);
- for (i = 0; i < MessageTable->NumberOfBlocks; i++)
- {
- DPRINT("LoId 0x%08lx HiId 0x%08lx Offset 0x%08lx\n",
- MessageTable->Blocks[i].LowId,
- MessageTable->Blocks[i].HighId,
- MessageTable->Blocks[i].OffsetToEntries);
- }
+ DPRINT("NumberOfBlocks %lu\n", MessageTable->NumberOfBlocks);
+ for (i = 0; i < MessageTable->NumberOfBlocks; i++)
+ {
+ DPRINT("LoId 0x%08lx HiId 0x%08lx Offset 0x%08lx\n",
+ MessageTable->Blocks[i].LowId,
+ MessageTable->Blocks[i].HighId,
+ MessageTable->Blocks[i].OffsetToEntries);
+ }
- for (i = 0; i < MessageTable->NumberOfBlocks; i++)
- {
- if ((MessageId >= MessageTable->Blocks[i].LowId) &&
- (MessageId <= MessageTable->Blocks[i].HighId))
- {
- EntryOffset = MessageTable->Blocks[i].OffsetToEntries;
- IdOffset = MessageId - MessageTable->Blocks[i].LowId;
- break;
- }
+ for (i = 0; i < MessageTable->NumberOfBlocks; i++)
+ {
+ if ((MessageId >= MessageTable->Blocks[i].LowId) &&
+ (MessageId <= MessageTable->Blocks[i].HighId))
+ {
+ EntryOffset = MessageTable->Blocks[i].OffsetToEntries;
+ IdOffset = MessageId - MessageTable->Blocks[i].LowId;
+ break;
+ }
- if (MessageId < MessageTable->Blocks[i].LowId)
- {
- return STATUS_MESSAGE_NOT_FOUND;
- }
- }
+ if (MessageId < MessageTable->Blocks[i].LowId)
+ {
+ return STATUS_MESSAGE_NOT_FOUND;
+ }
+ }
- if (MessageTable->NumberOfBlocks <= i)
- {
- return STATUS_MESSAGE_NOT_FOUND;
- }
+ if (MessageTable->NumberOfBlocks <= i)
+ {
+ return STATUS_MESSAGE_NOT_FOUND;
+ }
- MessageEntry = (PRTL_MESSAGE_RESOURCE_ENTRY)((PUCHAR)MessageTable +
MessageTable->Blocks[i].OffsetToEntries);
+ MessageEntry = (PRTL_MESSAGE_RESOURCE_ENTRY)
+ ((PUCHAR)MessageTable + MessageTable->Blocks[i].OffsetToEntries);
- DPRINT("EntryOffset 0x%08lx\n", EntryOffset);
- DPRINT("IdOffset 0x%08lx\n", IdOffset);
+ DPRINT("EntryOffset 0x%08lx\n", EntryOffset);
+ DPRINT("IdOffset 0x%08lx\n", IdOffset);
- DPRINT("MessageEntry: %p\n", MessageEntry);
- for (i = 0; i < IdOffset; i++)
- {
- MessageEntry = (PRTL_MESSAGE_RESOURCE_ENTRY)((PUCHAR)MessageEntry +
(ULONG)MessageEntry->Length);
- }
+ DPRINT("MessageEntry: %p\n", MessageEntry);
+ for (i = 0; i < IdOffset; i++)
+ {
+ MessageEntry = (PRTL_MESSAGE_RESOURCE_ENTRY)
+ ((PUCHAR)MessageEntry + (ULONG)MessageEntry->Length);
+ }
- if (MessageEntry->Flags == 0)
- {
- DPRINT("AnsiText: %s\n", MessageEntry->Text);
- }
- else
- {
- DPRINT("UnicodeText: %S\n", (PWSTR)MessageEntry->Text);
- }
+ if (MessageEntry->Flags == 0)
+ {
+ DPRINT("AnsiText: %s\n", MessageEntry->Text);
+ }
+ else
+ {
+ DPRINT("UnicodeText: %S\n", (PWSTR)MessageEntry->Text);
+ }
- if (MessageResourceEntry != NULL)
- {
- *MessageResourceEntry = MessageEntry;
- }
+ if (MessageResourceEntry != NULL)
+ {
+ *MessageResourceEntry = MessageEntry;
+ }
- return STATUS_SUCCESS;
+ return STATUS_SUCCESS;
}
@@ -139,22 +143,24 @@
*
* @unimplemented
*/
-NTSTATUS NTAPI
-RtlFormatMessage(PWSTR Message,
- UCHAR MaxWidth,
- BOOLEAN IgnoreInserts,
- BOOLEAN Ansi,
- BOOLEAN ArgumentIsArray,
- va_list *Arguments,
- PWSTR Buffer,
- ULONG BufferSize)
+NTSTATUS
+NTAPI
+RtlFormatMessage(
+ PWSTR Message,
+ UCHAR MaxWidth,
+ BOOLEAN IgnoreInserts,
+ BOOLEAN Ansi,
+ BOOLEAN ArgumentIsArray,
+ va_list *Arguments,
+ PWSTR Buffer,
+ ULONG BufferSize)
{
- DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu)\n",
- Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi ?
"TRUE" : "FALSE",
- ArgumentIsArray ? "TRUE" : "FALSE", (PSTR)Arguments, Buffer,
BufferSize);
+ DPRINT1("RtlFormatMessage(%S, %u, %s, %s, %s, %s, %p, %lu)\n",
+ Message, MaxWidth, IgnoreInserts ? "TRUE" : "FALSE", Ansi
? "TRUE" : "FALSE",
+ ArgumentIsArray ? "TRUE" : "FALSE", (PSTR)Arguments,
Buffer, BufferSize);
- UNIMPLEMENTED;
- return STATUS_NOT_IMPLEMENTED;
+ UNIMPLEMENTED;
+ return STATUS_NOT_IMPLEMENTED;
}
/* EOF */