Author: tkreuzer
Date: Sun Mar 4 13:33:07 2012
New Revision: 55998
URL:
http://svn.reactos.org/svn/reactos?rev=55998&view=rev
Log:
[GENDIB]
- Generate ansi style indentation
- Fix signed/unsigned MSVC warnings in generated code
Modified:
trunk/reactos/tools/gendib/gendib.c
Modified: trunk/reactos/tools/gendib/gendib.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/gendib/gendib.c?rev=…
==============================================================================
--- trunk/reactos/tools/gendib/gendib.c [iso-8859-1] (original)
+++ trunk/reactos/tools/gendib/gendib.c [iso-8859-1] Sun Mar 4 13:33:07 2012
@@ -177,14 +177,11 @@
unsigned n;
va_list Args;
- if (NULL != strchr(Fmt, '{') && 0 != Indent)
- {
- Indent += 2;
- }
- else if (NULL != strchr(Fmt, '}'))
- {
- Indent -= 2;
- }
+ if (strchr(Fmt, '}'))
+ {
+ Indent -= 4;
+ }
+
if (AtBOL)
{
for (n = 0; n < Indent; n++)
@@ -198,14 +195,11 @@
vfprintf(Out, Fmt, Args);
va_end(Args);
- if (NULL != strchr(Fmt, '{'))
- {
- Indent += 2;
- }
- else if (NULL != strchr(Fmt, '}') && 0 != Indent)
- {
- Indent -= 2;
- }
+ if (strchr(Fmt, '{'))
+ {
+ Indent += 4;
+ }
+
AtBOL = '\n' == Fmt[strlen(Fmt) - 1];
}
@@ -460,7 +454,7 @@
else
{
Output(Out, "LeftCount = (ULONG_PTR) DestBase & 0x03;\n");
- Output(Out, "if (BltInfo->DestRect.right - BltInfo->DestRect.left
< "
+ Output(Out, "if ((ULONG)(BltInfo->DestRect.right -
BltInfo->DestRect.left) < "
"LeftCount)\n");
Output(Out, "{\n");
Output(Out, "LeftCount = BltInfo->DestRect.right - "
@@ -800,7 +794,7 @@
Output(Out, "ULONG i;\n");
if (RopInfo->UsesPattern)
{
- Output(Out, "ULONG PatternX =0, PatternY = 0, BasePatternX =
0;\n");
+ Output(Out, "LONG PatternX =0, PatternY = 0, BasePatternX =
0;\n");
}
First = 1;
if (RopInfo->UsesSource)