Fix compatibility with linux and 2.065

This commit is contained in:
ponce on vps 2014-07-29 23:49:38 +02:00
parent 8ff025230e
commit 4d98f3f9d3
2 changed files with 7 additions and 7 deletions

View file

@ -36,7 +36,7 @@ void cwriteln(T...)(T args)
}
/// Coloured writef to a File.
void cwritef(File f, Char, A...)(in Char[] fmt, A args)
void cwritef(Char, A...)(File f, in Char[] fmt, A args)
{
auto s = format(fmt, args);
f.cwrite(s);

View file

@ -17,7 +17,7 @@ version(Windows)
struct WinTermEmulation
{
public:
void initialize() nothrow @nogc
@nogc void initialize() nothrow
{
// saves console attributes
_console = GetStdHandle(STD_OUTPUT_HANDLE);
@ -26,7 +26,7 @@ version(Windows)
_state = State.initial;
}
~this() nothrow @nogc
@nogc ~this() nothrow
{
// Restore initial text attributes on release
if (_savedInitialColor)
@ -45,7 +45,7 @@ version(Windows)
// Eat one character and update color state accordingly.
// What to do with the fed character.
CharAction feed(dchar d) nothrow @nogc
@nogc CharAction feed(dchar d) nothrow
{
final switch(_state) with (State)
{
@ -105,21 +105,21 @@ version(Windows)
readingAttribute
}
void setForegroundColor(WORD fgFlags) nothrow @nogc
@nogc void setForegroundColor(WORD fgFlags) nothrow
{
_currentAttr = _currentAttr & ~(FOREGROUND_BLUE | FOREGROUND_GREEN | FOREGROUND_RED | FOREGROUND_INTENSITY);
_currentAttr = _currentAttr | fgFlags;
SetConsoleTextAttribute(_console, _currentAttr);
}
void setBackgroundColor(WORD bgFlags) nothrow @nogc
@nogc void setBackgroundColor(WORD bgFlags) nothrow
{
_currentAttr = _currentAttr & ~(BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_INTENSITY);
_currentAttr = _currentAttr | bgFlags;
SetConsoleTextAttribute(_console, _currentAttr);
}
void executeAttribute(int attr) nothrow @nogc
@nogc void executeAttribute(int attr) nothrow
{
switch (attr)
{