Skip to content

Commit

Permalink
Normalize new source with dfmt and fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
yebblies committed Aug 25, 2015
1 parent d6725fa commit 62253d4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/globals.d
Expand Up @@ -22,8 +22,8 @@ template xversion(string s)

private string stripRight(string s)
{
while (s.length && (s[$-1] == ' ' || s[$-1] == '\n' || s[$-1] == '\r'))
s = s[0 .. $-1];
while (s.length && (s[$ - 1] == ' ' || s[$ - 1] == '\n' || s[$ - 1] == '\r'))
s = s[0 .. $ - 1];
return s;
}

Expand Down Expand Up @@ -294,7 +294,7 @@ struct Global
}
copyright = "Copyright (c) 1999-2015 by Digital Mars";
written = "written by Walter Bright";
_version = ('v' ~ stripRight(import("verstr.h"))[1 .. $-1] ~ '\0').ptr;
_version = ('v' ~ stripRight(import("verstr.h"))[1 .. $ - 1] ~ '\0').ptr;
compiler.vendor = "Digital Mars D";
stdmsg = stdout;
main_d = "__main.d";
Expand Down
17 changes: 8 additions & 9 deletions src/scanmscoff.d
Expand Up @@ -182,13 +182,13 @@ struct BIGOBJ_HEADER
WORD Version; // 2
WORD Machine; // identifies type of target machine
DWORD TimeDateStamp; // creation date, number of seconds since 1970
BYTE UUID[16]; // { '\xc7', '\xa1', '\xba', '\xd1', '\xee', '\xba', '\xa9', '\x4b',
BYTE[16] UUID; // { '\xc7', '\xa1', '\xba', '\xd1', '\xee', '\xba', '\xa9', '\x4b',
// '\xaf', '\x20', '\xfa', '\xf6', '\x6a', '\xa4', '\xdc', '\xb8' };
DWORD unused[4]; // { 0, 0, 0, 0 }
DWORD[4] unused; // { 0, 0, 0, 0 }
DWORD NumberOfSections; // number of sections
DWORD PointerToSymbolTable; // file offset of symbol table
DWORD NumberOfSymbols; // number of entries in the symbol table
};
}

align(1)
struct IMAGE_FILE_HEADER
Expand Down Expand Up @@ -218,8 +218,7 @@ enum IMAGE_SYM_CLASS_LABEL = 6;
enum IMAGE_SYM_CLASS_FUNCTION = 101;
enum IMAGE_SYM_CLASS_FILE = 103;

align(1)
struct SymbolTable32
align(1) struct SymbolTable32
{
union
{
Expand All @@ -228,17 +227,17 @@ struct SymbolTable32
{
DWORD Zeros;
DWORD Offset;
};
};
}
}

DWORD Value;
DWORD SectionNumber;
WORD Type;
BYTE StorageClass;
BYTE NumberOfAuxSymbols;
}

align(1)
struct SymbolTable
align(1) struct SymbolTable
{
BYTE[SYMNMLEN] Name;
DWORD Value;
Expand Down

0 comments on commit 62253d4

Please sign in to comment.