From 4d98f3f9d373a1f246d4e2051599c79720e5aea2 Mon Sep 17 00:00:00 2001 From: ponce on vps Date: Tue, 29 Jul 2014 23:49:38 +0200 Subject: [PATCH] Fix compatibility with linux and 2.065 --- source/colorize/cwrite.d | 2 +- source/colorize/winterm.d | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/source/colorize/cwrite.d b/source/colorize/cwrite.d index cd4e7fb..9b67ffa 100644 --- a/source/colorize/cwrite.d +++ b/source/colorize/cwrite.d @@ -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); diff --git a/source/colorize/winterm.d b/source/colorize/winterm.d index 7406d1a..d24b294 100644 --- a/source/colorize/winterm.d +++ b/source/colorize/winterm.d @@ -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) {